Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218684 - sys-libs/uclibc-0.9.28.3: cross compilation fails for mipsel target
Summary: sys-libs/uclibc-0.9.28.3: cross compilation fails for mipsel target
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-21 05:25 UTC by MCassaniti
Modified: 2012-05-16 05:11 UTC (History)
5 users (show)

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


Attachments
Build log for uClibc-0.9.28.3 (build.log,446.89 KB, text/plain)
2008-04-21 05:35 UTC, MCassaniti
Details
Build environment for uClibc-0.9.28.3 (environment,104.76 KB, text/plain)
2008-04-21 05:38 UTC, MCassaniti
Details
uclibc trunk revision 16105 (45_all_uClibc-fix-linux-2.6.18.patch,2.20 KB, patch)
2008-07-12 00:06 UTC, Luke-Jr
Details | Diff
Patchset which works for cross-mips-linux-uclibc/uclibc-0.9.28.3-r7 (uClibc-0.9.28.3-patches-1.8a.tar.bz2,28.77 KB, application/octet-stream)
2009-04-19 14:35 UTC, Milan Holzäpfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MCassaniti 2008-04-21 05:25:56 UTC
Compilation fails regardless of minor version. Fails looking for file asm/asm.h, which I believe may be related to not finding a uclibc toolchain already installed on the host system.

Tested on hardened AMD64 and hardened i686. Compilation command line:
crossdev -v -S --g 3.4.6-r2 --l 0.9.28.3 mipsel-softfloat-linux-uclibc

emerge --info for AMD64:
Portage 2.1.4.4 (hardened/amd64, gcc-3.4.6, glibc-2.6.1-r0, 2.6.18-xen-r8-grsec x86_64)
=================================================================
System uname: 2.6.18-xen-r8-grsec x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
Timestamp of tree: Fri, 18 Apr 2008 00:30:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.7.9-r1, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.pacific.net.au/linux/Gentoo/ http://distfiles.gentoo.org/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
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/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl acpi amd64 berkdb bzip2 caps cdr clamav cracklib crypt emul-linux-x86 hardened justify kerberos ldap lm_sensors midi nls nptl nptlonly pam pic posix readline samba sasl sockets ssl sysvipc tcpd threads urandom xattr xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" 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="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

emerge --info for i686:
Portage 2.1.4.4 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.16-xbox i686)
=================================================================
System uname: 2.6.16-xbox i686 Celeron (Coppermine)
Timestamp of tree: Fri, 18 Apr 2008 00:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/mnt/shared/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="buildpkg ccache distcc distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://159.255.36.1/ http://mirror.pacific.net.au/linux/Gentoo http://distfiles.gentoo.org"
LINGUAS="en en_US en_GB"
MAKEOPTS="-j10"
PKGDIR="/mnt/shared/portage/packages/xbox-server"
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="/mnt/shared/portage"
PORTDIR_OVERLAY="/mnt/shared/portage/local"
SYNC="rsync://mirror.pacific.net.au/gentoo-portage"
USE="acl acpi alsa bash-completion berkdb bzip2 caps clamav cracklib crypt esd hardened kerberos ldap lm_sensors memlimit midi minimal mmx nas nls nptl nptlonly pam pic posix readline samba sasl sharedmem sockets socks5 spell ssl symlink sysvipc tcpd threads urandom x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" 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="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US en_GB" USERLAND="GNU" VIDEO_CARDS="nv"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Last lines of output from compilation:
make[4]: Leaving directory `/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/work/uClibc-0.9.28.3/libc/sysdeps/linux/common'
make -C mips
make[4]: Entering directory `/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/work/uClibc-0.9.28.3/libc/sysdeps/linux/mips'
mipsel-softfloat-linux-uclibc-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -mips1 -msoft-float -fno-stack-protector-all -fstack-protector -fno-builtin -nostdinc -D_LIBC -I../../../../include -I.  -Os -funit-at-a-time  -mno-split-addresses -isystem /usr/lib/gcc/mipsel-softfloat-linux-uclibc/3.4.6/include -DNDEBUG -fPIC  -c bsd-_setjmp.S -o bsd-_setjmp.o
mipsel-softfloat-linux-uclibc-strip -x -R .note -R .comment bsd-_setjmp.o
mipsel-softfloat-linux-uclibc-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -mips1 -msoft-float -fno-stack-protector-all -fstack-protector -fno-builtin -nostdinc -D_LIBC -I../../../../include -I.  -Os -funit-at-a-time  -mno-split-addresses -isystem /usr/lib/gcc/mipsel-softfloat-linux-uclibc/3.4.6/include -DNDEBUG -fPIC  -c bsd-setjmp.S -o bsd-setjmp.o
mipsel-softfloat-linux-uclibc-strip -x -R .note -R .comment bsd-setjmp.o
mipsel-softfloat-linux-uclibc-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -mips1 -msoft-float -fno-stack-protector-all -fstack-protector -fno-builtin -nostdinc -D_LIBC -I../../../../include -I.  -Os -funit-at-a-time  -mno-split-addresses -isystem /usr/lib/gcc/mipsel-softfloat-linux-uclibc/3.4.6/include -DNDEBUG -fPIC  -c setjmp.S -o setjmp.o
mipsel-softfloat-linux-uclibc-strip -x -R .note -R .comment setjmp.o
mipsel-softfloat-linux-uclibc-gcc  -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing  -mips1 -msoft-float -fno-stack-protector-all -fstack-protector -fno-builtin -nostdinc -D_LIBC -I../../../../include -I.  -Os -funit-at-a-time  -mno-split-addresses -isystem /usr/lib/gcc/mipsel-softfloat-linux-uclibc/3.4.6/include -DNDEBUG -fPIC  -c clone.S -o clone.o
clone.S:27:21: asm/asm.h: No such file or directory
make[4]: *** [clone.o] Error 1
make[4]: Leaving directory `/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/work/uClibc-0.9.28.3/libc/sysdeps/linux/mips'
make[3]: *** [mips] Error 2
make[3]: Leaving directory `/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/work/uClibc-0.9.28.3/libc/sysdeps/linux'
make[2]: *** [_dir_linux] Error 2
make[2]: Leaving directory `/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/work/uClibc-0.9.28.3/libc/sysdeps'
make[1]: *** [_dir_sysdeps] Error 2
make[1]: Leaving directory `/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/work/uClibc-0.9.28.3/libc'
make: *** [_dir_libc] Error 2
 *
 * ERROR: cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2490:  Called die
 * The specific snippet of code:
 *       emake || die "make failed";
 *  The die message:
 *   make failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/temp/environment'.
 *

 * Messages for package cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4:

 * You really should consider setting UCLIBC_CPU
 * Otherwise, the build will be generic (read: slow).
 * Available CPU options:
 *
 * ERROR: cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2490:  Called die
 * The specific snippet of code:
 *       emake || die "make failed";
 *  The die message:
 *   make failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/cross/mipsel-softfloat-linux-uclibc/portage/cross-mipsel-softfloat-linux-uclibc/uclibc-0.9.28.3-r4/temp/environment'.
 *
