In the last episode (Jun 13), David Gourdelier said:
Dan Nelson wrote:
In the last episode (Jun 13), David Gourdelier said:
Looks like there is a problem with Pike's configure and Java. I have the latest JRE and Pike's configure says:
configure:3922: checking if the JVM really works configure:4005: gcc -o conftest -g -I.
[etc]
configure:4010: ./conftest ./conftest: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
That compile test should have gone through smartlink, which would have translated those -R flags into something your linker understands. All the linux pikefarm builds look like they use smartlink correctly. Are you disabling it in your build?
I only did a configure (with --with-cdebug) in the src directory of the CVS tree and a make in the upper directory gives the same result. I also have the same problem under FreeBSD. Actually how to disable smartlink ?
On a closer look, it doesn't seem possible to remove smartlink. It should always be used.
I did a little debugging on my FreeBSD box, and the rpath values do get built into the test binary and are used for the libraries explicitly linked into the executable. Dependencies requested by those shlibs don't use the rpath, though. I don't know if this is expected behaviour or not. If the executable's rpath should apply to second-level dependencies, it's a runtime linker bug. If they aren't, it's a bug in the jvm libraries because they don't specifiy their own rpath. Or are you supposed to always set LD_LIBRARY_PATH when running stuff linked with java libraries?
$ objdump -p conftest | grep RPATH RPATH /usr/local/jdk1.4.2/jre/lib/i386:/usr/local/jdk1.4.2/jre/lib/i386/ native_threads:/usr/local/jdk1.4.2/jre/lib/i386/server:/usr/local/jdk1.4.2/jre/l ib/i386/client:/usr/tmp/pike/build/freebsd-5.2-current-i386/bundles/lib:/usr/loc al/lib:/usr/X11R6/lib $ ldd -a conftest /tmp/conftest: libzip.so => /usr/local/jdk1.4.2/jre/lib/i386/libzip.so (0x2807b000) libjava.so => /usr/local/jdk1.4.2/jre/lib/i386/libjava.so (0x28093000) libjvm.so => /usr/local/jdk1.4.2/jre/lib/i386/server/libjvm.so (0x280b2000) libm.so.2 => /lib/libm.so.2 (0x2871a000) libcrypt.so.2 => /lib/libcrypt.so.2 (0x28733000) libhpi.so => /usr/local/jdk1.4.2/jre/lib/i386/native_threads/libhpi.so (0x2874c000) libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28756000) libc.so.5 => /lib/libc.so.5 (0x28778000) /usr/local/jdk1.4.2/jre/lib/i386/libzip.so: libjvm.so => not found (0x0) libjava.so => not found (0x0) libpthread.so.1 => /usr/lib/libc_r.so.5 (0x28756000) /usr/local/jdk1.4.2/jre/lib/i386/libjava.so: libjvm.so => not found (0x0) libverify.so => not found (0x0) libpthread.so.1 => /usr/lib/libc_r.so.5 (0x28756000) /usr/local/jdk1.4.2/jre/lib/i386/server/libjvm.so: libpthread.so.1 => /usr/lib/libc_r.so.5 (0x28756000) libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x28845000) libm.so.2 => /lib/libm.so.2 (0x2871a000) /usr/local/jdk1.4.2/jre/lib/i386/native_threads/libhpi.so: libpthread.so.1 => /usr/lib/libc_r.so.5 (0x28756000) /usr/lib/libstdc++.so.4: libm.so.2 => /lib/libm.so.2 (0x2871a000)