Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Inline::Java install on Windows (nmake problem)

by Lion-Tiger (Novice)
on Nov 17, 2011 at 15:31 UTC ( [id://938634]=perlquestion: print w/replies, xml ) Need Help??

Lion-Tiger has asked for the wisdom of the Perl Monks concerning the following question:

I want to install Inline::Java, to embed perl code in java projects.
So I downloaded it and tried to install:
>perl makefile.pl J2SDK="c:\Java\jdk1.6.0_26" Welcome to the Inline::Java installation procedure. Default J2SDK for Inline::Java will be 'c:\Java\jdk1.6.0_26'. See module documentation for information on how to use a different J2S +DK or change this default value. Warning: prerequisite Inline 0.44 not found. Inline::Java can use a JNI extension that allows the Java Virtual Mach +ine (JVM) to be dynamically linked with Perl instead of running as a separ +ate process. The use of this extension is optional, and building it still allows Inline::Java to run the JVM in the default (separate process) fashion. Note: You need a C compiler to build the extension. Do you wish to build the JNI extension? [y] y Building JNI extension. Building with: C:\Java\jdk1.6.0_26\include\jni.h C:\Java\jdk1.6.0_26\include\win32\jni_md.h C:\Java\jdk1.6.0_26\lib\jvm.lib C:\Java\jdk1.6.0_26\jre\bin\server\jvm.dll Note: In order for Inline::Java to use the JNI extension, you will nee +d to use the JNI configuration option or set the PERL_INLINE_JAVA_JNI envir +onment variable to a true value. You will also need to add the following dire +ctories to your PATH environment variable: C:\Java\jdk1.6.0_26\jre\bin C:\Java\jdk1.6.0_26\jre\bin\server See README.JNI for more information. The PerlInterpreter extension allows Inline::Java to be loaded directl +y from Java using an embedded Perl interpreter. It is still EXPERIMENTAL and may not build or work properly on all platforms. See documentation for more details. Do you wish to build the PerlInterpreter extension? [n] n Note (probably harmless): No library found for -ljvm Writing Makefile for Inline::Java::JNI Writing Makefile for Inline::Java You can continue the installation with the following commands: % nmake % nmake test % nmake install >nmake Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. "C:\Java\jdk1.6.0_26\bin\javac.exe" -deprecation -g -d Java\cl +asses Java \sources\org\perl\inline\java\*.java Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. "C:\Java\jdk1.6.0_26\bin\jar.exe" cf Java\InlineJavaServer.jar + -C Java\c lasses org -C Java\classes InlineJava.properties "C:\Java\jdk1.6.0_26\bin\jar.exe" cf Java\InlineJavaUser.jar - +C Java\cla sses InlineJavaUserClassLink.class syntax error at -e line 1, next char ) Missing right curly or square bracket at -e line 1, at end of line Execution of -e aborted due to compilation errors. NMAKE : fatal error U1077: 'C:\strawberry\perl\bin\perl.exe' : return +code '0xff ' Stop.


====================

Inline::Java installed, thanks to ALL! =)

Used dmake instead of nmake ;)

