

Erlang Doesn't Compile From Source on Lion + XCode4 - jabo
http://jasonbos.co/initial-thoughts-on-mac-os-x-lion

======
metajack
There's a workaround on the mailing list: [http://erlang.org/pipermail/erlang-
questions/2011-July/06017...](http://erlang.org/pipermail/erlang-
questions/2011-July/060177.html)

~~~
jabo
Tried CFLAGS=-O0 ./configure --enable-darwin-64bit like the posts suggested,
but it didn't work for me.

ld: warning: ignoring file
../otp_src_R14B03/erts/emulator/zlib/obj/i386-apple-darwin11.0.0/opt/libz.a,
file was built for archive which is not the architecture being linked (x86_64)
ld: warning: ignoring file
../otp_src_R14B03/erts/emulator/pcre/obj/i386-apple-
darwin11.0.0/opt/libepcre.a, file was built for archive which is not the
architecture being linked (x86_64) Undefined symbols for architecture
x86_64:...

~~~
jabo
I had to run those commands on a fresh copy of the source and it worked fine
this time. [http://erlang.org/pipermail/erlang-
questions/2011-July/06020...](http://erlang.org/pipermail/erlang-
questions/2011-July/060206.html). Apparently, "make clean" doesn't clean up
everything and so that's why the commands wouldn't work earlier.

------
msbarnett
XCode 4's default compiler is /usr/bin/gcc, which is gcc-llvm.

Erlang does compile on Lion if you use gcc 4.2.1 instead (it's installed at
/usr/bin/gcc-4.2, or use something like homebrew with the --use-gcc option)

