Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please.

by Tomte (Priest)
on Jul 13, 2004 at 10:48 UTC ( [id://373910]=note: print w/replies, xml ) Need Help??


in reply to PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please.

Great stuff, here are the testresults of the Gentoo-Jury: g.m.passos douze points ;-)

Update:crossposted this test-result to comp.lang.perl.modules.

[1239]tom@margo PLJava-0.01 $ perl -v This is perl, v5.8.4 built for i686-linux

Makefile.PL diff (diff -c)

** Makefile.PL 2004-07-13 00:20:42.000000000 +0200 --- Makefile.PL.linux 2004-07-13 12:41:27.000000000 +0200 *************** *** 32,38 **** ######### my $C_FILES = "$NAME.c ${NAME}_wrap.c" ; ! my $O_FILES = "$NAME.obj ${NAME}_wrap.obj" ; my $INTERFACE = "$NAME.i" ; my $CLEAN_FILES = "PLJava.dll" ; --- 32,38 ---- ######### my $C_FILES = "$NAME.c ${NAME}_wrap.c" ; ! my $O_FILES = "$NAME.o ${NAME}_wrap.o" ; my $INTERFACE = "$NAME.i" ; my $CLEAN_FILES = "PLJava.dll" ; *************** *** 103,109 **** CFLAGS=$cflags LDFLAGS=$ldflags ! INC = -I"$ENV{JAVA_INCLUDE}" -I"$ENV{JAVA_INCLUDE}/win32" C_FILES = $C_FILES O_FILES = $O_FILES --- 103,109 ---- CFLAGS=$cflags LDFLAGS=$ldflags ! INC = -I"$ENV{JAVA_INCLUDE}" -I"$ENV{JAVA_INCLUDE}/win32" -I"$ENV{JA +VA_INCLUDE}/linux" C_FILES = $C_FILES O_FILES = $O_FILES *************** *** 115,121 **** DISTNAME = $NAME VERSION = $VERSION SUFFIX = .gz - DISTVNAME = \$(DISTNAME)-\$(VERSION) .c$o: --- 115,120 ----

Changes to the generated Makefile:

s/-rdynamic/-shared -rdynamic/

Inside of built/

[1244]tom@margo PLJava-0.01 $ export LD_LIBRARY_PATH=.:$LD_LIBRARY_PAT +H [1245]tom@margo built $ ln -s PLJava.so libPLJava.so [1245]tom@margo built $ java test
java test output:
java test Hello World! TIME: 1089715216 @INC: /lib /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3/i686-linux /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0/i686-linux /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.4/i686-linux /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3/i686-linux /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1/i686-linux /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0/i686-linux /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . ERROR: This is a warning! at (eval 7) line 1. MATH: 1024 3 3.33333333333333 ============================ ID: 1 Type: SCALAR Val: 123456 ============================ ID: 2 Type: SCALAR Val: 1111 ============================ ID: 1 Type: SCALAR Val: 123456 ============================ ID: 3 Type: ARRAY Val: t 1089715216 x: 1089715216 ============================ <<<<<<<<<<<<<<< ID: 4 Type: foo Val: foo=HASH(0x812a2b4) FOO>> foo=HASH(0x812a2b4) 123 456 foo=HASH(0x812a2b4) call: 1 dump: >>>>>>>>>>>>>>> ============================ ID: 5 Type: HASH Val: HASH(0x8144da0) k: 1089715216 elem: call: ============================'This is a \\\' quote \'test\' !'

Summary: the dll-naming is wrong (libPLJava.so), the object-file-ending is wrong, and inside the generated Makefile an option to gcc is missing (without the -shared gcc needs a main-function).

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus

Replies are listed 'Best First'.
Re^2: PLJava - Perl embeded into Java (calling Perl from Java) - 1sr release - call for tests and review, please.
by gmpassos (Priest) on Jul 13, 2004 at 18:49 UTC
    Wow, many thanks for the updates for Linux!

    I will add them to PLJava and release a new version...

    And, it works! It's alive.... heheeh ;-P

    Graciliano M. P.
    "Creativity is the expression of the liberty".

      Dear Graciliano,

      I donwloaded the PLJava and run it in Winxp. I have set the enverioment variables for Java. While I compile the Makefile.pl with perl, it return below errors:

      ---------------------------------------------
      Note (probably harmless): No library found for oldnames.lib
      Note (probably harmless): No library found for kernel32.lib
      Note (probably harmless): No library found for user32.lib
      Note (probably harmless): No library found for gdi32.lib
      Note (probably harmless): No library found for winspool.lib
      Note (probably harmless): No library found for comdlg32.lib
      Note (probably harmless): No library found for advapi32.lib
      Note (probably harmless): No library found for shell32.lib
      Note (probably harmless): No library found for ole32.lib
      Note (probably harmless): No library found for oleaut32.lib
      Note (probably harmless): No library found for netapi32.lib
      Note (probably harmless): No library found for uuid.lib
      Note (probably harmless): No library found for ws2_32.lib
      Note (probably harmless): No library found for mpr.lib
      Note (probably harmless): No library found for winmm.lib
      Note (probably harmless): No library found for version.lib
      Note (probably harmless): No library found for odbc32.lib
      Note (probably harmless): No library found for odbccp32.lib
      Note (probably harmless): No library found for msvcrt.lib
      Writing Makefile for PLJava
      -------------------------------------------------------

      What is the problem cause this error and how to fix it?

      Regards,
      CC
        What is your OS? Your Perl instalation is ok?

        I think that is some problem with your compiler flags, since this libs in the list are added by the Perl Config based in the compiler used to compile Perl.

        Graciliano M. P.
        "Creativity is the expression of liberty".

        I had exactaly the same problem. Did you get fix it? How did you fix it? Please answer to: fpsilveira at gmail.com Thank you! Filipi Silveira Porto Alegre - Brazil

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found