Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233130 - cross-sparc-unknown-linux-gnu/gcc fails to compile (ld missing crti.o)
Summary: cross-sparc-unknown-linux-gnu/gcc fails to compile (ld missing crti.o)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 272642 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-27 21:49 UTC by emerald
Modified: 2011-03-11 04:23 UTC (History)
3 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 emerald 2008-07-27 21:49:11 UTC
The crosscompiler, peviously installed via crossdev fails to compile during upgrade/reinstall with the new SPARC multilib glibc: ld fails to locate the crti.o file.
It happens with the current ~ 4.3.1 and the 4.2.4 and 4.1.2 gcc versions.


# @multilib_flags@ is still needed because this may use
# /var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/build/./gcc/xgcc -B/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/build/./gcc/ -B/usr/sparc-unknown-linux-gnu/bin/ -B/usr/sparc-unknown-linux-gnu/lib/ -isystem /usr/sparc-unknown-linux-gnu/include -isystem /usr/sparc-unknown-linux-gnu/sys-include and -O2  -O2 -g -O2 -pipe   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  directly.
# @multilib_dir@ is not really necessary, but sometimes it has
# more uses than just a directory name.
/bin/sh /var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/gcc-4.3.1/libgcc/../mkinstalldirs .
/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/build/./gcc/xgcc -B/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/build/./gcc/ -B/usr/sparc-unknown-linux-gnu/bin/ -B/usr/sparc-unknown-linux-gnu/lib/ -isystem /usr/sparc-unknown-linux-gnu/include -isystem /usr/sparc-unknown-linux-gnu/sys-include -O2  -O2 -g -O2 -pipe   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -O2 -g -O2 -pipe -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o unwind-dw2_s.o unwind-dw2-fde-glibc_s.o unwind-sjlj_s.o gthr-gnat_s.o unwind-c_s.o emutls_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
/usr/libexec/gcc/sparc-unknown-linux-gnu/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/build/sparc-unknown-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/build'
make: *** [all] Error 2
 *
 * ERROR: cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4694:  Called toolchain_src_compile
 *             environment, line 5209:  Called gcc_src_compile
 *             environment, line 3028:  Called gcc_do_make
 *             environment, line 2858:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 *  The die message:
 *   emake failed with all
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/temp/environment'.
 * This ebuild is from an overlay: '/usr/local/portage/crossdev/'
 *
Comment 1 SpanKY gentoo-dev 2008-10-27 05:09:33 UTC
crti.o is provided by the C library ...

post `emerge --info` like normal and post the version information for all your cross packages

if gcc still fails, use crossdev:
crossdev -C sparc
crossdev sparc
Comment 2 Tobias Klausmann (RETIRED) gentoo-dev 2008-12-23 14:55:56 UTC
I have this very same problem (after getting rid of the problems in bug 250630). 

$ emerge --info


Portage 2.1.6.1 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r0, 2.6.27.5 x86_64)
=================================================================
System uname: Linux-2.6.27.5-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5600+-with-glibc2.2.5
Timestamp of tree: Sat, 20 Dec 2008 12:20:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.5.2-r8, 3.0
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.0
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=k8 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildsyspkg distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://gentoo.tiscali.nl/"
INSTALL_MASK="/etc/udev/rules.d/75-persistent-net-generator.rules"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude lost+found"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync5.de.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 acl alsa amd64 apache2 audacious audiofile bash-completion berkdb bzip2 calendar caps cdparanoia cdr cli cracklib crypt cups dio dri dts dvd dvdr dvdread encode ethereal exif ffmpeg fftw firefox fortran ftp gdbm glitz gpm gtk iconv imlib2 isdnlog jpeg kdeenablefinal ladcca lame lcms lua mad matroska midi mmap mmx mng moznocompose moznoirc moznomail mozsvg mp3 mpeg mplayer mudflap multilib mysqli ncurses nls nptl nptlonly offensive ogg opengl openmp pam pcre pdflib perl png ppds pppd python qt4 readline recode reflection session sharedmem sockets sox spl srt sse sse2 ssl svg sysfs szip tcpd tetex theora unicode usb v4l v4l2 vcd vim vim-pager vlm vorbis wmf xcb xcomposite xorg xosd xpm xscreensaver xvid zlib" ALSA_CARDS="emu10k1 ice1724" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" CAMERAS="ptp2" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, LANG, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 Tobias Klausmann (RETIRED) gentoo-dev 2008-12-23 14:57:49 UTC
Package versions are all the latest ~sparc.
Comment 4 SpanKY gentoo-dev 2008-12-24 13:49:49 UTC
multilib code in glibc is all f-ed up for cross-compiling
Comment 5 emerald 2008-12-24 14:52:26 UTC
Since it's looking in the wrong directories (or failed to provide an appropriate symlink) i created a symlink which helped at least compiling:
search dirs:
-B/var/tmp/portage/cross-sparc-unknown-linux-gnu/gcc-4.3.1-r1/work/build/./gcc/
-B/usr/sparc-unknown-linux-gnu/bin/ -B/usr/sparc-unknown-linux-gnu/lib/

missing symlink from /usr/sparc-unknown-linux-gnu/lib to .../lib32 (or .../lib64) so a correct dir would be available
Comment 6 SpanKY gentoo-dev 2008-12-24 17:10:28 UTC
the sparc binutils are not targeting multilib while glibc is, so creating a symlink named "lib" and pointing it to like "lib32" should be OK.

ln -s lib32 /usr/sparc-unknown-linux-gnu/lib
ln -s lib32 /usr/sparc-unknown-linux-gnu/usr/lib
Comment 7 Tobias Klausmann (RETIRED) gentoo-dev 2008-12-24 17:57:28 UTC
This fixes crossdev (and cross-compiling) for me, thanks a bunch!
Comment 8 Alex Buell 2009-01-03 13:54:51 UTC
Just found this bug report, which may be related to my problem. Crossdev seems unable to build the C++ sparc cross compiler on AMD64 linux platforms (fortunately the C sparc cross compiler builds just fine). 

crossdev -S -t sparc

always fails on GCC stage2 build. Any ideas?
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2009-06-09 01:19:08 UTC
*** Bug 272642 has been marked as a duplicate of this bug. ***
Comment 10 404 Error 2010-06-26 17:53:44 UTC
Bug still present with sys-devel/crossdev-20100620
Comment 11 SpanKY gentoo-dev 2011-03-11 04:23:39 UTC
crossdev-20110310 + glibc-2.13 + gcc-4.5.2 work for me now