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
Created attachment 244601 [details] config.log from erts dir
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
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
I just committed a fix (prevent -m32 being added), can you try later and report if we can add the ~x64-macos keyword?
(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 :)
I forgot to fix erts' configure it seems
ok, I compiled it myself on x64-macos this time
Cool, thanx
(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.
# 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)
*** Bug 413961 has been marked as a duplicate of this bug. ***
(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.