Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 309735 - gcc-apple-4.2.1_p5647 doesn't compile on x64-macos
Summary: gcc-apple-4.2.1_p5647 doesn't compile on x64-macos
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 OS X
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
: 308659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-16 10:22 UTC by Ramon
Modified: 2010-04-03 09:06 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ramon 2010-03-16 10:22:18 UTC
Fails with error:
          cat /Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1/gcc/libgcc-std.ver \
            | sed -e '/^[   ]*#/d' \
                  -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \
            | /Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build/./gcc/xgcc -B/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build/./gcc/ -B/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/ -B/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/lib/ -isystem /Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/include -isystem /Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/sys-include -mmacosx-version-min=10.4 -O2  -O2 -O2 -pipe  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1/gcc -I/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1/gcc/. -I/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1/gcc/../include -I/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1/gcc/../libcpp/include  -I/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1/gcc/../libdecnumber -I../libdecnumber  -E -xassembler-with-cpp -; \
        } | gawk -f /Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1/gcc/mkmap-flat.awk -v leading_underscore=1 > libgcc/./tmp-libgcc.map
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/nm: no name list
mv 'libgcc/./tmp-libgcc.map' libgcc/./libgcc.map
/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build/./gcc/xgcc -B/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build/./gcc/ -B/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/bin/ -B/Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/lib/ -isystem /Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/include -isystem /Volumes/Shared/prefix-64/usr/x86_64-apple-darwin10/sys-include -O2  -O2 -O2 -pipe  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -dynamiclib -nodefaultlibs -install_name /Volumes/Shared/prefix-64/usr/lib/gcc/x86_64-apple-darwin10/4.2.1/libgcc_s`if test . = ppc64 ; then echo _. ; fi`.1.dylib -single_module -o ./libgcc_s.1.dylib.tmp -Wl,-exported_symbols_list,libgcc/./libgcc.map -compatibility_version 1 -current_version 1.0  libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi2_s.o libgcc/./_clear_cache_s.o libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_bswapsi2_s.o libgcc/./_bswapdi2_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixsfti_s.o libgcc/./_fixunssfdi_s.o libgcc/./_fixunssfti_s.o libgcc/./_floatdisf_s.o libgcc/./_floattisf_s.o libgcc/./_floatundisf_s.o libgcc/./_floatuntisf_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixdfti_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_fixunsdfti_s.o libgcc/./_floatdidf_s.o libgcc/./_floattidf_s.o libgcc/./_floatundidf_s.o libgcc/./_floatuntidf_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixxfti_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_fixunsxfti_s.o libgcc/./_floatdixf_s.o libgcc/./_floattixf_s.o libgcc/./_floatundixf_s.o libgcc/./_floatuntixf_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixtfti_s.o libgcc/./_fixunstfdi_s.o libgcc/./_fixunstfti_s.o libgcc/./_floatditf_s.o libgcc/./_floattitf_s.o libgcc/./_floatunditf_s.o libgcc/./_floatuntitf_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./darwin-64_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-darwin_s.o libgcc/./unwind-sjlj_s.o libgcc/./unwind-c_s.o -lc
collect2: ld terminated with signal 6 [Abort trap]
pure virtual method called
terminate called without an active exception
make[4]: *** [libgcc_s.dylib] Error 1
make[4]: Leaving directory `/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build/gcc'
make[3]: *** [stmp-multilib] Error 2
make[3]: Leaving directory `/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/build'
make: *** [bootstrap] Error 2
 * ERROR: sys-devel/gcc-apple-4.2.1_p5647 failed:
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line  54:  Called call-ebuildshell 'src_compile'
 *   environment, line 835:  Called src_compile
 *   environment, line 5304:  Called die
 * The specific snippet of code:
 *       emake bootstrap || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =sys-devel/gcc-apple-4.2.1_p5647',
 * the complete build log and the output of 'emerge -pqv =sys-devel/gcc-apple-4.2.1_p5647'.
 * The complete build log is located at '/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/temp/build.log'.
 * The ebuild environment file is located at '/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/temp/environment'.
 * S: '/Volumes/Shared/prefix-64/var/tmp/portage/sys-devel/gcc-apple-4.2.1_p5647/work/gcc-5646.1'

Reproducible: Always
Comment 1 Ramon 2010-03-16 10:22:48 UTC
 ~ $ emerge --info
Portage 2.2.00.15819-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: Tue, 16 Mar 2010 09:06:32 +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-lang/python:     2.6.4
dev-python/pycrypto: 2.1.0
dev-util/cmake:      2.8.0-r2
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/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS=""
DISTDIR="/Volumes/Shared/prefix-64/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages metadata-transfer news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS=""
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/gentoo/bzr-gentoo-overlay/sandbox"
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 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, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Heiko 2010-03-17 21:13:50 UTC
[ebuild   R   ] sys-devel/gcc-apple-4.2.1_p5647  USE="objc objc++ -fortran -multislot -nls -nocxx -nptl -test" 0 kB

