[erlang-bugs] erts configure fails on 64-bit Darwin

Tim Spriggs tims@REDACTED
Tue Jun 8 23:51:20 CEST 2010


On Tue, Jun 8, 2010 at 2:02 PM, Tuncer Ayaz <tuncer.ayaz@REDACTED> wrote:
> On Tue, Jun 8, 2010 at 10:09 PM, Tim Spriggs <tims@REDACTED> wrote:
>> I am trying to build a 64-bit version of Erlang (R13B04) on Snow
>> Leopard but the erts configure stage fails. The following patch fixes
>
> What is the error?
> What did you pass to ./configure? --enable-darwin-64bit?
>
>> the configure stage:
>>
>> --- configure.in.orig   2010-06-07 13:52:09.000000000 -0700
>> +++ configure.in        2010-06-07 13:52:56.000000000 -0700
>> @@ -340,13 +340,13 @@
>>       case $host_os in
>>               darwin*)
>>                       case $CFLAGS in
>>                       *-m32*)
>>                               ;;
>>                       *)
>> -                               CFLAGS="-m32 $CFLAGS"
>> +                               # CFLAGS="-m32 $CFLAGS"
>>                               ;;
>>                       esac
>>                       ;;
>>               *)
>>                       if test X${enable_m32_build} = Xyes;
>>                       then
>>
>>
>> but I am worried that there is some reason that somebody forced 32-bit
>> on Darwin. Any sage advice?
>
> Most likely reason is that wxErlang won't work with wxMac 2.8 (bundled
> version in Darwin 10.6). Only the unreleased wxWidgets development
> branch for 2.9 has Cocoa and 64-bit support.
>
> Have you tried ./configure with CFLAGS env-var set to "-m32" instead
> of modifying configure.in?
>

I am trying to get rid of -m32 since this is a 64-bit build under a
64-bit Gentoo prefix environment.

The top level configure command (and a few interesting lines of output):

./configure --prefix=/opt/prefix/usr --build=x86_64-apple-darwin10
--host=x86_64-apple-darwin10 --mandir=/opt/prefix/usr/share/man
--infodir=/opt/prefix/usr/share/info --datadir=/opt/prefix/usr/share
--sysconfdir=/opt/prefix/etc --localstatedir=/opt/prefix/var/lib
--enable-threads --enable-shared-zlib   --disable-sctp --disable-hipe
--with-ssl=/opt/prefix/usr --enable-dynamic-ssl-lib
--enable-kernel-poll --enable-smp-support
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:
Ignoring the --cache-file argument since it can cause the system to be
erroneously configured
Disabling caching
checking build system type... x86_64-apple-darwin10
checking host system type... x86_64-apple-darwin10
checking for x86_64-apple-darwin10-gcc... x86_64-apple-darwin10-gcc

...

Then later in the configure stage, the erts configure command is called:

=== configuring in erts
(/opt/prefix/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/erts)
configure: running /bin/sh
/opt/prefix/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/erts/configure
--disable-option-checking '--prefix=/opt/prefix/usr'
'--build=x86_64-apple-darwin10' '--host=x86_64-apple-darwin10'
'--mandir=/opt/prefix/usr/share/man'
'--infodir=/opt/prefix/usr/share/info'
'--datadir=/opt/prefix/usr/share' '--sysconfdir=/opt/prefix/etc'
'--localstatedir=/opt/prefix/var/lib' '--enable-threads'
'--enable-shared-zlib' ' ' '--disable-sctp' '--disable-hipe'
'--with-ssl=/opt/prefix/usr' '--enable-dynamic-ssl-lib'
'--enable-kernel-poll' '--enable-smp-support'
'build_alias=x86_64-apple-darwin10' 'host_alias=x86_64-apple-darwin10'
'target_alias= ' 'CFLAGS=-O2 -pipe' 'CXXFLAGS=-O2 -pipe' 'LDFLAGS='
--cache-file=/dev/null
--srcdir=/opt/prefix/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/erts
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:
checking build system type... x86_64-apple-darwin10
checking host system type... x86_64-apple-darwin10

The actual error output is:

checking whether an emulator with smp support should be built... yes;
enabled by user
configure: error: cannot build smp enabled emulator since no thread
library was found
configure: error:
/opt/prefix/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/erts/configure
failed for erts

It is failing because there it is calling an x86_64 only version of
gcc with -m3. Eg:

x86_64-apple-darwin10-gcc -o conftest -m32 -O2 -pipe
-I/opt/prefix/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/erts/x86_64-apple-darwin10
 -no-cpp-precomp  -D_XOPEN_SOURCE  conftest.c -lutil


While there are no enable/disable options set for the bitness in the
configure stage, the snippet of code I referenced earlier assumes that
-m32 should always be set for Darwin.

-Tim


More information about the erlang-bugs mailing list