I'm trying to build R14B03 under OS X Lion. (Xcode v4.1). I'm getting
the following error:
--------------------------------------------------
=== Entering application hipe
(cd ../main && make hipe.hrl)
sed -e "s;%VSN%;3.8;" ../../hipe/main/hipe.hrl.src > ../../hipe/main/hipe.hrl
erlc -W +debug_info +inline -o../ebin hipe_rtl.erl
(no error logger present) error: "Error in process <0.1.0> with exit
value: {{badfun,[<<5 bytes>>,<<47 bytes>>,<<9 bytes>>,<<3 bytes>>,<<2
bytes>>,<<5 bytes>>,<<12 bytes>>,<<2 bytes>>,<<8 bytes>>,<<8
bytes>>,<<5 bytes>>,<<7 bytes>>,<<5 bytes>>,<<11 bytes>>,<<2
bytes>>,<<11 bytes>>,<<15 bytes>>,<<4 bytes>>,<<50 bytes>>,<<5
bytes>>,<<1 byte>>,<<7 bytes>>,<<10 bytes>>,<<7 bytes>>,<<6
bytes>>,<<7 bytes>>,<<7 bytes>>,<<6 bytes>>,<<12
bytes>>]},[{erlang,apply,2}]}\n"
--------------------------------------------------
People using homebrew seem to have the same issue:
https://github.com/mxcl/homebrew/issues/2713
They say to use --use-gcc when running ./configure. I've tried this
but it didn't change the error. Can somebody help me with this?
Thanks!
-Sean
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
D.
{snip}
On Fri, Jul 22, 2011 at 11:37 PM, Dave Smith <diz...@dizzyd.com> wrote:
> If you want to compile Erlang w/ clang-llvm on 10.6 (or above) do
> this: CFLAGS=-O0 ./configure ...
>
Thanks Dave. That got me a lot further. But I'm still getting the
following errors:
------------------------------------------------------------------------------------------------------------------
gcc -O0 -no-cpp-precomp -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wnested-externs -Winline -fno-strict-aliasing
-I. -I../include -Iconnect -Iencode -Idecode -Imisc -Iepmd -Iregistry
-Ii386-apple-darwin11.0.0 -Ilegacy -D_THREAD_SAFE -D_REENTRANT
-DPOSIX_THREADS -m32 -o
/Users/mosko/Downloads/otp_src_R14B03/lib/erl_interface/bin/i386-apple-darwin11.0.0/erl_call
prog/erl_call.c prog/erl_start.c \
-L/Users/mosko/Downloads/otp_src_R14B03/lib/erl_interface/obj/i386-apple-darwin11.0.0
-lei -lpthread
ld: warning: ignoring file
/Users/mosko/Downloads/otp_src_R14B03/lib/erl_interface/obj/i386-apple-darwin11.0.0/libei.a,
file was built for archive which is not the architecture being linked
(i386)
Undefined symbols for architecture i386:
"_ei_gethostbyname", referenced from:
_main in ccO2Es4f.o
_do_connect in ccO2Es4f.o
"_ei_connect_xinit", referenced from:
_main in ccO2Es4f.o
"___erl_errno_place", referenced from:
_main in ccO2Es4f.o
"_ei_thishostname", referenced from:
_main in ccO2Es4f.o
_exec_erlang in cc6g0Be0.o
"_ei_connect", referenced from:
_main in ccO2Es4f.o
_do_connect in ccO2Es4f.o
"_ei_encode_list_header", referenced from:
_main in ccO2Es4f.o
"_ei_x_new_with_version", referenced from:
_main in ccO2Es4f.o
"_ei_rpc", referenced from:
_main in ccO2Es4f.o
"_ei_x_free", referenced from:
_main in ccO2Es4f.o
"_ei_encode_string", referenced from:
_main in ccO2Es4f.o
"_ei_encode_binary", referenced from:
_main in ccO2Es4f.o
"_ei_encode_atom", referenced from:
_main in ccO2Es4f.o
"_ei_print_term", referenced from:
_main in ccO2Es4f.o
"_ei_x_new", referenced from:
_main in ccO2Es4f.o
"_ei_x_format_wo_ver", referenced from:
_main in ccO2Es4f.o
"_ei_gethostbyname_r", referenced from:
_get_addr in cc6g0Be0.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
make[4]: *** [/Users/mosko/Downloads/otp_src_R14B03/lib/erl_interface/bin/i386-apple-darwin11.0.0/erl_call]
Error 1
make[3]: *** [opt] Error 2
make[2]: *** [opt] Error 2
make[1]: *** [opt] Error 2
make: *** [libs] Error 2
------------------------------------------------------------------------------------------------------------------
Any ideas on this one? I should add, Lion was an upgrade (from Snow
Leopard), not a new install.
Thanks!
D.
Thanks a lot Dave. That solved the problem!
ld: warning: ignoring file /Users/abcd/Downloads/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 /Users/abcd/Downloads/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:...
Jason
I don't know but I was able to build by using Xcode (4.1) and that
command on Lion. Actually I wanted SSL so I added --with-ssl. Did you
try building before you added those flags? You might need to clean out
the source directory first.
It should.
However, it doesn't. Has been broken for years.
The makefiles for Erlang/OTP are not particularly good. Hasn't bothered me enough to fix though since you normally only build once.
Cheers,
Daniel