Does the jdk repository contain the changeset of the LD_LIBRARY_PATH change? If not, you might need to pull that changeset to your repository and recompile the jdk. I am ccing Kumar and he might be able to help.
-Xiaobin Mahmood Ali wrote: > Greetings, > > First, thank you very much for your efforts on porting the OpenJDK to Mac OS > X. > > First, I have successfully compiled the bsd-port on my machine. > However, I'm having some difficulty running the JVM, when I run the > compiler, I get the following error: > > $ build/bsd-amd64/j2sdk-image/bin/java -version > Error occurred during initialization of VM > Unable to load native library: > dlopen(/Users/mahmood/tmp/openjdk-7/bsd-port/build/bsd-amd64/j2sdk-image/jre/lib/amd64/libjava.dylib, > 1): Library not loaded: libjvm.dylib > Referenced from: > /Users/mahmood/tmp/openjdk-7/bsd-port/build/bsd-amd64/j2sdk-image/jre/lib/amd64/libjava.dylib > Reason: image not found > > Setting DYLD_LIBRARY_PATH environment variable seem to fix the problem: > > $ DYLD_LIBRARY_PATH=build/bsd-amd64/j2sdk-image/jre/lib/amd64/server > build/bsd-amd64/j2sdk-image/bin/java -version > openjdk version "1.7.0-internal" > OpenJDK Runtime Environment (build > 1.7.0-internal-mahmood_2010_01_04_15_39-b00) > OpenJDK 64-Bit Server VM (build 17.0-b05, mixed mode) > > Last time I compiled the OpenJDK (around mid december), I didn't need > to initialize that variable. I noticed that on Nov 20, there was a > change that removed LD_LIBRARY_PATH from the jdk launcher project: > > changeset: 2048:de45eac5670e > user: ksrini > date: Fri Nov 20 11:01:32 2009 -0800 > files: make/java/jli/Makefile make/java/main/java/Makefile > make/java/redist/Makefile src/share/bin/java.c > src/solaris/bin/java_md.c test/tools/launcher/Arrrghs.java > test/tools/launcher/ExecutionEnvironment.java > test/tools/launcher/SolarisDataModel.sh > test/tools/launcher/SolarisRunpath.sh > test/tools/launcher/TestHelper.java > test/tools/launcher/libraryCaller.c > test/tools/launcher/libraryCaller.h > test/tools/launcher/libraryCaller.java > description: > 6367077: Purge LD_LIBRARY_PATH usage from the launcher > 6899834: (launcher) remove the solaris libjvm.so symlink > Summary: Fixes other related issues as well. > Reviewed-by: darcy, ohair, xlu, martin > > However, I cannot detect when such change was pushed to the bsd-port. > Can you please advice how I should go forward preferably, without > setting DYLD_LIBRARY_PATH env variable? > > Also a couple of points: > > 1. Finding the instructions was a bit tedious, if using Google. > Googling the information returned outdated instructions that required > JIXB. Luckily, I came across the wiki, and saw the linkage to java > rant instructions > (http://www.javarants.com/2009/11/01/building-openjdk-1-7-0-for-mac-os-x-10-6-snow-leopard/). > > 2. Can you please elaborate on why "There may be no way to get > pre-built binaries for installation of OpenJDK on Mac OS X."? How > would that be different from the binaries hosted by Soylatte? I'm > planning to host my binaries online if possible. > > Thank you very much again. > > Regards, > Mahmood > >