building (or not) OpenJDK 7 on Mac OS X

Andrew John Hughes gnu_andrew at
Thu Dec 10 17:05:30 UTC 2009

2009/12/10 Ray Kiddy <ray at>:
> I just wanted to update build people on this issue. There are pages on the
> wiki for building on Mac OS X 10.5.8 and on Snow Leopard. See the "Building
> from source" section of I have
> updated with information
> from an external post of Landon Fuller's. (FYI, I checked with him about the
> copying and he was ok with it.) Since I am not using Snow Leopard, I am
> leaving that page to someone else.
> If anyone _can_ build OpenJDK 1.7 on a 10.5 system, please share information
> about how they this is accomplished. I particularly like the way Landon
> structured his page. For each separate requirement, the page says "you need
> this", then "do this (or this or this)", and then "if that worked, you
> will/should see this." I have been working with other build system, such as
> for Mozilla, and the doc often leaves out that last step. So, if someone can
> build, can they report what they do and what they then see? I am willing to
> share my build logs (, but at this
> point I can only demonstrate how not to succeed. Unfortunately, it is easy
> to find info from people like me, who cannot build. Is it just that the
> people who can build are silent?
> It would be great if, one day, we could go to
> and see Mac OS X binaries to install from
> there, in addition to the Solaris and Linux binaries. Making the BSD-Port
> more generally buildable will probably help that. As the largest installed
> base of Unix systems on the planet, Mac OS X can help the OpenJDK effort if
> there is some support.
> Please post or update the wiki with any suggestions or questions.
> cheers - ray
>        refs:
>        FYI, my particular build error is this. I suspect I am missing some
> minor little environment variable, but it is not obvious which. -rrk
> /bin/mkdir -p
> /Users/ray/Projects/OpenJDK/bsd-port/build/bsd-i586/tmp/java/java.lang/java/obj
> rm -f
> /Users/ray/Projects/OpenJDK/bsd-port/build/bsd-i586/tmp/java/java.lang/java/obj/.class.headers.i586
> # Running javah:
> /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries/bsd-i586/bin/javah
> -bootclasspath /Users/ray/Projects/OpenJDK/bsd-port/build/bsd-i586/classes
> -d
> /Users/ray/Projects/OpenJDK/bsd-port/build/bsd-i586/tmp/java/java.lang/java/CClassHeaders/
> \
>                java.lang.Object java.lang.Class java.lang.Compiler
> java.lang.String java.lang.Thread java.lang.ThreadGroup java.lang.StrictMath
> java.lang.Number java.lang.Byte java.lang.Short java.lang.Integer
> java.lang.Long java.lang.Float java.lang.Double java.lang.Boolean
> java.lang.Character java.lang.System java.lang.ClassLoader java.lang.Runtime
> java.lang.SecurityManager java.lang.Shutdown java.lang.Package
> java.lang.ref.Finalizer java.lang.reflect.AccessibleObject
> java.lang.reflect.Field java.lang.reflect.Method
> java.lang.reflect.Constructor java.lang.reflect.InvocationTargetException
> java.lang.reflect.Array java.lang.reflect.Proxy
> java.util.Date java.util.TimeZone
> java.util.ResourceBundle java.util.concurrent.atomic.AtomicLong
> java.util.prefs.FileSystemPreferences
> java.lang.Throwable java.lang.NoClassDefFoundError
> java.lang.StringIndexOutOfBoundsException java.lang.OutOfMemoryError
> sun.misc.Version sun.misc.VM sun.misc.VMSupport sun.misc.Signal
> sun.misc.MessageUtils sun.misc.NativeSignalHandler sun.misc.GC
> sun.reflect.ConstantPool sun.reflect.NativeConstructorAccessorImpl
> sun.reflect.NativeMethodAccessorImpl sun.reflect.Reflection
> java.lang.ClassLoader\$NativeLibrary
> make[4]: /NOT-SET/re/jdk/1.7.0/promoted/latest/binaries/bsd-i586/bin/javah:
> Command not found
> make[4]: ***
> [/Users/ray/Projects/OpenJDK/bsd-port/build/bsd-i586/tmp/java/java.lang/java/obj/.class.headers.i586]
> Error 127
> make[3]: *** [all] Error 1
> make[2]: *** [all] Error 1
> make[1]: *** [jdk-build] Error 2
> make: *** [build_product_image] Error 2

Sounds like a bug from b74.  Is your bsd-port tree up-to-date?

You can work around it by setting ALT_JDK_IMPORT_PATH to the same as
ALT_BOOTDIR but you shouldn't need to do so generally.
Andrew :-)

Free Java Software Engineer
Red Hat, Inc. (

Support Free Java!
Contribute to GNU Classpath and the OpenJDK

PGP Key: 94EFD9D8 (
Fingerprint: F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8

More information about the build-dev mailing list