Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Crossdev i686 -> ppc fails at glibc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
yther
Apprentice
Apprentice


Joined: 25 Oct 2002
Posts: 151
Location: Charlotte, NC (USA)

PostPosted: Mon Feb 06, 2006 2:37 pm    Post subject: Crossdev i686 -> ppc fails at glibc Reply with quote

Since google did not turn up any useful answers (on these forums or the Web in general), I'm hoping this is a good place to ask for help. (Crossdev posts pop up all over the place, so I'm not even sure which forum is the best.)

Anyway, I'm trying to set up distcc for cross-compiling, and the current version of crossdev (0.9.12-r1 as of yesterday) gets through 3 of the 4 steps before failing at glibc.
Code:
...
checking for economical random device... has been disabled
running configure fragment for sysdeps/powerpc/powerpc32/elf
checking for powerpc32 TLS support... no
running configure fragment for sysdeps/pthread
running configure fragment for libidn/sysdeps/unix
running configure fragment for sysdeps/unix/sysv/linux
checking for egrep... (cached) grep -E
checking installed Linux kernel header files... 2.0.10 or later
checking for kernel header at least 2.4.1... ok
running configure fragment for sysdeps/unix/common
running configure fragment for sysdeps/unix
running configure fragment for sysdeps/powerpc
checking for .machine support... no
configure: error:
*** A binutils version which can handle
***    .machine "altivec"
*** is needed.

!!! ERROR: cross-powerpc-unknown-linux-gnu/glibc-2.3.6-r2 failed.
!!! Function glibc_do_configure, Line 981, Exitcode 1
!!! failed to configure glibc
!!! If you need support, post the topmost build error, NOT this status message.

This box is a G4; distcc host is a dual-P3 that runs twice as fast.
Code:
panopticon root # gcc-config -l
 [1] i686-pc-linux-gnu-3.4.4 *
 [2] i686-pc-linux-gnu-3.4.4-hardenednopie
 [3] i686-pc-linux-gnu-3.4.4-hardenednopiessp
 [4] i686-pc-linux-gnu-3.4.4-hardenednossp
 [5] i686-pc-linux-gnu-3.4.4-vanilla
 [6] powerpc-unknown-linux-gnu-3.4.5 *
 [7] powerpc-unknown-linux-gnu-3.4.5-hardenednopie
 [8] powerpc-unknown-linux-gnu-3.4.5-hardenednopiessp
 [9] powerpc-unknown-linux-gnu-3.4.5-hardenednossp
 [10] powerpc-unknown-linux-gnu-3.4.5-vanilla

panopticon root # binutils-config -l
 [1] i686-pc-linux-gnu-2.16.1 *

 [2] powerpc-unknown-linux-gnu-2.16.1 *

I have also tested with a vanilla GCC (gcc-config 5) on the i686 box, and the build fails at the same place.

Since it has already built binutils, I'm puzzled as to why it now claims that binutils don't support altivec.

In case it helps, here is the "info.log" crossdev creates:
Code:
 * Host Portage ARCH:     x86
 * Target Portage ARCH:   ppc
 * Target System:         powerpc-unknown-linux-gnu
 * Stage:                 4 (C/C++ compiler)

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               linux-headers-[latest]
 * libc:                  glibc-[latest]

 * PORTDIR_OVERLAY:       /usr/local/portage
 * PORT_LOGDIR:           /var/log/portage
 * PKGDIR:                /mnt/storage/2/packages/cross/powerpc-unknown-linux-gnu
 * PORTAGE_TMPDIR:        /var/tmp/cross/powerpc-unknown-linux-gnu
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  - 
~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  - 
Gentoo Base System version 1.4.16
Portage 2.0.54 (hardened/x86, gcc-3.4.4, glibc-2.3.5-r2, 2.6.7-hardened-r16 i686
)
=================================================================
System uname: 2.6.7-hardened-r16 i686 Pentium III (Coppermine)
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disable
d]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
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.22
virtual/os-headers:  2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3
/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /us
r/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /
usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/sha
re/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbo
x"
GENTOO_MIRRORS="http://www.gtlib.gatech.edu/pub/gentoo http://distro.ibiblio.org
/pub/linux/distributions/gentoo/ http://mirror.datapipe.net/gentoo http://gentoo
.cites.uiuc.edu/pub/gentoo/"
LANG="en_US"
MAKEOPTS="-j3"
PKGDIR="/mnt/storage/2/packages/cross/powerpc-unknown-linux-gnu"
PORTAGE_TMPDIR="/var/tmp/cross/powerpc-unknown-linux-gnu"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa arts audiofile berkdb bonobo bzip2 cdr crypt cups curl dga dlloader
dvd ethereal exif expat fam ffmpeg flac foomaticdb gb gd gdbm ggi gif gimp glut
gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hardened idn imagemagick imap imlib
 java joystick jpeg jpeg2k kde lcms ldap libgda libwww mad maildir matroska mbox
 mikmod mmx mng monkey motif moznocompose moznoirc moznomail mozp3p mozsvg ncurs
es odbc ofx ogg opengl pam pcre perl pic plotutils png ppds python qt quotes rea
dline scanner sdl slang speex spell sqlite sse ssl svga tcltk tcpd tetex tiff tr
uetype usb userlocales vorbis wmf x86 xine xml xml2 xmms xv xvid zlib userland_G
NU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS


If there is any more info you need, please let me know.

