| Tom Regner 2004-07-13, 8:57 am |
| crossposting of
http://www.perlmonks.org/index.pl?node_id=373910
Graciliano M. P. wrote:
> Now I have finished the basic wrappers to work with Perl from Java,
> specially to control and use Perl objecs directly from Java. Also I have
> added support for multiple Java Native Threads calling the same Perl
> interpreter, so, is possible to use PLJava with Java RMI, since for each
> RMI application you have a Thread that is not the main.
Great stuff, here are the testresults of the Gentoo-Jury: g.m.passos douze
points ;-)
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).
[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{JAVA_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_PATH
[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
|