Replies are listed 'Best First'.
Re: Inline::Java install on Windows (nmake problem)
by marto (Cardinal) on Nov 17, 2011 at 15:38 UTC

    "Warning: prerequisite Inline 0.44 not found"

    Install Inline? cpan Inline

      Of course I tried to install it, but with cpan it can't be installed:
      >cpan Inline CPAN: CPAN::SQLite loaded ok (v0.199) Database was generated on Thu, 17 Nov 2011 14:54:34 GMT Running install for module 'Inline' Running make for S/SI/SISYPHUS/Inline-0.48.tar.gz CPAN: Digest::SHA loaded ok (v5.61) CPAN: Compress::Zlib loaded ok (v2.034) Checksum for C:\strawberry\cpan\sources\authors\id\S\SI\SISYPHUS\Inlin +e-0.48.tar .gz ok CPAN: Archive::Tar loaded ok (v1.76) CPAN: File::Temp loaded ok (v0.22) CPAN: CPAN::Meta loaded ok (v2.110930) CPAN.pm: Going to build S/SI/SISYPHUS/Inline-0.48.tar.gz Checking if your kit is complete... Looks good Inline::C is packaged with Inline.pm because it is the most commonly u +sed Inline Language Support Module (ILSM). See also: Inline::ASM, ::Awk, ::BC, ::Basic, ::Befunge, ::CPP (C++), : +:CPR, ::Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, +::TT, ::Tcl and ::WebChat. Config.pm indicates that your version of Perl was built with this C co +mpiler: gcc I have located this compiler on your system. Do you want to install Inline::C? [y] y Writing Makefile for Inline::C Writing Makefile for Inline Fixing Makefile for MSWin32 Could not read metadata file. Falling back to other methods to determi +ne prerequ isites CPAN: Module::CoreList loaded ok (v2.46) cp Inline.pod blib\lib\Inline.pod cp lib/Inline/MakeMaker/Changes blib\lib\Inline\MakeMaker\Changes cp lib/Inline/denter.pm blib\lib\Inline\denter.pm AutoSplitting blib\lib\Inline\denter.pm (blib\lib\auto\Inline\denter) cp Inline.pm blib\lib\Inline.pm AutoSplitting blib\lib\Inline.pm (blib\lib\auto\Inline) cp lib/Inline/Foo.pm blib\lib\Inline\Foo.pm cp Inline-API.pod blib\lib\Inline-API.pod cp lib/Inline/MakeMaker.pm blib\lib\Inline\MakeMaker.pm cp Inline-FAQ.pod blib\lib\Inline-FAQ.pod cp Inline-Support.pod blib\lib\Inline-Support.pod dmake.EXE: Error code 197, while making 'subdirs' SISYPHUS/Inline-0.48.tar.gz C:\strawberry\c\bin\dmake.EXE -- NOT OK CPAN: YAML loaded ok (v0.73) Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible
      I'll try installing it from source....

      That's result:
      >cmd.exe Microsoft Windows [Version 6.1.7601] (c) Корпораци&#1 +103; Майкрософ& +#1090; (Microsoft Corp.), 2009. Все пр& +#1072;ва защище&#1085 +;ы. H:\Subst\Disk_M\Ivan Documents\MyDocs\Ivan\Maxthon Downloads\Inline-0. +48>perl Ma kefile.pl Checking if your kit is complete... Looks good Inline::C is packaged with Inline.pm because it is the most commonly u +sed Inline Language Support Module (ILSM). See also: Inline::ASM, ::Awk, ::BC, ::Basic, ::Befunge, ::CPP (C++), : +:CPR, ::Foo, ::Guile, ::Java, ::Octave, ::PERL, ::Python, ::Ruby, +::TT, ::Tcl and ::WebChat. Config.pm indicates that your version of Perl was built with this C co +mpiler: gcc I have located this compiler on your system. Do you want to install Inline::C? [y] y Writing Makefile for Inline::C Writing Makefile for Inline Fixing Makefile for MSWin32 >nmake Microsoft (R) Program Maintenance Utility Version 10.00.30319.01 Copyright (C) Microsoft Corporation. All rights reserved. syntax error at -e line 1, next char ) Missing right curly or square bracket at -e line 1, at end of line Execution of -e aborted due to compilation errors. NMAKE : fatal error U1077: 'C:\strawberry\perl\bin\perl.exe' : return +code '0xff ' Stop.

      I think it's problem with nmake...

        "Of course I tried to install it, but with cpan it can't be installed:"

        Silly me, for assuming that since you the details you posted included the message "Warning: prerequisite Inline 0.44 not found." and no mention of an attempt to install the module that this was a worth while suggestion. We are not mind readers, consider reading How do I post a question effectively?.

        Strawberry Perl uses dmake, not nmake. When planning on installing modules please read and understand the documentation, including the README file, which in this case mentions the ppm installation route also.

        Hi, To solve the below error:

        "syntax error at -e line 1, next char ) Missing right curly or square bracket at -e line 1, at end of line Execution of -e aborted due to compilation errors. NMAKE : fatal error U1077: 'C:\strawberry\perl\bin\perl.exe' : return +code '0xff"

        Nmake to be executed successfully, needs an another supporting file cl.exe which is found in the bin or lib folder of the Visual C++ installation, please set the path of bin path or lib path in the environment variables. Make sure that Nmake.exe and cl.exe is at the same folder and this path has to set in the environment variable PATH.

Re: Inline::Java install on Windows (nmake problem)
by MVS (Monk) on Nov 18, 2011 at 02:54 UTC

    It sounds like the Makefile is being created using dmake syntax, and nmake is having trouble parsing it. Try using dmake instead.

      dmake didn't help

      ====================
      My mistake, it helped - got some troubles with path variable, so it took the wrong dmake.....

      Inline::Java installed, thanks to ALL! =)
Re: Inline::Java install on Windows (nmake problem)
by Anonymous Monk on Nov 18, 2011 at 09:37 UTC

    Who told you to use nmake?

    $ perl -V:make make='dmake';

    strawberryperl is known to use dmake

        Well kiss my grits :D

        If you're going to help the user, help him good :)

        use Config(); $make = $Config::Config{make};

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://938634]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2024-04-23 13:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found