Thanks for any help!
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Mon Feb 06, 2006 3:03 pm    Post subject: Reply with quote

I´ve been running distcc+crosscompiler for a while now between my amd64/ppc/x86 boxes and glibc is one of those packages that never built so far. It did however build a few times using the crosscompiler on my amd64 box, so i´m sure its a distcc issue, not gcc related.

cheers
Back to top
View user's profile Send private message
yther
Apprentice
Apprentice


Joined: 25 Oct 2002
Posts: 151
Location: Charlotte, NC (USA)

PostPosted: Tue Feb 07, 2006 1:09 am    Post subject: Reply with quote

gringo wrote:
I've been running distcc+crosscompiler for a while now between my amd64/ppc/x86 boxes and glibc is one of those packages that never built so far. It did however build a few times using the crosscompiler on my amd64 box, so i'm sure its a distcc issue, not gcc related.


Thanks for your reply; I think I've read about some of your activities on this subject while looking for info about this problem. :)

However, I'm not yet using distcc. I'm still trying to build the toolchain, of which glibc is a part, on the i686 box so I can attempt to use distcc.

How did you get glibc to build, using a cross-compiler but not the crossdev script? Was it tricky? (Hm, time to search the forums/wiki/web again, maybe read the crossdev script to see if I can puzzle it out...)
Back to top
View user's profile Send private message
yther
Apprentice
Apprentice


Joined: 25 Oct 2002
Posts: 151
Location: Charlotte, NC (USA)

PostPosted: Tue Feb 07, 2006 5:14 am    Post subject: Update - some progress? Reply with quote

Ok, I noticed that crossdev says it's building the latest version of these tools, like doing ACCEPT_KEYWORDS="~x86" emerge binutils would. So, I used crossdev's options to build only the latest stable versions of the toolchain. Again, the first 3 worked, and glibc failed, but with a different error—informing me that ssp.c has to be built with -fno-stack-protector. I used CFLAGS to pass that along and glibc got much farther this time, but didn't succeed.

Code:
make[4]: Leaving directory `/var/tmp/cross/powerpc-unknown-linux-gnu/portage/glibc-2.3.5-r3/work/glibc-2.3.5/stdlib'
/var/tmp/cross/powerpc-unknown-linux-gnu/portage/glibc-2.3.5-r3/work/build-default-powerpc-unknown-linux-gnu-linuxthreads/libc.a(__longjmp.o): In function `__longjmp@@GLIBC_2.3.$
../sysdeps/powerpc/powerpc32/fpu/__longjmp.S:(.text+0xe): undefined reference to `_rtld_global_ro'
/var/tmp/cross/powerpc-unknown-linux-gnu/portage/glibc-2.3.5-r3/work/build-default-powerpc-unknown-linux-gnu-linuxthreads/libc.a(setjmp.o): In function `__sigsetjmp@@GLIBC_2.3.4$
../sysdeps/powerpc/powerpc32/fpu/setjmp.S:(.text+0xb2): undefined reference to `_rtld_global_ro'
collect2: ld returned 1 exit status

I will keep working on this!
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue Feb 07, 2006 5:22 am    Post subject: Reply with quote

This is the same error people get with harded glibc which doesn't build natively on PPC either.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
jedsen
Apprentice
Apprentice


Joined: 15 Oct 2004
Posts: 276
Location: Sacramento, California, USA

PostPosted: Tue Feb 07, 2006 8:49 am    Post subject: Reply with quote

I find it's good to have your versions of gcc, glibc and linux-headers more or less up to date an synced between machines.
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Tue Feb 07, 2006 9:04 am    Post subject: Reply with quote

When it comes to crosscompile i just emerged crossdev and more or less followed this howto ( see last section).
http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO

it mostly worked out of the box. Some stuff didnt built but glibc did at least till 2.3.5 versions, if i remember correctly. But the big ones like firefox, thunderbird or xorg (even modular) _do_ built without problems here.
Nowadays glibc does not built here and im also not able to crosscompile a kernel but i suppose this is because of the big updates that are taking place over there.

When it comes to distcc + crosscompile, take a look to this thread, i think its quite helpful and interesting.
https://forums.gentoo.org/viewtopic-t-330422-highlight-distcc+crossdev.html

Good luck :D
Back to top
View user's profile Send private message
yther
Apprentice
Apprentice


Joined: 25 Oct 2002
Posts: 151
Location: Charlotte, NC (USA)

PostPosted: Wed Feb 08, 2006 5:05 am    Post subject: Reply with quote

JoseJX wrote:
This is the same error people get with harded glibc which doesn't build natively on PPC either.

Yes, and thanks to your advice when I reported a similar problem on bugzilla, I was able to build it on my PPC box by switching to a gcc-vanilla profile. :)

However, that last attempt was done after "gcc-config 10" switched the cross-compiler to vanilla. I'm not able to read the crossdev script well enough to tell if it's overriding that setting. Since crossdev has created the Portage overlay directories and populated them, it looks like I can follow some of these other tips and emerge glibc manually without too much struggle. Meanwhile, I'll try one thing and let it run while I'm in bed!

Code:
USE="-hardened" CFLAGS="-fno-stack-protector -fno-pie" crossdev -b -v --b 2.16.1 \
--g 3.4.4-r1 --l 2.3.5-r3 --k 2.6.11-r2 -t ppc

$ sleep 7h

EDIT: Didn't work. Not surprised. :evil:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum