Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38889 - glibc compile failure during crossdev.sh --target=sparc64 on an i686
Summary: glibc compile failure during crossdev.sh --target=sparc64 on an i686
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Joshua Kinard
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-20 22:02 UTC by Lars Weiler (RETIRED)
Modified: 2004-01-22 08:50 UTC (History)
0 users

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 Lars Weiler (RETIRED) gentoo-dev 2004-01-20 22:02:08 UTC
That's the error message:

../sysdeps/wordsize-32/divdi3.c:26:2: #error This is for 32-bit targets only
make[2]: *** [/var/tmp/portage/crossdevbuild/glibc-2.3.2/buildhere-sparc64/csu/divdi3.os] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/crossdevbuild/glibc-2.3.2/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/crossdevbuild/glibc-2.3.2'
make: *** [all] Error 2
                                                                                                                                
 * glibc failed to compile!


And that's my emerge info:

Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.6.0-gentoo)
=================================================================
System uname: 2.6.0-gentoo i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.10p1
distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -Os -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache cvs fixpackages sandbox userpriv usersandbox"
GENTOO_MIRRORS="ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://ftp.tu-clausthal.de/pub/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X aalib alsa apache2 apm avi berkdb bonobo cdr crypt cups dga dvd encode esd evo fbcon foomaticdb fusion gdbm gif gnome gpm gtk2 gtkhtml imap imlib ipv6 java jpeg ldap libg++ libwww maildir mikmod mmx mozilla moznocompose moznoirc moznomail mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba scanner sdl spell sse ssl svga tcltk tcpd tetex tiff transcode truetype usb v4l vim-with-x x86 xml xml2 xosd xv zlib video_cards_nvidia"
Comment 1 Lars Weiler (RETIRED) gentoo-dev 2004-01-21 18:39:53 UTC
If you want, I can be a tester for crossdev, as I own a PIII-700 (i686), an iBook (ppc-G3) and an Ultra10 (sparc64).

My tests so far: 
ppc on i686: works
sparc64 on i686: see this bug
i686 on sparc64: does not compile glibc
ppc on sparc64: does not compile glibc
i686 on ppc: not tested yet
sparc64 on ppc: not tested yet
Comment 2 Joshua Kinard gentoo-dev 2004-01-22 02:32:32 UTC
Ah, I see.  You won't have much luck with this, it's a glibc thing.  64-bit support for sparc glibc isn't fully complete yet I believe, or it atleast involves various rituals and sacrifices to dark gods in order to compile it (whether it'd work or not is another thing).  Not much I can do about this unfortunately.

As for testing crossdev, give it a shot.  crossdev-status.sh will show you all the possible target combinations (to date) and what their current status is on each corresponding arch (that was a fun bit of bash to code).

i686 targets on other archs will probably not work, and the reason is the headers used to build gcc-bootstrap with.  For gcc-bootstrap, I just make a direct copy of /usr/include, hwich isn't really the best thing to do.  From my understanding and reading, it seems it's possible (somehow) to "make install-headers" inside of glibc and actually have glibc generate clean headers specifically for the target architecture before the bootstrap compiler is even built.  After those headers are in place, the bootstrap compiler builds and so on.  I never got very far with that trick though.  If anyone can solve it, I'm all ears.

You might take a look at Dan Kegel's "crosstool" script, which I used as reference for crossdev for some things to see how he does this step: http://www.kegel.com/crosstool/

Anyways, I'll close this bug off as CANTFIX since the original issue is a glibc thing.  If you wanna help with crossdev some more, hang out in #gentoo-embedded.  I'll start working on it some more once I fix my x86 box back up and kick out mips stageballs.
Comment 3 Lars Weiler (RETIRED) gentoo-dev 2004-01-22 08:50:16 UTC
Thanks a lot for the explanation :-)  When I find some time I will look into the mentioned crosstools and gather information how to set up a cross-compiler.  But I target it on a low priority.