Comment 1 MCassaniti 2008-04-21 05:35:06 UTC
Created attachment 150475 [details]
Build log for uClibc-0.9.28.3
Comment 2 MCassaniti 2008-04-21 05:38:12 UTC
Created attachment 150477 [details]
Build environment for uClibc-0.9.28.3
Comment 3 Christian Heim (RETIRED) gentoo-dev 2008-04-21 07:25:50 UTC
Well, there's no /usr/include/asm/asm.h (at least here).
Comment 4 Luke-Jr 2008-07-11 23:27:47 UTC
This is really a bug in linux-headers, I think. Linux's include/asm-mips certainly does have an asm.h
Comment 5 Luke-Jr 2008-07-12 00:06:31 UTC
Created attachment 160163 [details, diff]
uclibc trunk revision 16105

This commit from 2006(!) modified uclibc to not need the apparently-private headers. Adding it to the end of the Gentoo patchset should fix the problem.
Comment 6 MCassaniti 2008-07-13 02:12:36 UTC
Has anyone tested this patch, or are they relying on me to test it?
Just let me know and I will give it a go, but I will need some basic instructions on how to use the ebuild command to perform the build and have the patch applied.
Comment 7 Luke-Jr 2008-07-13 03:53:30 UTC
I needed 3 more patches (unrelated to this bug) to install 0.9.27-r1, but it did eventually work. What I did was Ctrl-Z after the unpacking finished and apply them in /var/tmp/... and let it continue from there.
Comment 8 MCassaniti 2008-07-13 05:03:58 UTC
At that rate Luke-Jr, can you upload those additional patches to whichever bug report they belong to if you have not done so already. Could you also state which bug reports these are so I can fetch the patches and apply them to my build process.

Could a dev please reply to this bug report, letting us all know when this patch will make its way into the sys-kernel/linux-headers package. If it is not appropriate for addition into that package, could the appropriate cross development team member be notified so that it could be included there.
Comment 9 Luke-Jr 2008-07-13 06:07:35 UTC
I don't know of any bugs they relate directly to. I have a copy at http://luke.dashjr.org/tmp/uclibc-patches
solar was asking me about this stuff earlier...
Comment 10 Milan Holzäpfel 2009-04-19 14:35:04 UTC
Created attachment 188884 [details]
Patchset which works for cross-mips-linux-uclibc/uclibc-0.9.28.3-r7

I ran into the problem described above and also into the problem described in http://www.nabble.com/uClibc-missing-limits.h-ts18068204.html (limits.h not found due to new GCC needing different include flags) with cross-mips-linux-uclibc/uclibc-0.9.28.3-r7

This patchset fixes both.  It includes the 3 patches from http://luke.dashjr.org/tmp/uclibc-patches plus 1 patch for the limits.h issue (based on http://sourceware.org/ml/libc-alpha/2007-03/msg00017.html)

45_all_uClibc-fix-linux-2.6.18.patch from the link is required.  I haven't checked whether 50-gcc-bug.patch and 55-ljr-build.patch from the link are required, too.  I changed some whitespace in 55-ljr-build.patch to make it apply. 

I hope it's ok that I post these patches into this bug, although strictly speaking they're for separate bugs... if it's not, please tell me where to post them. (I haven't found other open bugs.)

Regards,
Milan
Comment 11 solar (RETIRED) gentoo-dev 2009-04-20 04:49:46 UTC
We are unlikely to backport fixes to the .28 series. 
Please try everything in this bug with current uclibc. tia.
Comment 12 SpanKY gentoo-dev 2012-05-16 05:11:05 UTC
should be fixed with 0.9.33.x