Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109771 - building glibc-2.3.5-r2 fails using crossdev -t powerpc
Summary: building glibc-2.3.5-r2 fails using crossdev -t powerpc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High blocker (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-18 20:50 UTC by Edward Killips
Modified: 2005-10-19 17:04 UTC (History)
0 users

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


Attachments
info log (cross-powerpc-unknown-linux-gnu-info.log,3.33 KB, text/plain)
2005-10-18 20:52 UTC, Edward Killips
Details
glibc log (cross-powerpc-unknown-linux-gnu-glibc.log,4.87 KB, text/plain)
2005-10-18 21:06 UTC, Edward Killips
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Killips 2005-10-18 20:50:37 UTC
build fails during install phase



Reproducible: Always
Steps to Reproduce:
1.crossdev -t powerpc
2.
3.

Actual Results:  
build failed during install

Expected Results:  
glibc should have installed

>>> Install glibc-2.3.5-r2 into
/var/tmp/cross/powerpc-unknown-linux-gnu/portage/glibc-2.3.5-r2/image/ category
cross-powerpc-unknown-linux-gnu
/usr/local/portage/cross-powerpc-unknown-linux-gnu/glibc/glibc-2.3.5-r2.ebuild:
line 299: cd: /var/tmp/cross/powerpc-unknown-linux
-gnu/portage/glibc-2.3.5-r2/work/build-pos-powerpc-unknown-linux-gnu-nptl: No
such file or directory
 * Installing GLIBC pos with NPTL ...
Makeconfig:84: amd64/config.make: No such file or directory
Makerules:782: no file name for `include'
/bin/sh: line 0: cd: amd64: No such file or directory
The GNU C library has not been configured.
Run `configure' to configure it before building.
Try `configure --help' for more details.
make: *** [amd64/config.status] Error 1
Comment 1 Edward Killips 2005-10-18 20:52:10 UTC
Created attachment 70995 [details]
info log
Comment 2 Edward Killips 2005-10-18 21:06:44 UTC
Created attachment 70996 [details]
glibc log

Partial glibc log attached. full  9.9M log available upon request.
Comment 3 Zac Slade 2005-10-19 13:51:50 UTC
Just confirming this happens also when doing
1. crossdev -t i686

on amd64.  It is specific to the amd64 platform when a profile is in use that
has multilib support (2005.0, 2005.1).  The ABI variable in the ebuild is
getting changed in the install function from what it was during compile. 
Trouble code:

setup_env() {
    if is_crosscompile || tc-is-cross-compiler ; then
        multilib_env ${CTARGET}
        if ! use multilib ; then
            MULTILIB_ABIS=${DEFAULT_ABI}
        fi
    fi

    export ABI=${ABI:-${DEFAULT_ABI:-default}}

    setup_flags

    if is_crosscompile || tc-is-cross-compiler ; then
        # We only install for this CTARGET on crosscompilers
        MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}

        # We need to export CFLAGS with abi information in them because
        # glibc's configure script checks CFLAGS for some targets (like mips)
        local VAR1=CFLAGS_${CTARGET//[-.]/_} VAR2=CFLAGS_${ABI}
        export CFLAGS="${CFLAGS} ${!VAR1-${!VAR2--O2 -pipe}}"
    fi
}

The interaction between the MULTILIB_ABIS and ABI is bad.  I don't spot it right
off.  My fix which is BAD is to force ABI to default (the same that is captured
during compile.  The below code from src_compile sets ABI on my cross complie to
default.  I think it has to do with the if/elsif interaction.

    if [[ -z ${OABI} ]] ; then
        if has_multilib_profile ; then
            OABI=${ABI}
            einfo "Building multilib glibc for ABIs: $(get_install_abis)"
            for ABI in $(get_install_abis) ; do
                export ABI
                src_compile
            done
            ABI=${OABI}
            unset OABI
            return 0
        elif is_crosscompile || tc-is-cross-compiler ; then
            OABI=${ABI}
            export ABI=${DEFAULT_ABI}
            src_compile
            ABI=${OABI}
            unset OABI
            return 0
        fi
    fi
Portage 2.0.53_rc5 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r2,
2.6.13-gentoo x86_64)
=================================================================
System uname: 2.6.13-gentoo x86_64 Dual Core AMD Opteron(tm) Processor 275
Gentoo Base System version 1.12.0_pre9
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.4-r1, 2.4.2
sys-apps/sandbox:    1.2.13
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=opteron -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O3 -march=opteron -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d a52 aac aalib acl acpi alsa apm arts async audiofile avi
bash-completion berkdb bidi bitmap-fonts bl bzip2 cdparanoia cdr crypt cscope
css cups curl dbus dga directfb dts dv dvb dvd dvdr dvdread edl eds emacs emboss
encode esd fam fame fbcon ffmpeg flac foomaticdb fortran fuse gdbm gif gimpprint
gnome gnutls gphoto2 gpm gstreamer gtk gtk2 guile hal howl ieee1394 imagemagick
imlib ipv6 jack java javascript jpeg kde kdeenablefinal kerberos lcms ldap
lesstif libcaca libg++ libwww licaca lzo lzw lzw-tiff mad mikmod mjpeg mng motif
mozillamp3 mpeg mplayer musepack mysql ncurses nls nptl nsplugin odbc ogg
oggvorbis opengl oss pam pda pdflib perl png postgres ppds python qt quicktime
readline realrtc samba sasl sblive sdl slang smp sndfile snmp spell ssl svg
syslog tcltk tcpd tetex tga theora threads tidy tiff truetype truetype-fonts
type1-fonts unicodeusb userlocales v4l v4l2 vcd vorbis win32codecs wmf xanim
xine xinerama xml xml2 xmms xpm xprint xv xvid zlib userland_GNU kernel_linux
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 4 SpanKY gentoo-dev 2005-10-19 17:04:57 UTC
fixed in cvs