

I was able to find the latest source code for ld64 at, but the build system is Xcode, which I don’t have In the linking process, and the linker was complaining -no_deduplicate was an unknow option. By passing -v option, I was able to locate the error to be Trying it manually on the command line, I could confirm that it’s indeed not working. The verbose log, I found that my clang-5 can’t compiler the following trivial C program: 1

After unpacking andĪdding it into my PATH, I restarted with bash configure which failed complaining that the C compiler (clang-5) can’t build executable. §Using clang-5 binary with hacky linkerĪll of the sudden, I realized that I actually can try downloading the binary directly from. It seems that OpenJDK doesn’t support compilers on Mac Some googling indicates that -mstack-alignment is specific to clang. gcc-7 was indeed used, but failed with errors like “gcc-7: error: unrecognized command line option Since I have a working gcc-7, I thought I could tell OpenJDK to use gcc instead of clang: CC=gcc-7 CXX=g++-7 bash configure -with-toolchain-type=gcc. (Possibly, my setup is too weird.) §Building OpenJDK using gcc-7 Google concerning the error message, error: storage class specified., but didn’t find anything useful.
#Xcode for mac 10.9 install
Installing llvm via brew install -cc=gcc-7 llvm, which surprisingly failed on building libunwind, a runtime dependency of llvm. If gcc could be installed: brew install gcc worked fortunately, making gcc-7 available on my box, so I tried to specify it as the C compiler on Since I have Homebrew, the easiest way to install clang-5 is brew install llvm, which failed because of my obsolete clang (of course). Apparently, this option wasn’tĪpple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) bash configure works fine however, the build failed when IĬall make, and the error is something like error: unknown warning option '-Wno-tautological-undefined-compare'. Since Xcode command line is already installed for me, I should be able to build OpenJDK. Library/Developer/CommandLineTools/usr/bin/clang somehow, and it would crash if it’s not found. A quick experiment (renaming) reveals that /usr/bin/clang calls Library/Developer/CommandLineTools/usr/bin/clang. I don’t know what’s the relation between /usr/bin/clang and (I was firstly a bit confused because which clang gives me Provides the real executables for development related tools, e.g. On my box, it’s installed at /Library/Developer/CommandLineTools, which On Mac, it’s recommended to use Xcode command line to build OpenJDK. The most import doc I followed in the process is, even though it contains a lot ofīash configure -disable-warnings-as-errors -with-jtreg= What an arduous journey I put myself onto. Being someone who is mostly coding on Linux, I was surely unaware of Due to reasons, I have to set up the dev environment on my Mac 10.9 for OpenJDK.
