Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 305021 - dev-lang/erlang R13B03 hangs during ASN1 linking
Summary: dev-lang/erlang R13B03 hangs during ASN1 linking
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-14 04:59 UTC by Erik Onnen
Modified: 2016-04-13 16:55 UTC (History)
0 users

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


Attachments
build.out (build.log,29.42 KB, text/plain)
2010-03-04 21:26 UTC, Erik Onnen
Details
config.log from R13B04 (config.log,17.02 KB, text/plain)
2010-03-04 21:30 UTC, Erik Onnen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Onnen 2010-02-14 04:59:07 UTC
I've tried emerging dev-lang/erlang-13.2.3 with several different combinations of options (yes, even hipe) and for every permutation of USE flags, build hangs during linkage of asn1_erl_drv.so. Top reports ld64 using 100% of one of the cores but when I attach dtruss to the running pid, it shows nothing. 

Possibly worth noting that I can build the same version of Erlang manually from configure/make no problem.

I've allowed the linker to run overnight, 12 hours and it's still in the same state.

Only other thing of interest is that top shows context switches constantly ticking up but all other fields for ld64 staying the same. Doesn't appear to be leaking memory.

Last few lines of the emerge output are:

make[3]: Leaving directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/doc/src'
make[3]: Entering directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/c_src'
make -f x86_64-apple-darwin10/Makefile TYPE=opt
make[4]: Entering directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/c_src'
mkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/obj/x86_64-apple-darwin10
mkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/lib/x86_64-apple-darwin10
x86_64-apple-darwin10-gcc -c -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/beam -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/sys/unix -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/erl_interface/include -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/beam -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/include -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/include/x86_64-apple-darwin10 -m32 -O2 -pipe -march=nocona -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/x86_64-apple-darwin10  -no-cpp-precomp    -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -fPIC -fno-common -o /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/obj/x86_64-apple-darwin10/asn1_erl_drv.o asn1_erl_driver.c 
x86_64-apple-darwin10-gcc  -m32 -bundle -flat_namespace -undefined suppress -L/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/erl_interface/obj/x86_64-apple-darwin10 -o /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/lib/x86_64-apple-darwin10/asn1_erl_drv.so /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/obj/x86_64-apple-darwin10/asn1_erl_drv.o -lei  -lc -lutil -ldl -lm   

Reproducible: Always

Steps to Reproduce:
1.Add dev-lang/erlang to package.keywords
2.USE="ssl kpoll smp" emerge erlang
3.




uname -a: Darwin edda-10.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386 i386 MacBookPro3,1 Darwin
Comment 1 Erik Onnen 2010-02-14 05:25:03 UTC
edda-10:~ eonnen$ emerge --info
Portage 2.2.00.15335-prefix (prefix/darwin/macos/10.6/x64, gcc-4.2.1, unavailable, 10.2.0 i386)
=================================================================
System uname: Darwin-10.2.0-i386-64bit
Timestamp of tree: Sun, 14 Feb 2010 04:05:52 +0000
distcc 2.18.5-Apple.1 i386-apple-darwin10.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.4
sys-devel/autoconf:  2.63-r01.1
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.6b
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/gconf /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/Users/eonnen/portage/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US"
LDFLAGS=""
PKGDIR="/Users/eonnen/portage/usr/portage/packages"
PORTAGE_CONFIGROOT="/Users/eonnen/portage/"
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="/Users/eonnen/portage/var/tmp"
PORTDIR="/Users/eonnen/portage/usr/portage"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="aqua coreaudio cracklib cxx mmx mmxext modules ncurses nls objc objc++ prefix readline sse sse2 ssl unicode 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 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" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Erik Onnen 2010-02-14 05:25:35 UTC
Managed to get a dtruss output as well:

