Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 334155 - dev-lang/erlang--13.2.4 fails to compile, no thread support
Summary: dev-lang/erlang--13.2.4 fails to compile, no thread support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Mac OSX (show other bugs)
Hardware: AMD64 OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 413961 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-23 21:37 UTC by Ramon
Modified: 2012-04-29 09:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log from erts dir (config.log,41.38 KB, text/plain)
2010-08-25 19:08 UTC, Ramon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ramon 2010-08-23 21:37:18 UTC
dev-lang/erlang fails to compile claiming it cannot find thread support.

=== configuring in erts 

checking for native win32 threads... no
checking for pthread_create in -lpthread... no
checking for pthread_create in -lc_r... no
checking if the '-pthread' switch can be used... no
checking whether default stack size should be modified... no
checking size of void *... (cached) 0
checking whether an emulator with smp support should be built... no; disabled by user
checking whether the emulator should use threads... configure: error: thread support enabled by user but not found
configure: error: /Volumes/Shared/prefix-64/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/erts/configure failed for erts

Strangely enough I have the following message from autoconf earlier:

=== configuring in lib/odbc/.

checking for native win32 threads... no
checking for pthread_create in -lpthread... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pthread/mit/pthread.h usability... no
checking pthread/mit/pthread.h presence... no
checking for pthread/mit/pthread.h... no

This seems to be caused by a different macro to find thread support, earlier invocations of autoconf use the LM_CHECK_THR_LIB macro where the failing one uses the ERL_FIND_ETHR_LIB macro and that one fails.



Reproducible: Always




Portage 2.2.01.15553-prefix (prefix/darwin/macos/10.6/x64, gcc-4.2.1, unavailable, 10.4.0 i386)
=================================================================
System uname: Darwin-10.4.0-i386-64bit
Timestamp of tree: Mon, 23 Aug 2010 11:09:45 +0000
distcc 2.18.5-Apple.1 i386-apple-darwin10.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2
dev-util/cmake:      2.8.1-r1
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.10.2-r00.1, 1.11.1
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
ACCEPT_KEYWORDS="~x64-macos"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-apple-darwin10"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-apple-darwin10"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS=""
DISTDIR="/Volumes/Shared/prefix-64/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixlafiles fixpackages metadata-transfer news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-dead_strip_dylibs"
PKGDIR="/Volumes/Shared/prefix-64/usr/portage/packages"
PORTAGE_CONFIGROOT="/Volumes/Shared/prefix-64/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/Volumes/Shared/prefix-64/var/tmp"
PORTDIR="/Volumes/Shared/prefix-64/usr/portage"
PORTDIR_OVERLAY="/Users/ramonvanalteren/sourcecode/gentoo/personal /Users/ramonvanalteren/sourcecode/upstream/gitorious-overlay"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua bash-completion bzip2 coreaudio cracklib cxx iconv ipv6 mmx mmxext modules ncurses nls objc objc++ pcre prefix python readline sse sse2 ssl unicode vim-syntax x64-macos zlib" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ramon 2010-08-25 19:08:02 UTC
Created attachment 244601 [details]
config.log from erts dir
Comment 2 Ramon 2010-08-25 20:07:26 UTC
I forced the ebuild to build in 64bit mode by adding --enable-m64-build to the configure options and removing the multilib include 

That enabled a succesful build, with a few QA concerns about .so files on darwin:

The root cause of the configure failure is this snippet in the attached config.log:

configure:6786: x86_64-apple-darwin10-gcc -o conftest -m32 -O2 -pipe -march=nocona -I/Volumes/Shared/prefix-64/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/e     rts/x86_64-apple-darwin10  -no-cpp-precomp  -D_XOPEN_SOURCE -Wl,-dead_strip_dylibs conftest.c -lpthread   >&5
collect2: ld terminated with signal 6 [Abort trap]
got unhandled exception: missing required architecture i386 in file

I lack the autoconf / multilib fu to understand why and fix it.... or even understand if this is fixable at all
Comment 3 Ramon 2010-08-25 20:35:01 UTC
The QA notice on .so files on darwin is:
 * QA Notice: Found .so dynamic libraries on Darwin:
 *     Volumes/Shared/prefix-64/usr/lib/erlang/lib/asn1-1.6.13/priv/lib/asn1_erl_drv.so
 *     Volumes/Shared/prefix-64/usr/lib/erlang/lib/crypto-1.6.4/priv/lib/crypto_drv.so
 *     Volumes/Shared/prefix-64/usr/lib/erlang/lib/megaco-3.14/priv/lib/megaco_flex_scanner_drv.so
 *     Volumes/Shared/prefix-64/usr/lib/erlang/lib/megaco-3.14/priv/lib/megaco_flex_scanner_drv_mt.so
 *     Volumes/Shared/prefix-64/usr/lib/erlang/lib/runtime_tools-1.8.3/priv/lib/trace_file_drv.so
 *     Volumes/Shared/prefix-64/usr/lib/erlang/lib/runtime_tools-1.8.3/priv/lib/trace_ip_drv.so
Comment 4 Fabian Groffen gentoo-dev 2010-09-30 10:54:35 UTC
I just committed a fix (prevent -m32 being added), can you try later and report if we can add the ~x64-macos keyword?
Comment 5 Ramon 2010-09-30 15:43:46 UTC
(In reply to comment #4)
> I just committed a fix (prevent -m32 being added), can you try later and report
> if we can add the ~x64-macos keyword?

It appears to have not yet made it to rsync because right now the ebuild is still failing with the exact same error. Did you rev-bump ? Or am I just too impatient :)
Comment 6 Fabian Groffen gentoo-dev 2010-09-30 18:35:05 UTC
I forgot to fix erts' configure it seems
Comment 7 Fabian Groffen gentoo-dev 2010-09-30 19:24:59 UTC
ok, I compiled it myself on x64-macos this time
Comment 8 Ramon 2010-09-30 19:35:32 UTC
Cool, thanx
Comment 9 Christian Faulhammer (RETIRED) gentoo-dev 2010-11-07 23:01:38 UTC
(In reply to comment #4)
> I just committed a fix (prevent -m32 being added), can you try later and report
> if we can add the ~x64-macos keyword?

 Fabian, is this fix ready to go upstream?  I have some contacts to upstream and could push it there, if it is sane.
Comment 10 Fabian Groffen gentoo-dev 2010-11-08 07:45:35 UTC
    # prevent configure from injecting -m32 by default on Darwin, bug #334155
    sed -i -e 's/Darwin-i386/Darwin-NO/' configure.in || die
    sed -i -e '/\<\(LD\|C\)FLAGS="-m32/s/-m32//' erts/configure.in || die

No, this is not sane (both what upstream initially does, and the way I fix it, because I tried doing it with minimal changes)
Comment 11 Fabian Groffen gentoo-dev 2012-04-29 09:45:36 UTC
*** Bug 413961 has been marked as a duplicate of this bug. ***
Comment 12 Fabian Groffen gentoo-dev 2012-04-29 09:55:23 UTC
(In reply to comment #9)
> (In reply to comment #4)
> > I just committed a fix (prevent -m32 being added), can you try later and report
> > if we can add the ~x64-macos keyword?
> 
>  Fabian, is this fix ready to go upstream?  I have some contacts to upstream
> and could push it there, if it is sane.

I took the configure part from Jan's patch from #413961 and removed the fugly sed hacks.  This should be an ok solution.