Perl package install dll problems

Discussion in 'Perl Misc' started by ChrisC, Mar 28, 2007.

  1. ChrisC

    ChrisC Guest

    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/
    ChrisC, Mar 28, 2007
    #1
    1. Advertising

  2. ChrisC

    Sisyphus Guest

    "ChrisC" <> wrote in message
    news:...
    ..
    ..
    > 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
    Sisyphus, Mar 29, 2007
    #2
    1. Advertising

  3. ChrisC

    ChrisC Guest

    > 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
    ChrisC, Mar 30, 2007
    #3
  4. ChrisC

    Sisyphus Guest

    "ChrisC" <> wrote in message
    ..
    ..>
    > 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
    Sisyphus, Mar 31, 2007
    #4
  5. ChrisC

    ChrisC Guest

    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
    ChrisC, Mar 31, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anushi
    Replies:
    5
    Views:
    8,646
  2. Monty
    Replies:
    1
    Views:
    17,965
    Steven Cheng[MSFT]
    Jan 21, 2008
  3. Gee Chen
    Replies:
    2
    Views:
    437
    Gee Chen
    Aug 29, 2011
  4. H. Simpson
    Replies:
    4
    Views:
    250
    H. Simpson
    Aug 3, 2004
  5. Peng Yu
    Replies:
    1
    Views:
    329
    Ron Bergin
    Dec 31, 2009
Loading...

Share This Page