Hi, as you can see, it merged for me. I'm not quite sure, but maybe it's due to me running a personal patched binutils-apple versino that uses a newer ld64: @(#)PROGRAM:ld  PROJECT:ld64-95.2.12 (Gentoo binutils-apple-3.2-r1). If you want you can try it from my overlay (available through layman). But still I'd like to see if a re-emerge of the prefix' very own binutils-apple and then a retry on gcc-apple would solve the issue.

What's your current exact gcc-apple version you try to compile gcc-apple with?
Comment 3 Ramon 2010-03-18 08:30:58 UTC
Hi,

my current versions of binutils-apple and gcc-apple:

$ eix binutils-apple          
[I] sys-devel/binutils-apple
     Available versions:  ~*3.1.1!m!t ~*3.1.2!t (~)3.2!t {test}
     Installed versions:  3.2!t(21:25:40 02/14/10)(-test)
     Homepage:            http://www.opensource.apple.com/darwinsource/
     Description:         Darwin assembler as(1) and static linker ld(1), Xcode Tools 3.2

$ eix gcc-apple
[U] sys-devel/gcc-apple
     Available versions:  
        (35)    ~*3.5.0_p3506-r1
        (40)    ~*4.0.1_p5490-r2!s (~)4.0.1_p5493!s
        (42)    (~)4.2.1_p5566-r2!s (~)4.2.1_p5574!s (~)4.2.1_p5646!s
        {fortran multislot nls nocxx nptl objc objc++ test}
     Installed versions:  4.2.1_p5574(42)!s(22:49:14 02/14/10)(nls objc objc++ -fortran -multislot -nocxx -nptl -test)
     Homepage:            http://gcc.gnu.org
     Description:         Apple branch of the GNU Compiler Collection, Developer Tools 3.2

I've remerged binutils-apple and rebuild gcc-apple as you suggested but that gave the exact same error.
Comment 4 Fabian Groffen gentoo-dev 2010-03-18 20:24:28 UTC
*** Bug 308659 has been marked as a duplicate of this bug. ***
Comment 5 Fabian Groffen gentoo-dev 2010-03-22 18:30:30 UTC
please try if emerging binutils-apple-3.2-r1 (currently masked) before emerging this gcc-apple helps
Comment 6 Ramon 2010-03-22 20:26:27 UTC
That doesn't build for me:

make 'CFLAGS=-O2 -pipe -march=nocona' CXXFLAGS= LDFLAGS= 
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o other/rebase.o other/rebase.cpp
x86_64-apple-darwin10-g++   -o rebase other/rebase.o
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o other/unwinddump.o other/unwinddump.cpp
x86_64-apple-darwin10-g++   -o unwinddump other/unwinddump.o
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o other/dyldinfo.o other/dyldinfo.cpp
x86_64-apple-darwin10-g++   -o dyldinfo other/dyldinfo.o
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o other/ObjectDump.o other/ObjectDump.cpp
x86_64-apple-darwin10-gcc -O2 -pipe -march=nocona  -Iinclude -Iabstraction -Ild -Iother -I.  -c -o ld/debugline.o ld/debugline.c
x86_64-apple-darwin10-g++   -o ObjectDump other/ObjectDump.o ld/debugline.o
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o other/PruneTrie.o other/PruneTrie.cpp
x86_64-apple-darwin10-ar -r -c libprunetrie.a other/PruneTrie.o
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o ld/ld.o ld/ld.cpp
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o ld/Options.o ld/Options.cpp
x86_64-apple-darwin10-g++   -Iinclude -Iabstraction -Ild -Iother -I.  -c -o version.o version.cpp
x86_64-apple-darwin10-g++   -o ld64 libprunetrie.a ld/ld.o ld/Options.o ld/debugline.o version.o
collect2: ld terminated with signal 6 [Abort trap]
pure virtual method called
terminate called without an active exception
make: *** [ld64] Error 1
 * ERROR: sys-devel/binutils-apple-3.2-r1 failed:
 *   emake failed for ld64
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called call-ebuildshell 'src_compile'
 *   environment, line  401:  Called src_compile
 *   environment, line 2745:  Called compile_ld64
 *   environment, line  605:  Called die
 * The specific snippet of code:
 *       emake CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" || die "emake failed for ld64";

Comment 7 Fabian Groffen gentoo-dev 2010-03-22 20:52:08 UTC
The error is that libprunetrie.a has no index.  You don't see it due to the abort.  I fixed the makefile to tell ar to build an index (-s).  If you don't want to wait until rsync catches up the change, manually change files/ld64-95.2.12-Makefile to add -s flag after $(AR).
Comment 8 Ramon 2010-03-22 21:17:17 UTC
Thanx, that solved the binutils problem, rebuilding gcc-apple now
Comment 9 Ramon 2010-03-22 22:18:20 UTC
Merging binutils-apple-3.2-r1 before gcc-apple allows gcc-apple to be built.

Comment 10 nietonfir 2010-03-25 10:43:44 UTC
Thx for the fix. Works now on ~x64-macos (10.6) with a 5-min-old sync.
Comment 11 Stuart Shelton 2010-03-26 12:57:19 UTC
Looks good - with binutils-apple-3.2-r1, gcc-apple-4.2.1_p5647 builds with only one item of note: at the end of the merge-stage, the following is output:

/opt/gentoo/var/tmp/binpkgs/sys-devel/gcc-apple-4.2.1_p5574/temp/environment: line 4883: local: EROOT: readonly variable
>>> Original instance of package unmerged safely.
Comment 12 Fabian Groffen gentoo-dev 2010-03-26 12:58:58 UTC
that's a nasty one, I cannot find where this setting of EROOT comes from...
Comment 13 Fabian Groffen gentoo-dev 2010-04-03 09:06:04 UTC
ah, this comes from gcc-config that sets it, IMO.

The original issue of this bug has been fixed by introducing a new binutils-apple