[libinline-java-perl] 195/398: ok
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit 4c9078f26edb931a536ff413eb9b931be78b75a5
Author: patrick_leb <>
Date: Thu Apr 4 13:37:22 2002 +0000
ok
---
Java/Makefile.PL | 2 +-
README.JNI | 90 ++++++++++++++++++++++++++++++++++++++++----------------
2 files changed, 66 insertions(+), 26 deletions(-)
diff --git a/Java/Makefile.PL b/Java/Makefile.PL
index 15a9166..111fddb 100644
--- a/Java/Makefile.PL
+++ b/Java/Makefile.PL
@@ -97,7 +97,7 @@ if (($build_jni || AskYN("Do you wish to build the JNI extension?"))){
VERSION_FROM => 'JNI.pm',
INC => "-I" . $files->{'jni.h'}->{selected} . " -I" . $files->{'jni_md.h'}->{selected},
LIBS => ["-L" . $files->{$jvm_lib}->{selected} . " -ljvm"],
- CCFLAGS => '-D_REENTRANT',
+ # CCFLAGS => '-D_REENTRANT',
) ;
print
diff --git a/README.JNI b/README.JNI
index e91628a..020f469 100644
--- a/README.JNI
+++ b/README.JNI
@@ -60,10 +60,21 @@ be related to the main thread waiting for other threads to terminate.
Java 2 SDK 1.3.1:
The JNI extension runs without problems with this Java 2 SDK, provided
-that you add the proper version of libpthread.so to your LD_PRELOAD
-environment variable. On my test system this was /lib/i686/libpthread.so.0
-You can also rebuild Perl and add that library in front of all others.
- Also, make sure you use do not use 'classic' VM. This one should only
+that you do one of the following:
+
+1- Rebuild perl and add the libpthread library in front of all other
+ libraries (see the 'BUILDING PERL' section below). You should also
+ use your system's malloc (not perl's).
+ This is the recommended solution.
+
+2- Add the proper version of libpthread.so to your LD_PRELOAD environment
+ variable. On my test system this was /lib/i686/libpthread.so.0.
+ This solution seems viable but thread related crashes/hang-ups have
+ been reported on some systems. If make crashes while running the test
+ suite, try running it like this:
+ % for i in `ls t/*.t` ; do perl -Mblib $i; done
+
+Also, make sure you use do not use 'classic' VM. This one should only
be used with 'green threads', which don't seem to work with JNI. Use either
the 'client' or the 'server' VMs.
@@ -71,29 +82,58 @@ the 'client' or the 'server' VMs.
SOLARIS
-------
Java 2 SDK 1.2.2:
- The JNI extension has been run successfully with this Java 2 SDK,
-provided that you add the proper version of libthread.so to your LD_PRELOAD
-environment variable. On my test system this was /lib/libthread.so. You can
-also rebuild Perl and add that library in front of all others. On some
-occasions thread related crashes have been seen while running the test suite,
-but they seemed to come from make and not from the test suite per se.
-Running the test suite like this:
- % for i in `ls t/*.t` ; do perl -Mblib $i; done
-was fine.
+ The JNI extension runs without problems with this Java 2 SDK, provided
+that you do one of the following:
+
+1- Rebuild perl and add the libthread library in front of all other
+ libraries (see the 'BUILDING PERL' section below). You should also
+ use gcc and your system's malloc (not perl's).
+ This is the recommended solution.
+
+2- Add the proper version of libthread.so to your LD_PRELOAD environment
+ variable. On my test system this was /lib/libthread.so.
+ This solution seems viable but thread related crashes/hang-ups have
+ been reported on some systems. If make crashes while running the test
+ suite, try running it like this:
+ % for i in `ls t/*.t` ; do perl -Mblib $i; done
Java 2 SDK 1.3.1:
- The JNI extension has been run successfully with this Java 2 SDK,
-provided that you add the proper version of libthread.so to your LD_PRELOAD
-environment variable. On my test system this was /lib/libthread.so. You can
-also rebuild Perl and add that library in front of all others. On some
-occasions thread related crashes have been seen while running the test suite,
-but they seemed to come from make and not from the test suite per se.
-Running the test suite like this:
- % for i in `ls t/*.t` ; do perl -Mblib $i; done
-was fine.
-
-Note: These results where achieved with Perl 5.6.1 complied with gcc
-and using the native malloc.
+ The JNI extension runs without problems with this Java 2 SDK, provided
+that you do one of the following:
+
+1- Rebuild perl and add the libthread library in front of all other
+ libraries (see the 'BUILDING PERL' section below). You should also
+ use gcc and your system's malloc (not perl's).
+ This is the recommended solution.
+
+2- Add the proper version of libthread.so to your LD_PRELOAD environment
+ variable. On my test system this was /lib/libthread.so.
+ This solution seems viable but thread related crashes/hang-ups have
+ been reported on some systems. If make crashes while running the test
+ suite, try running it like this:
+ % for i in `ls t/*.t` ; do perl -Mblib $i; done
+
+
+BUILDING PERL
+-------------
+Here's how to rebuild Perl to get the JNI extension to work properly:
+
+- Use all the defaults or whatever makes sense, but no threaded Perl
+ and no interpreter threads, i.e.:
+
+ Build a threading Perl? [n] n
+ Build Perl for multiplicity? [n] n
+
+- When asked what libraries to use, type -lthread (Solaris) or -lpthread
+ (Linux) and tack on whatever the default is at the end, i.e.:
+
+ What libraries to use? -> [-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt
+ -lutil] -lpthread -lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
+ (under Linux it's -lpthread, but for Solaris it's -lthread)
+
+- Make sure that you do not use perl's own malloc, i.e.:
+
+ Do you wish to attempt to use the malloc that comes with perl5? -> [n] n
RUNNING Inline::Java WITH THE JNI EXTENSION
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list