Missing libraries

Ugo Kanain ugokanain at newsguy.com
Sun Jan 17 17:10:43 PST 2010


Mike,
I'm still having trouble. I am using the following build command, but  
something is wrong (obviously :) Did add the lc rpath (LC_RPATH=~/bsd- 
port/build/bsd-ppc/j2sdk-image/jre/lib/ppc)

I am getting this error:
Error occurred during initialization of VM
Unable to load native library: dlopen(~/bsd-port/build/bsd-ppc/j2sdk- 
image/jre/lib/ppc/libjava.dylib, 1): Library not loaded: libjvm.dylib
  Referenced from: ~/bsd-port/build/bsd-ppc/j2sdk-image/jre/lib/ppc/ 
libjava.dylib



LC_ALL=C
LANG=C
unset CLASSPATH
unset JAVA_HOME
sudo make \
CC=gcc-4.0 \
CXX=g++-4.0 \
SYS_CFLAGS="" LANG="C" JAVA_HOME="" CLASSPATH="" \
LD_LIBRARY_PATH="" MAKEFLAGS="" SKIP_COMPARE_IMAGES="YES" \
ALT_BOOTDIR=/Volumes/Alternate/openjdk7_boot \
ALT_BINARY_PLUGS_PATH=/opt/local/share/java/icedtea6-plugs \
ALT_FREETYPE_HEADERS_PATH=/usr/X11R6/include \
ALT_FREETYPE_LIB_PATH=/usr/X11R6/lib \
ALT_JIBX_LIBS_PATH=/opt/local/share/java/jibx/lib \
ALT_MOTIF_DIR=/opt/local \
LC_RPATH=~/bsd-port/build/bsd-ppc/j2sdk-image/jre/lib/ppc \
DARWIN_SDK=/Developer/SDKs/MacOSX10.5u.sdk \
ALT_DEVTOOLS_PATH=/usr ALT_CUPS_HEADERS_PATH=/usr/include \
ALT_CACERTS_FILE=/System/Library/Frameworks/JavaVM.framework/Home/lib/ 
security/cacerts \
LIBFFI_CFLAGS="-I/usr/include/ffi" \
ANT_HOME=/usr/share/ant \
NO_DOCS=true \
HOTSPOT_BUILD_JOBS=1 PARALLEL_BUILD_JOBS=1 \
BUILD_DEPLOY="false" \
ZERO_BUILD=true \
ZERO_ENDIANNESS=big \
ZERO_LIBARCH=ppc \
ZERO_ARCHDEF=PPC \
ZERO_ARCHFLAG=-m32




On 13 Jan 2010, at 11:22 , Mike Swingler wrote:

> OpenJDK right now uses DYLD_LIBRARY_PATH as a way to tell the Mac OS  
> X dynamic linker (dyld) where to find it's libraries by first name  
> only, and not by the full "install_path" in their Mach-o headers. To  
> avoid using DYLD_LIBRARY_PATH, the libraries need to be linked with  
> an install_path that starts with @rpath, and the primary entry  
> points into the libraries need to add LC_RPATH directives that push  
> @loader_path relative locations onto the @rpath search stack. Once  
> this has been accomplished, the built JDK will be able to launch and  
> find it's own linked libraries without having to rely on the  
> DYLD_LIBRARY_PATH environment variable.




More information about the bsd-port-dev mailing list