Hi,
I am working on Perl with Java. I am calling the perlscript function from
java.While tring out some sample program i am getting the error.Could u
help me out regaring this?
Operating Environment : RedHat Linux 8.0.
>./install-jpl
JPL_SRC = /home/hema/perl-5.8.4/jpl
JAVA_HOME = /home/hema/j2sdk1.4.1_03
You need to decide which directory JPL files are to be installed in.
Applications will look in subdirectories of this directory for any JPL
related files.
You may use the current directory (/home/hema/perl-5.8.4/jpl)
or you may use a directory such as /home/hema/jpl.
Install JPL files where: [/home/hema/perl-5.8.4/jpl] /usr/local
JPL_HOME = /usr/local
Writing setvars...
Starting install...
+ cd JPL
+ perl Makefile.PL
Writing Makefile for JPL::Class
+ make clean
rm -rf ./blib Makefile.aperl blib/arch/auto/JPL/Class/extralibs.all
blib/arch/auto/JPL/Class/extralibs.ld perlmain.c tmon.out mon.out
so_locations pm_to_blib *.o *.a perl.exe perl perl Class.bso Class.def
libClass.def Class.exp Class.x core core.*perl.*.? *perl.core core.[0-9]
core.[0-9][0-9] core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9]
core.[0-9][0-9][0-9][0-9][0-9]
mv Makefile Makefile.old > /dev/null 2>&1
+ perl Makefile.PL
Writing Makefile for JPL::Class
+ make install
cp AutoLoader.pm blib/lib/JPL/AutoLoader.pm
cp Class.pm blib/lib/JPL/Class.pm
cp Compile.pm blib/lib/JPL/Compile.pm
Writing
/usr/local/lib/perl5/site_perl/5.8.4/i686-linux/auto/JPL/Class/.packlist
Appending installation info to
/usr/local/lib/perl5/5.8.4/i686-linux/perllocal.pod
Installing PerlInterpreter class
+ cd PerlInterpreter
+ perl Makefile.PL
+ make clean
rm -f libPerlInterpreter.so
rm -f PerlInterpreter.class
+ perl Makefile.PL
+ make install
javac PerlInterpreter.java
javah -jni PerlInterpreter
cc -fpic -Wl,-E -shared -L/usr/local/lib -Dbool=char
-I/usr/local/lib/perl5/5.8.4/i686-linux/CORE
-I/home/hema/j2sdk1.4.1_03/include
-I/home/hema/j2sdk1.4.1_03/include/linux
-I/home/hema/j2sdk1.4.1_03/include/genunix PerlInterpreter.c \
/usr/local/lib/perl5/5.8.4/i686-linux/auto/DynaLoader/DynaLoader.a \
-lc -lm -ldl \
-o libPerlInterpreter.so
mkdir -p /usr/local/lib/i686-linux
cp libPerlInterpreter.so /usr/local/lib/i686-linux
cp PerlInterpreter.class /usr/local/lib
Installing JNI module
+ cd JNI
+ perl Makefile.PL -e
You didn't define KAFFE_PREFIX, so I'm trying a few guesses.
If this fails, and you are using Kaffe, you might want to try
setting KAFFE_PREFIX and running me again.
If you want to ignore any possible Kaffe installation, set the
KAFFE_PREFIX to and empty string.
Found jni.h in /home/hema/j2sdk1.4.1_03/include/
Found jni_md.h in /home/hema/j2sdk1.4.1_03/include/linux/
Found libjava.so javai.lib jvm.lib as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/libjava.so
Found libjvm.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/client/libjvm.so
Found libawt.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/libawt.so
Found libhpi.so as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads/libhpi.so
Looks like native threads...
We're embedding Perl in Java via libPerlInterpreter.so.
Writing Makefile for JNI
+ make clean
rm -rf JNI.c JNI/* JNI ./blib Makefile.aperl
blib/arch/auto/JNI/extralibs.all blib/arch/auto/JNI/extralibs.ld
perlmain.c tmon.out mon.out so_locations pm_to_blib *.o *.a perl.exe perl
perl JNI.bs JNI.bso JNI.def libJNI.def JNI.exp JNI.x core core.*perl.*.?
*perl.core core.[0-9] core.[0-9][0-9] core.[0-9][0-9][0-9]
core.[0-9][0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9][0-9]
mv Makefile Makefile.old > /dev/null 2>&1
+ perl Makefile.PL -e
You didn't define KAFFE_PREFIX, so I'm trying a few guesses.
If this fails, and you are using Kaffe, you might want to try
setting KAFFE_PREFIX and running me again.
If you want to ignore any possible Kaffe installation, set the
KAFFE_PREFIX to and empty string.
Found jni.h in /home/hema/j2sdk1.4.1_03/include/
Found jni_md.h in /home/hema/j2sdk1.4.1_03/include/linux/
Found libjava.so javai.lib jvm.lib as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/libjava.so
Found libjvm.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/client/libjvm.so
Found libawt.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/libawt.so
Found libhpi.so as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads/libhpi.so
Looks like native threads...
We're embedding Perl in Java via libPerlInterpreter.so.
Writing Makefile for JNI
+ make
cp JNI/Config.pm blib/lib/JNI/Config.pm
cp JNI.pm blib/lib/JNI.pm
AutoSplitting blib/lib/JNI.pm (blib/lib/auto/JNI)
/usr/local/bin/perl /usr/local/lib/perl5/5.8.4/ExtUtils/xsubpp -typemap
../../lib/ExtUtils/typemap -typemap typemap JNI.xs > JNI.xsc && mv
JNI.xsc JNI.c
cc -c -I/home/hema/j2sdk1.4.1_03/include/
-I/home/hema/j2sdk1.4.1_03/include/linux/ -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-D_REENTRANT -DEMBEDDEDPERL -O2 -DVERSION=\"0.2\" -DXS_VERSION=\"0.2\"
-fpic "-I../.." JNI.c
Running Mkbootstrap for JNI ()
chmod 644 JNI.bs
rm -f blib/arch/auto/JNI/JNI.so
LD_RUN_PATH="/usr/local/lib/perl5/5.8.4/i686-linux/CORE:/home/hema/j2sdk1.4.1_03/jre/lib/i386:/home/hema/j2sdk1.4.1_03/jre/lib/i386/client:/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads:/usr/local/lib/i686-linux"
cc -shared -L/usr/local/lib JNI.o -o blib/arch/auto/JNI/JNI.so
-L/usr/local/lib/perl5/5.8.4/i686-linux/CORE
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/client/
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads/
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/ -R/usr/local/lib/i686-linux
-L/usr/local/lib/i686-linux -lperl -ljava -ljvm -lhpi -lawt
-lPerlInterpreter
cc: unrecognized option `-R/usr/local/lib/i686-linux'
chmod 755 blib/arch/auto/JNI/JNI.so
cp JNI.bs blib/arch/auto/JNI/JNI.bs
chmod 644 blib/arch/auto/JNI/JNI.bs
Manifying blib/man3/JNI.3
+ echo 'Attempting to install JNI as root'
Attempting to install JNI as root
+ su root -c 'make install'
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Writing /usr/local/lib/perl5/site_perl/5.8.4/i686-linux/auto/JNI/.packlist
Appending installation info to
/usr/local/lib/perl5/5.8.4/i686-linux/perllocal.pod
Installing Sample JPL program
+ cd Sample
+ perl Makefile.PL
+ make clean
rm -f Sample.c Sample.h \
Sample*.class Sample*.pl libSample.so Sample*.java
+ perl Makefile.PL
+ make
perl -MJPL::Compile -e "file('Sample.jpl')"
javac Sample.java
javah -jni Sample
javap -s Sample
perl -c Sample.pl
Sample.pl syntax OK
cc -fpic -Wl,-E -shared -L/usr/local/lib -Dbool=char
-I/usr/local/lib/perl5/5.8.4/i686-linux/CORE
-I/home/hema/j2sdk1.4.1_03/include
-I/home/hema/j2sdk1.4.1_03/include/linux
-I/home/hema/j2sdk1.4.1_03/include/genunix Sample.c \
/usr/local/lib/perl5/5.8.4/i686-linux/CORE/libperl.so \
/usr/local/lib/i686-linux/libPerlInterpreter.so \
-lc -lm -ldl \
-o libSample.so
+ make install
cp *.class /usr/local/lib
cp libSample.so /usr/local/lib/i686-linux
cp Sample.pl /usr/local/perl
Testing Sample...
+ cd Sample
+ JPLDEBUG=1
+ export JPLDEBUG
+ java Sample
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/hema/perl-5.8.4/jpl/Sample/libSample.so:
/usr/local/lib/i686-linux/libPerlInterpreter.so: undefined symbol:
PL_markstack_ptr
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at Sample.<clinit>(Sample.java:47)
Couldn't run Sample
Thanks in advance.
Cordially,
Hema
Confidentiality Notice: The information contained in this e-mail and any attachments may be confidential and/or privileged; please don't copy and/or distribute. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately.Thanks
I am working on Perl with Java. I am calling the perlscript function from
java.While tring out some sample program i am getting the error.Could u
help me out regaring this?
Operating Environment : RedHat Linux 8.0.
>./install-jpl
JPL_SRC = /home/hema/perl-5.8.4/jpl
JAVA_HOME = /home/hema/j2sdk1.4.1_03
You need to decide which directory JPL files are to be installed in.
Applications will look in subdirectories of this directory for any JPL
related files.
You may use the current directory (/home/hema/perl-5.8.4/jpl)
or you may use a directory such as /home/hema/jpl.
Install JPL files where: [/home/hema/perl-5.8.4/jpl] /usr/local
JPL_HOME = /usr/local
Writing setvars...
Starting install...
+ cd JPL
+ perl Makefile.PL
Writing Makefile for JPL::Class
+ make clean
rm -rf ./blib Makefile.aperl blib/arch/auto/JPL/Class/extralibs.all
blib/arch/auto/JPL/Class/extralibs.ld perlmain.c tmon.out mon.out
so_locations pm_to_blib *.o *.a perl.exe perl perl Class.bso Class.def
libClass.def Class.exp Class.x core core.*perl.*.? *perl.core core.[0-9]
core.[0-9][0-9] core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9]
core.[0-9][0-9][0-9][0-9][0-9]
mv Makefile Makefile.old > /dev/null 2>&1
+ perl Makefile.PL
Writing Makefile for JPL::Class
+ make install
cp AutoLoader.pm blib/lib/JPL/AutoLoader.pm
cp Class.pm blib/lib/JPL/Class.pm
cp Compile.pm blib/lib/JPL/Compile.pm
Writing
/usr/local/lib/perl5/site_perl/5.8.4/i686-linux/auto/JPL/Class/.packlist
Appending installation info to
/usr/local/lib/perl5/5.8.4/i686-linux/perllocal.pod
Installing PerlInterpreter class
+ cd PerlInterpreter
+ perl Makefile.PL
+ make clean
rm -f libPerlInterpreter.so
rm -f PerlInterpreter.class
+ perl Makefile.PL
+ make install
javac PerlInterpreter.java
javah -jni PerlInterpreter
cc -fpic -Wl,-E -shared -L/usr/local/lib -Dbool=char
-I/usr/local/lib/perl5/5.8.4/i686-linux/CORE
-I/home/hema/j2sdk1.4.1_03/include
-I/home/hema/j2sdk1.4.1_03/include/linux
-I/home/hema/j2sdk1.4.1_03/include/genunix PerlInterpreter.c \
/usr/local/lib/perl5/5.8.4/i686-linux/auto/DynaLoader/DynaLoader.a \
-lc -lm -ldl \
-o libPerlInterpreter.so
mkdir -p /usr/local/lib/i686-linux
cp libPerlInterpreter.so /usr/local/lib/i686-linux
cp PerlInterpreter.class /usr/local/lib
Installing JNI module
+ cd JNI
+ perl Makefile.PL -e
You didn't define KAFFE_PREFIX, so I'm trying a few guesses.
If this fails, and you are using Kaffe, you might want to try
setting KAFFE_PREFIX and running me again.
If you want to ignore any possible Kaffe installation, set the
KAFFE_PREFIX to and empty string.
Found jni.h in /home/hema/j2sdk1.4.1_03/include/
Found jni_md.h in /home/hema/j2sdk1.4.1_03/include/linux/
Found libjava.so javai.lib jvm.lib as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/libjava.so
Found libjvm.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/client/libjvm.so
Found libawt.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/libawt.so
Found libhpi.so as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads/libhpi.so
Looks like native threads...
We're embedding Perl in Java via libPerlInterpreter.so.
Writing Makefile for JNI
+ make clean
rm -rf JNI.c JNI/* JNI ./blib Makefile.aperl
blib/arch/auto/JNI/extralibs.all blib/arch/auto/JNI/extralibs.ld
perlmain.c tmon.out mon.out so_locations pm_to_blib *.o *.a perl.exe perl
perl JNI.bs JNI.bso JNI.def libJNI.def JNI.exp JNI.x core core.*perl.*.?
*perl.core core.[0-9] core.[0-9][0-9] core.[0-9][0-9][0-9]
core.[0-9][0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9][0-9]
mv Makefile Makefile.old > /dev/null 2>&1
+ perl Makefile.PL -e
You didn't define KAFFE_PREFIX, so I'm trying a few guesses.
If this fails, and you are using Kaffe, you might want to try
setting KAFFE_PREFIX and running me again.
If you want to ignore any possible Kaffe installation, set the
KAFFE_PREFIX to and empty string.
Found jni.h in /home/hema/j2sdk1.4.1_03/include/
Found jni_md.h in /home/hema/j2sdk1.4.1_03/include/linux/
Found libjava.so javai.lib jvm.lib as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/libjava.so
Found libjvm.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/client/libjvm.so
Found libawt.so as /home/hema/j2sdk1.4.1_03/jre/lib/i386/libawt.so
Found libhpi.so as
/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads/libhpi.so
Looks like native threads...
We're embedding Perl in Java via libPerlInterpreter.so.
Writing Makefile for JNI
+ make
cp JNI/Config.pm blib/lib/JNI/Config.pm
cp JNI.pm blib/lib/JNI.pm
AutoSplitting blib/lib/JNI.pm (blib/lib/auto/JNI)
/usr/local/bin/perl /usr/local/lib/perl5/5.8.4/ExtUtils/xsubpp -typemap
../../lib/ExtUtils/typemap -typemap typemap JNI.xs > JNI.xsc && mv
JNI.xsc JNI.c
cc -c -I/home/hema/j2sdk1.4.1_03/include/
-I/home/hema/j2sdk1.4.1_03/include/linux/ -fno-strict-aliasing
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-D_REENTRANT -DEMBEDDEDPERL -O2 -DVERSION=\"0.2\" -DXS_VERSION=\"0.2\"
-fpic "-I../.." JNI.c
Running Mkbootstrap for JNI ()
chmod 644 JNI.bs
rm -f blib/arch/auto/JNI/JNI.so
LD_RUN_PATH="/usr/local/lib/perl5/5.8.4/i686-linux/CORE:/home/hema/j2sdk1.4.1_03/jre/lib/i386:/home/hema/j2sdk1.4.1_03/jre/lib/i386/client:/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads:/usr/local/lib/i686-linux"
cc -shared -L/usr/local/lib JNI.o -o blib/arch/auto/JNI/JNI.so
-L/usr/local/lib/perl5/5.8.4/i686-linux/CORE
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/client/
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/native_threads/
-L/home/hema/j2sdk1.4.1_03/jre/lib/i386/ -R/usr/local/lib/i686-linux
-L/usr/local/lib/i686-linux -lperl -ljava -ljvm -lhpi -lawt
-lPerlInterpreter
cc: unrecognized option `-R/usr/local/lib/i686-linux'
chmod 755 blib/arch/auto/JNI/JNI.so
cp JNI.bs blib/arch/auto/JNI/JNI.bs
chmod 644 blib/arch/auto/JNI/JNI.bs
Manifying blib/man3/JNI.3
+ echo 'Attempting to install JNI as root'
Attempting to install JNI as root
+ su root -c 'make install'
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Writing /usr/local/lib/perl5/site_perl/5.8.4/i686-linux/auto/JNI/.packlist
Appending installation info to
/usr/local/lib/perl5/5.8.4/i686-linux/perllocal.pod
Installing Sample JPL program
+ cd Sample
+ perl Makefile.PL
+ make clean
rm -f Sample.c Sample.h \
Sample*.class Sample*.pl libSample.so Sample*.java
+ perl Makefile.PL
+ make
perl -MJPL::Compile -e "file('Sample.jpl')"
javac Sample.java
javah -jni Sample
javap -s Sample
perl -c Sample.pl
Sample.pl syntax OK
cc -fpic -Wl,-E -shared -L/usr/local/lib -Dbool=char
-I/usr/local/lib/perl5/5.8.4/i686-linux/CORE
-I/home/hema/j2sdk1.4.1_03/include
-I/home/hema/j2sdk1.4.1_03/include/linux
-I/home/hema/j2sdk1.4.1_03/include/genunix Sample.c \
/usr/local/lib/perl5/5.8.4/i686-linux/CORE/libperl.so \
/usr/local/lib/i686-linux/libPerlInterpreter.so \
-lc -lm -ldl \
-o libSample.so
+ make install
cp *.class /usr/local/lib
cp libSample.so /usr/local/lib/i686-linux
cp Sample.pl /usr/local/perl
Testing Sample...
+ cd Sample
+ JPLDEBUG=1
+ export JPLDEBUG
+ java Sample
Exception in thread "main" java.lang.UnsatisfiedLinkError:
/home/hema/perl-5.8.4/jpl/Sample/libSample.so:
/usr/local/lib/i686-linux/libPerlInterpreter.so: undefined symbol:
PL_markstack_ptr
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1473)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:832)
at Sample.<clinit>(Sample.java:47)
Couldn't run Sample
Thanks in advance.
Cordially,
Hema
Confidentiality Notice: The information contained in this e-mail and any attachments may be confidential and/or privileged; please don't copy and/or distribute. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately.Thanks