Perl package install dll problems

C

ChrisC

Hello,

I'm using ActivePerl latest version and have installed the inline-0.44
package on a Win XP box. Actually I tried this on 2 machines with
same result.

I'm now trying to install inline-java 0.52. I've set the environment
variables PERL_INLINE_JAVA_J2SDK=c:
\jdk1.5.0_11 and PERL_INLINE_JAVA_JNI=1 and the nmake seems to
complete successfully.

When I run 'nmake test' I get a bunch of errors with a dll file,
however, the dll is located in the mentioned directories. I search of
the dll dependency with Dependency Walker doesn't reveal any errors.

A snippet of the errors from 'nmake test' is below. Any suggestions?

Chris

cd ..
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'bl
ib\lib', 'blib\arch')" t/*.t
t/01_init..............Can't load JNI module. Did you build it at
install time?
Error: Can't load 'C:\inlinejava\Inline-Java-0.52\blib\arch/auto/
Inline/Java/JNI
/JNI.dll' for module Inline::Java::JNI: load_file:The specified module
could not
be found at C:/Perl/lib/DynaLoader.pm line 230.
at C:\inlinejava\Inline-Java-0.52\blib\lib/Inline/Java.pm line 193
at C:\inlinejava\Inline-Java-0.52\blib\lib/Inline/Java.pm line 193
Compilation failed in require at C:\inlinejava\Inline-Java-0.52\blib
\lib/Inline/
Java.pm line 193.
INIT failed--call queue aborted.
t/01_init..............dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
t/02_primitives........Can't load JNI module. Did you build it at
install time?
Error: Can't load 'C:\inlinejava\Inline-Java-0.52\blib\arch/auto/
Inline/Java/JNI
/JNI.dll' for module Inline::Java::JNI: load_file:The specified module
could not
be found at C:/Perl/lib/DynaLoader.pm line 230.
at C:\inlinejava\Inline-Java-0.52\blib\lib/Inline/Java.pm line 193
at C:\inlinejava\Inline-Java-0.52\blib\lib/Inline/Java.pm line 193
Compilation failed in require at C:\inlinejava\Inline-Java-0.52\blib
\lib/Inline/
Java.pm line 193.
INIT failed--call queue aborted.
t/02_primitives........dubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-102
Failed 102/102 tests, 0.00% okay
t/02_primitives_1_4....Can't load JNI module. Did you build it at
install time?
Error: Can't load 'C:\inlinejava\Inline-Java-0.52\blib\arch/auto/
Inline/Java/JNI
/JNI.dll' for module Inline::Java::JNI: load_file:The specified module
could not
be found at C:/Perl/lib/DynaLoader.pm line 230.
at C:\inlinejava\Inline-Java-0.52\blib\lib/Inline/Java.pm line 193
at C:\inlinejava\Inline-Java-0.52\blib\lib/Inline/Java.pm line 193
Compilation failed in require at C:\inlinejava\Inline-Java-0.52\blib
\lib/Inline/
 
S

Sisyphus

..
..
I'm now trying to install inline-java 0.52. I've set the environment
variables PERL_INLINE_JAVA_J2SDK=c:
\jdk1.5.0_11 and PERL_INLINE_JAVA_JNI=1

I find the same problem when I set those environment variables. However, if
I unset them, and start *afresh* with 'perl Makefile.PL
J2SDK=C:/jdk1.5.0_11', accepting the defaults where prompted (which means
that the JNI extension is built), then I find that everything builds and
tests fine.

Actually, I'm using jdk1.5.0_07, and dmake/gcc (not nmake/cl), but the fact
that I got the same problem suggests that the same solution may also work
for you.

Cheers,
Rob
 
C

ChrisC

I unset them, and start *afresh* with 'perl Makefile.PL
J2SDK=C:/jdk1.5.0_11', accepting the defaults where prompted (which means
that the JNI extension is built), then I find that everything builds and
tests fine.

If you unset PERL_INLINE_JAVA_JINI then you are not testing the JNI
extension when you run the tests. If I do that then it is all
successful too. Problem is, I need the JNI extension, and the perl
interpreter extension, which defaults as 'n' on the perl Makefile.PL.
But, thanks for the suggestion.

Chris
 
S

Sisyphus

..
..>
If you unset PERL_INLINE_JAVA_JINI then you are not testing the JNI
extension when you run the tests. If I do that then it is all
successful too. Problem is, I need the JNI extension, and the perl
interpreter extension, which defaults as 'n' on the perl Makefile.PL.
But, thanks for the suggestion.

Oh ... thanks for taking the time to correct me.

On closer inspection (and having reset PERL_INLINE_JAVA_JNI) I find that
JNI.dll is failing to load because jvm.dll cannot be found.

You can fix that by adding C:/jdk1.5.0_11/jre/bin/server to your path.
(Worked for me - though I don't know whether it's the server or the client
jvm.dll that ought to be put in the path.)

Cheers,
Rob
 
C

ChrisC

After talking to the inline-java package author, we discovered that by
using an earlier version of nmake (I was using from VS 2005, switched
to VS2003) it worked.

Maybe ActivePerl isn't built with VS 2005? Anyway, finally, it works
fine.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top