RASSyndrome has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to install PLJava (sc. PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please.) on Windows Vista. I've 'perl makefile.pl'-ed and when I try to nmake I get:
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.

C:\PROGRA~1\Java\jdk1.5.0\bin\javac -d ./ *.java
g++ PLJava.o PLJava_wrap.o -s -L"C:\Perl\lib\CORE" C:\Perl\lib\CORE\p erl510.lib C:\MinGW\lib\libkernel32.a C:\MinGW\lib\libuser32.a C:\MinGW\lib\libg di32.a C:\MinGW\lib\libwinspool.a C:\MinGW\lib\libcomdlg32.a C:\MinGW\lib\libadv api32.a C:\MinGW\lib\libshell32.a C:\MinGW\lib\libole32.a C:\MinGW\lib\liboleaut 32.a C:\MinGW\lib\libnetapi32.a C:\MinGW\lib\libuuid.a C:\MinGW\lib\libws2_32.a C:\MinGW\lib\libmpr.a C:\MinGW\lib\libwinmm.a C:\MinGW\lib\libversion.a C:\MinGW \lib\libodbc32.a C:\MinGW\lib\libodbccp32.a C:\MinGW\lib\libmsvcrt.a -shared -dl l -o PLJava.dll
g++: unrecognized option `-shared'
PLJava.o(.text+0x89):PLJava.c: undefined reference to `perl_alloc'
PLJava.o(.text+0x9b):PLJava.c: undefined reference to `Perl_set_context'
PLJava.o(.text+0xa8):PLJava.c: undefined reference to `perl_construct'
PLJava.o(.text+0xad):PLJava.c: undefined reference to `Perl_get_context'
PLJava.o(.text+0xb5):PLJava.c: undefined reference to `Perl_Iperl_destruct_level_ptr'
PLJava.o(.text+0xe3):PLJava.c: undefined reference to `perl_parse'
PLJava.o(.text+0xf3):PLJava.c: undefined reference to `perl_run'
PLJava.o(.text+0xfb):PLJava.c: undefined reference to `Perl_get_context'
PLJava.o(.text+0x113):PLJava.c: undefined reference to `Perl_eval_pv'
...Just imagine about a hundred more lines like this...
PLJava.o(.text+0x6e3):PLJava.c: undefined reference to `Perl_get_context'
PLJava.o(.text+0x6f4):PLJava.c: undefined reference to `boot_DynaLoader'
PLJava.o(.text+0x704):PLJava.c: undefined reference to `Perl_newXS'
PLJava.o(.text+0x709):PLJava.c: undefined reference to `Perl_get_context'
PLJava.o(.text+0x73a):PLJava.c: undefined reference to `Perl_newXS_flags'
PLJava.o(.text+0x73f):PLJava.c: undefined reference to `Perl_get_context'
PLJava.o(.text+0x760):PLJava.c: undefined reference to `Perl_newXS'
collect2: ld returned 1 exit status
NMAKE : fatal error U1077: 'C:\Windows\system32\cmd.exe' : return code '0x1'
Stop.

Feels like something's missing. Any hints?
  • Comment on problem installing PLJava on Windows Vista

Replies are listed 'Best First'.
Re: problem installing PLJava on Windows Vista
by syphilis (Archbishop) on Jun 16, 2009 at 00:47 UTC
    It's a bit odd. The '-shared' option should be recognised by 'g++'. And I can't see any reason that the failing command should fail - assuming that C:\Perl\lib\CORE\p erl510.lib and -dl l from the output you provided are mis-prints and that you really got C:\Perl\lib\CORE\perl510.lib and -dll.
    Did you get any warnings when you ran 'perl Makefile.PL' ?

    Mysteriously I can reproduce the same errors with ActivePerl build 1004, but for an apparently different reason - namely that no attempt is made to link to perl510.lib. (Haven't quite worked out what's going on there yet, and other of my builds of Win32 perl seem ok with PLJava-0.04. I'll post again when I get it worked out.)

    Do you really want PLJava ? It seems like it might not be maintained any more - having not been updated since 2004. Would Inline::Java (which is actively maintained, afaik) be a better choice ?

    Cheers,
    Rob

      Did you get any warnings when you ran 'perl Makefile.PL'?

      Not a one, alas.

      Do you really want PLJava ? It seems like it might not be maintained any more - having not been updated since 2004. Would Inline::Java (which is actively maintained, afaik) be a better choice?

      I've looked into that and run into a different installation problem while installing the dependencies, which I don't recall at the moment. Come to think of it, it might be the same problem but I'd have to check again. Either way, can Inline::Java let one use the application on a computer without Perl installed? PLJava boasts that and it would be ever so moderately useful.

        Your particular problem is still puzzling me no end :-)
        What does 'perl -V' output ? (That's an uppercase 'V').
        Also, how did you install MinGW (was it via 'ppm', or some other way) ?

        I'm thinking you could try using the freely available dmake instead of that crappy old version of nmake that you have, though I'm not sure it will improve things for you. Anyway, with answers to the above questions, we might be better equipped to work out how to deal with this.

        Cheers,
        Rob