<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 20, 2011, at 11:07 AM, Greg Lewis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; "><blockquote type="cite">+JVMLIB = -Xlinker -rpath -Xlinker $(LIBDIR)/$(LIBARCH)/$(VM_NAME) -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm<br></blockquote></span></span><br class="Apple-interchange-newline"></blockquote></div><br><div>Normally you would not bake in a runpath/rpath directly to a particular JVM library instance.</div><div>It's not unusual to have shared libraries with a dependency on JVM but not have a runpath/rpath</div><div>directory that includes the JVM. This is normal.</div><div>The JVM library instances are usually the ones that dlopen/LoadLibrary these other shared libraries.</div><div>Since there are multiple JVM instances, you need to let the JVM drive, so to speak.</div><div><br></div><div>So for example, on Solaris you would see:</div><div><br></div><div>svc6<821> ldd /opt/java/jdk1.7.0/jre/lib/i386/libjava.so<br> libjvm.so => (file not found) <------------------------------<br> libverify.so => /opt/java/jdk1.7.0-b134/jre/lib/i386/libverify.so<br> libsocket.so.1 => /lib/libsocket.so.1<br> libnsl.so.1 => /lib/libnsl.so.1<br> libdl.so.1 => /lib/libdl.so.1<br> libc.so.1 => /lib/libc.so.1<br> libjvm.so => (file not found)<br> libmp.so.2 => /lib/libmp.so.2<br> libmd.so.1 => /lib/libmd.so.1<br> libscf.so.1 => /lib/libscf.so.1<br> libuutil.so.1 => /lib/libuutil.so.1<br> libgen.so.1 => /lib/libgen.so.1<br> libsmbios.so.1 => /usr/lib/libsmbios.so.1<br> libm.so.2 => /lib/libm.so.2</div><div><br></div><div>You would need to do this:<br> ( setenv LD_LIBRARY_PATH /opt/java/jdk1.7.0-b134/jre/lib/i386/server && ldd /opt/java/jdk1.7.0/jre/lib/i386/libjava.so )</div><div>to get utilities like ldd to find libjvm.so.<br><br></div><div><br></div><div>-kto</div><div><br></div></body></html>