65984/0x1d0dcd:  write_nocancel(0x7, "make[3]: Entering directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/c_src'\n\0", 0x7E)          = 126 0
65984/0x1d0dcd:  write_nocancel(0x7, "make -f x86_64-apple-darwin10/Makefile TYPE=opt\n\0", 0x30)                = 48 0
65984/0x1d0dcd:  write_nocancel(0x6, "make[3]: Entering directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/c_src'\nmake -f x86_64-apple-darwin10/Makefile TYPE=opt\ne/doc/src'\nmake[3]: Nothing to be done for `opt'.\nmake[3]: Leaving directory `/Use", 0xAE)           = 174 0
65984/0x1d0dcd:  select(0x4, 0x7FFF5FBFC060, 0x7FFF5FBFBFE0, 0x7FFF5FBFBF60, 0x0)                = 1 0
65984/0x1d0dcd:  read_nocancel(0x3, "x86_64-apple-darwin10-gcc -c -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/beam -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/sys/unix -I/Users/eonnen/por", 0x1000)              = 1024 0
65984/0x1d0dcd:  read_nocancel(0x3, "_erl_driver.c \nADS -D_THREAD_SAFE -D_REENTRANT -fPIC -fno-common -o /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/obj/x86_64-apple-darwin10/asn1_erl_drv.o asn1\0", 0x1000)           = 15 0
dtrace: error on enabled probe ID 1755 (ID 19253: syscall::read_nocancel:return): out of scratch space in action #13 at DIF offset 44
65984/0x1d0dcd:  write_nocancel(0x7, "x86_64-apple-darwin10-gcc -c -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/beam -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/sys/unix -I/Users/eonnen/por", 0x40F)              = 1039 0
65984/0x1d0dcd:  write_nocancel(0x6, "x86_64-apple-darwin10-gcc -c -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/beam -I/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/erts/emulator/sys/unix -I/Users/eonnen/por", 0x40F)              = 1039 0
65984/0x1d0dcd:  select(0x4, 0x7FFF5FBFC060, 0x7FFF5FBFBFE0, 0x7FFF5FBFBF60, 0x0)                = 1 0
65984/0x1d0dcd:  read_nocancel(0x3, "make[4]: Entering directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/c_src'\nmkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/obj/x86_64-apple-darwin10\n", 0x1000)            = 256 0
dtrace: error on enabled probe ID 1755 (ID 19253: syscall::read_nocancel:return): out of scratch space in action #13 at DIF offset 44
65984/0x1d0dcd:  write_nocancel(0x7, "make[4]: Entering directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/c_src'\n\0", 0x7E)          = 126 0
65984/0x1d0dcd:  write_nocancel(0x7, "mkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/obj/x86_64-apple-darwin10\n\0", 0x82)              = 130 0
65984/0x1d0dcd:  write_nocancel(0x6, "make[4]: Entering directory `/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/c_src'\nmkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/obj/x86_64-apple-darwin10\n", 0x100)            = 256 0
65984/0x1d0dcd:  select(0x4, 0x7FFF5FBFC060, 0x7FFF5FBFBFE0, 0x7FFF5FBFBF60, 0x0)                = 1 0
65984/0x1d0dcd:  read_nocancel(0x3, "mkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/lib/x86_64-apple-darwin10\n\0", 0x1000)             = 130 0
dtrace: error on enabled probe ID 1755 (ID 19253: syscall::read_nocancel:return): out of scratch space in action #13 at DIF offset 44
65984/0x1d0dcd:  write_nocancel(0x7, "mkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/lib/x86_64-apple-darwin10\n\0", 0x82)              = 130 0
65984/0x1d0dcd:  write_nocancel(0x6, "mkdir -p /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/asn1/priv/lib/x86_64-apple-darwin10\n -Wmissing-declarations -Wnested-externs -Winline -fno-strict-aliasing -I. -I../include -Iconnect -Iencode -Idecode -Imisc -Ie", 0x82)              = 130 0
65984/0x1d0dcd:  select(0x4, 0x7FFF5FBFC060, 0x7FFF5FBFBFE0, 0x7FFF5FBFBF60, 0x0)                = 1 0
65984/0x1d0dcd:  read_nocancel(0x3, "x86_64-apple-darwin10-gcc  -m32 -bundle -flat_namespace -undefined suppress -L/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/erl_interface/obj/x86_64-apple-darwin10 -o /Users/eonnen/portage/var/tmp/portage/dev-lang/erl", 0x1000)              = 508 0
dtrace: error on enabled probe ID 1755 (ID 19253: syscall::read_nocancel:return): out of scratch space in action #13 at DIF offset 44
65984/0x1d0dcd:  write_nocancel(0x7, "x86_64-apple-darwin10-gcc  -m32 -bundle -flat_namespace -undefined suppress -L/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/erl_interface/obj/x86_64-apple-darwin10 -o /Users/eonnen/portage/var/tmp/portage/dev-lang/erl", 0x1FC)              = 508 0
65984/0x1d0dcd:  write_nocancel(0x6, "x86_64-apple-darwin10-gcc  -m32 -bundle -flat_namespace -undefined suppress -L/Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.3/work/otp_src_R13B03/lib/erl_interface/obj/x86_64-apple-darwin10 -o /Users/eonnen/portage/var/tmp/portage/dev-lang/erl", 0x1FC)              = 508 0
Comment 3 Fabian Groffen gentoo-dev 2010-02-26 17:24:33 UTC
when you say "manually compile", is this inside our outside your prefix?
Comment 4 Erik Onnen 2010-02-26 18:30:20 UTC
(In reply to comment #3)
> when you say "manually compile", is this inside our outside your prefix?
> 

Outside prefix w/ normal Erlang configure/make using Apple's toolchain.
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2010-03-02 11:00:16 UTC
I bumped to Erlang 13B04 with a lot of bugfixes.
Comment 6 Christian Faulhammer (RETIRED) gentoo-dev 2010-03-04 09:24:57 UTC
I synced the ebuild, so please try 13.2.4 now.
Comment 7 Erik Onnen 2010-03-04 21:26:23 UTC
Created attachment 222107 [details]
build.out
Comment 8 Erik Onnen 2010-03-04 21:29:01 UTC
Pulled 13B04, fails during configure. Attached build.log above. Last few lines are:

checking for kstat_open in -lkstat... no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... yes
checking for adler32_combine in -lz... no
configure: error: cannot find any shared zlib
configure: error: /Users/eonnen/portage/var/tmp/portage/dev-lang/erlang-13.2.4/work/otp_src_R13B04/erts/configure failed for erts

zlib is installed:

sys-libs/zlib-1.2.3-r01.1 was built with the following:
USE="(prefix)" 

Also attaching config.log
Comment 9 Erik Onnen 2010-03-04 21:30:41 UTC
Created attachment 222109 [details]
config.log from R13B04
Comment 10 Christian Faulhammer (RETIRED) gentoo-dev 2010-03-04 22:25:25 UTC
Add this line somewhere for econf in src_configure and try with and without USE=ssl, please.

$(use_with ssl ssl-zlib "${EPREFIX}"/usr) \
Comment 11 Erik Onnen 2010-03-09 16:54:45 UTC
(In reply to comment #10)
> Add this line somewhere for econf in src_configure and try with and without
> USE=ssl, please.
> 
> $(use_with ssl ssl-zlib "${EPREFIX}"/usr) \
> 

Sorry, how do I do that in a durable way? I've made the requested changes after a failed build and attempted an emerge --keep-going but the work directory is blown away and the changes not persisted. 
Comment 12 Fabian Groffen gentoo-dev 2010-03-09 16:58:25 UTC
Yesterday I compiled erlang on my mac (after some fixes), have you tried the latest version?
Comment 13 Christian Faulhammer (RETIRED) gentoo-dev 2010-03-09 17:26:05 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Add this line somewhere for econf in src_configure and try with and without
> > USE=ssl, please.
> > 
> > $(use_with ssl ssl-zlib "${EPREFIX}"/usr) \
> > 
> 
> Sorry, how do I do that in a durable way? I've made the requested changes after
> a failed build and attempted an emerge --keep-going but the work directory is
> blown away and the changes not persisted. 

 Go where the ebuild resides, search for econf and add that line directly after it on a new line.  Then run "ebuild erlang-13.2.4 manifest" in that directory and emerge erlang normally.  The change will vanish as soon as you resync.
Comment 14 Erik Onnen 2010-03-10 18:00:53 UTC
(In reply to comment #12)
> Yesterday I compiled erlang on my mac (after some fixes), have you tried the
> latest version?
> 

Yes, I'm sure. Syncing didn't change the outcome.
Comment 15 Erik Onnen 2010-03-10 18:06:53 UTC
(In reply to comment #13)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > Add this line somewhere for econf in src_configure and try with and without
> > > USE=ssl, please.
> > > 
> > > $(use_with ssl ssl-zlib "${EPREFIX}"/usr) \
> > > 
> > 
> > Sorry, how do I do that in a durable way? I've made the requested changes after
> > a failed build and attempted an emerge --keep-going but the work directory is
> > blown away and the changes not persisted. 
> 
>  Go where the ebuild resides, search for econf and add that line directly after
> it on a new line.  Then run "ebuild erlang-13.2.4 manifest" in that directory
> and emerge erlang normally.  The change will vanish as soon as you resync.
> 

You'll have to forgive me but I'm ignorant as to how the internals of an ebuild are structured. I added the line you suggested leaving me with:

"
    econf --enable-threads --enable-shared-zlib \  $(use_enable sctp) $(use_enable hipe) $(use_with ssl ssl "${EPREFIX}"/usr) $(use_enable ssl dynamic-ssl-lib) $(use_enable kpoll kernel-poll) $(use_enable smp smp-support) || die
    $(use_with ssl ssl-zlib "${EPREFIX}"/usr) \
"

in src_configure. I read your instructions to be that I should run "ebuild erlang-13.2.4 manifest" from where the environment file with src_configure is located which in my case is "~/portage/var/tmp/portage/dev-lang/erlang-13.2.4/temp". Running the ebuild command from within that directory produces:

~/portage/var/tmp/portage/dev-lang/erlang-13.2.4/temp $ ebuild erlang-13.2.4 manifest
'erlang-13.2.4' does not end with '.ebuild'.

I'm missing something but not sure what. I'll continue trying to make sense of the internals of how ebuild works but I thought I'd update here in the mean time.
Comment 16 Christian Faulhammer (RETIRED) gentoo-dev 2010-03-12 11:52:49 UTC
Sorry, run "ebuild erlang-13.2.4.ebuild manifest".
Comment 17 Dirkjan Ochtman gentoo-dev 2016-04-13 16:55:00 UTC
This very old bug report has not seen any movement since 2010. If you still see similar problems with 17.5 or later, feel free to reopen.