Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invoking JVM from C++ on Linux: missing libverify.so

843829Aug 12 2003 — edited Oct 5 2004
Hi all,

I've come across a rather unusual stumbling block while trying to create a native Linux executable that starts the JVM. While the native code compiles without difficulty, when I try to run it I get a weird fault:

./server: error while loading shared libraries: libverify.so: cannot open shared object file: No such file or directory

True enough, when I run ldd over the executable, the following output is generated:

libjvm.so => /opt/j2sdk1.4.2/jre/lib/i386/client/libjvm.so (0x40026000)
* libverify.so => not found
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4044b000)
libm.so.6 => /lib/libm.so.6 (0x40503000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40526000)
libc.so.6 => /lib/libc.so.6 (0x4052e000)
libnsl.so.1 => /lib/libnsl.so.1 (0x40661000)
libdl.so.2 => /lib/libdl.so.2 (0x40676000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40679000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

But when I run ldconfig -p, libverify.so is listed, albeit with a rather strange field, 'hwcap':

libverify.so (libc6, hwcap: 0x1000000000000) => /opt/j2sdk1.4.2/jre/lib/i386/libverify.so

The command used to build the executable:

g++ server.cc -o server -I /opt/j2sdk1.4.2/include -I /opt/j2sdk1.4.2/include/linux -L /opt/j2sdk1.4.2/jre/lib/i386/client/ -L /opt/j2sdk1.4.2/jre/lib/i386/ -ljvm -lverify -g

on SuSE Linux 8.2, with GCC 3.3

If anyone can shed any light on this, it'd be greatly appreciated.

Cheers,

Danny.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 2 2004
Added on Aug 12 2003
2 comments
652 views