[erlang-bugs] Problem compiling --enable-darwin-64bit on Mac OS X

Bob Ippolito <>
Fri Feb 8 20:24:59 CET 2008


I received this information about building 64-bit on Mac OS X from Ian
P. Cardenas:

I got everything to build using
./configure --enable-smp-support --enable-hipe  --enable-darwin-64bit
--with-gd=/usr/local --enable-kernel-poll

Problems I had:

orber has an 'file is not of required architecture' bug
workaround: add $(ALL_CFLAGS) in
lib/orber/c_src/i386-apple-darwin9.1.0/Makefile for target that
includes obj_init_port

odbc doesn't build unless you include --enable-darwin-64bit

--with-gd doesn't produce a valid flag in the makefile for percept
workaround: edit GD_LIBDIR = -L/usr/local/lib in
lib/percept/c_src/i386-apple-darwin9.1.0/Makefile


Now if only I could get the hipe patch to work :P

Thanks,
 Ian


On Feb 7, 2008 2:39 PM, Bob Ippolito <> wrote:
> Using the source from otp_src_R12B-1.tar.gz I'm unable to compile a
> 64-bit Darwin build.
>
> $ sw_vers
> ProductName:    Mac OS X
> ProductVersion: 10.5.1
> BuildVersion:   9B18
> $ cc --version
> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465)
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> $ ./configure --enable-darwin-64bit --prefix=/mochi
> ...
> $ make
> ...
> === Entering application orber
> make[3]: Nothing to be done for `opt'.
> make[3]: Nothing to be done for `opt'.
> CLASSPATH=../.. javac  -d ../../priv/ InitialReference.java
> make -f i386-apple-darwin9.1.0/Makefile TYPE=opt
> mkdir -p ../priv/obj/i386-apple-darwin9.1.0
> mkdir -p ../priv/bin/i386-apple-darwin9.1.0
> gcc -c -o ../priv/obj/i386-apple-darwin9.1.0/obj_init_port.o -m64 -g
> -O2 -I/Users/bob/src/otp/otp_src_R12B-1/erts/i386-apple-darwin9.1.0
> -no-cpp-precomp   -DHAVE_CONFIG_H   obj_init_port.c
> obj_init_port.c: In function 'main':
> obj_init_port.c:73: warning: incompatible implicit declaration of
> built-in function 'exit'
> obj_init_port.c:84: warning: incompatible implicit declaration of
> built-in function 'exit'
> obj_init_port.c:101: warning: pointer targets in passing argument 3 of
> 'accept' differ in signedness
> obj_init_port.c: In function 'read_request_from_socket':
> obj_init_port.c:204: warning: incompatible implicit declaration of
> built-in function 'malloc'
> obj_init_port.c: In function 'dispatch':
> obj_init_port.c:238: warning: incompatible implicit declaration of
> built-in function 'exit'
> obj_init_port.c: In function 'read_reply':
> obj_init_port.c:337: warning: incompatible implicit declaration of
> built-in function 'malloc'
> obj_init_port.c: In function 'net_init':
> obj_init_port.c:391: warning: incompatible implicit declaration of
> built-in function 'exit'
> gcc -c -o ../priv/obj/i386-apple-darwin9.1.0/setsockaddr_in.o -m64 -g
> -O2 -I/Users/bob/src/otp/otp_src_R12B-1/erts/i386-apple-darwin9.1.0
> -no-cpp-precomp   -DHAVE_CONFIG_H   setsockaddr_in.c
> setsockaddr_in.c: In function 'setsockaddr_in':
> setsockaddr_in.c:45: warning: incompatible implicit declaration of
> built-in function 'bzero'
> setsockaddr_in.c:50: warning: large integer implicitly truncated to
> unsigned type
> setsockaddr_in.c:61: warning: incompatible implicit declaration of
> built-in function 'bcopy'
> gcc -o ../priv/bin/i386-apple-darwin9.1.0/obj_init_port
> ../priv/obj/i386-apple-darwin9.1.0/obj_init_port.o
> ../priv/obj/i386-apple-darwin9.1.0/setsockaddr_in.o  -lutil -ldl -lm
> ld: warning in ../priv/obj/i386-apple-darwin9.1.0/obj_init_port.o,
> file is not of required architecture
> ld: warning in ../priv/obj/i386-apple-darwin9.1.0/setsockaddr_in.o,
> file is not of required architecture
> Undefined symbols:
>   "_main", referenced from:
>       start in crt1.10.5.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make[4]: *** [../priv/bin/i386-apple-darwin9.1.0/obj_init_port] Error 1
> make[3]: *** [opt] Error 2
> make[2]: *** [opt] Error 2
> make[1]: *** [opt] Error 2
> make: *** [libs] Error 2
>
> -bob
>



More information about the erlang-bugs mailing list