The build system for slang does not handle cross compilers correctly. configure is called with the --host and --build parameters correctly, but does not set CC and ELF_CC correctly. I'll attach a fixed ebuild in a second which fixes src/Makefile.in to allow overriding with environment variables. Reproducible: Always Steps to Reproduce: 1. Install a cross toolchain, use crossdev. 2. Try and cross-compile, observe that it gets the compiler wrong 3. Actual Results: The build completed, but because it was built with the wrong compiler, the libraries wouldn't link properly. Expected Results: Cross compiling using the correct compiler. Portage 2.1.3_rc6 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r4, 2.6.21-gentoo-r3 i686) ================================================================= System uname: 2.6.21-gentoo-r3 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz Gentoo Base System release 1.12.10 Timestamp of tree: Wed, 04 Jul 2007 17:50:01 +0000 dev-java/java-config: 1.3.7, 2.0.33-r1 dev-lang/python: 2.4.4-r4 dev-python/pycrypto: 2.0.1-r5 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.24 virtual/os-headers: 2.6.21 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS=" -march=prescott -O2 -pipe -fomit-frame-pointer " CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c" CXXFLAGS=" -march=prescott -O2 -pipe -fomit-frame-pointer " DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://gentoo.virginmedia.com/" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /home/endgame/Code/overlay /usr/local/layman/sunrise /usr/local/layman/lila-theme /usr/local/layman/java-overlay" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X aac acpi alsa bash-completion berkdb bitmap-fonts cairo cdr cli cracklib dbus divx dri dvd dvdr dvdread eds emacs emboss encode evo fam firefox fortran gdbm gif gpm gstreamer hal iconv ipv6 isdnlog jpeg libg++ mad midi mikmod mmx mp3 mpeg mudflap ncurses nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf perl png pppd python qt3support quicktime readline reflection sdl session spl sse sse2 ssl svg tcpd theora tiff timidity truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 123943 [details] Suggested fixed ebuild A couple of changes in src_compile. Diff against the slang-1.4.9-r2 ebuild: 5c5 < inherit eutils --- > inherit eutils toolchain-funcs 47a48,53 > # The configure script gets the compiler wrong when cross > # compiling. Change the Makefile definition of CC and ELF_CC to > # allow environment overrides. > sed -e '/^CC/s:=:?=:' \ > -e '/^ELF_CC/s:=:?=:' \ > -i "${S}/src/Makefile.in" || die "sed failed" 48a55,56 > export CC="$(tc-getCC)" > export ELF_CC="$(tc-getCC)"
seems to be fixed in slang 2.1.3? test and reopen if it fails You are compiling SLANG with the following compiler configuration: CC = x86_64-pc-linux-gnu-gcc CFLAGS = -O2 -pipe -march=k8 LDFLAGS = -Wl,-O1,--as-needed -Wl,-export-dynamic ELF_CC = $(CC) ELF_LINK = $(CC) $(LDFLAGS) -shared -Wl,-O1 -Wl,--version-script,$(VERSION_SCRIPT) -Wl,-soname,$(ELFLIB_MAJOR) ELF_CFLAGS= $(CFLAGS) -fPIC
It's calling the correct compiler now. Thanks Samuli. I don't know if the bug should be VERIFIED or CLOSED, so I'll leave it.