View previous topic :: View next topic |
Author |
Message |
alex.blackbit Advocate
Joined: 26 Jul 2005 Posts: 2397
|
Posted: Wed Jul 09, 2008 9:41 pm Post subject: crossdev amd64 -> alpha fails to build |
|
|
hi,
i already successfully built a toolchain for i686.
for the alpha platform the build of the glibc headers fails with Code: | checking whether gcc -O1 -pipe supports -mlong-double-128... no
configure: error: this configuration requires -mlong-double-128 support |
google is no help.
can i do anything against that?
thx. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Thu Jul 10, 2008 5:32 am Post subject: |
|
|
I encountered the same error with crossdev amd64 -> powerpc
If you are using gcc-4.2 (or earlier), this should do the trick.
Code: | # crossdev --without-headers --target alpha-unknown-linux-gnu |
If you are using gcc-4.3 , a slightly different procedure is required.
First thing I did was modify /usr/sbin/crossdev
Code: | # diff -u /usr/sbin/crossdev.old /usr/sbin/crossdev
--- /usr/sbin/crossdev.old 2008-07-10 01:16:44.000000000 -0400
+++ /usr/sbin/crossdev 2008-07-10 01:22:16.000000000 -0400
@@ -331,7 +331,7 @@
DEFAULT_VER="[latest]"
GUSE_DISABLE="-boundschecking -d -fortran -gtk -gcj -libffi -mudflap -objc -objc++ -objc-gc -openmp"
GUSE_DISABLE_STAGE_2=${GUSE_DISABLE/-fortran}
-WITH_HEADERS="COW" WITH_DEF_HEADERS="yes" #227065 gcc-4.3+ is a pita w/out headers
+WITH_HEADERS="COW" #WITH_DEF_HEADERS="yes" #227065 gcc-4.3+ is a pita w/out headers
EX_FAST="no"
EX_GCC="no"
EX_GDB="no"
@@ -586,7 +586,7 @@
# we include the '-u' so that we don't re-emerge packages
EOPTS_DEF="${UOPTS} --nodeps --oneshot"
-EOPTS_UP="${EOPTS_DEF} -u"
+EOPTS_UP="${EOPTS_DEF}"
EOPTS=${EOPTS_UP}
# keep things like --ask from screwing us up
export EMERGE_DEFAULT_OPTS="" |
Then, I got around the glibc-headers problem by building gcc in 2 passes.
Code: | # crossdev --stage3 --gcc 4.2.4 --target powerpc-unknown-linux-gnu
# emerge --unmerge cross-powerpc-unknown-linux-gnu/gcc
# crossdev --gcc 4.3.1-r1 --target powerpc-unknown-linux-gnu |
I have not tried this technique on an alpha target, but there is a good chance it would work. |
|
Back to top |
|
|
alex.blackbit Advocate
Joined: 26 Jul 2005 Posts: 2397
|
Posted: Thu Jul 10, 2008 12:00 pm Post subject: |
|
|
thanks for the hint. i will try it out.
is there anything i should report on b.g.o.? |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Thu Jul 10, 2008 9:44 pm Post subject: |
|
|
The bugs that I filed concerning crossdev were met with some resistance, so when I finally found a workaround, I emailed vapier@gentoo.org privately with the details.
If this trick works for you too, then you may want to drop him a note. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Fri Jul 11, 2008 3:00 pm Post subject: Re: crossdev amd64 -> alpha fails to build |
|
|
alex.blackbit wrote: | i already successfully built a toolchain for i686. |
This would have failed too (on the glibc-headers), if it weren't for the fact that your amd64-multilib toolchain already supports compiling i686 code.
ps. I just tried --target alpha-unknown-linux-gnu , and it worked
gcc-config -l wrote: | [1] alpha-unknown-linux-gnu-4.3.1 *
[2] i686-pc-linux-gnu-4.3.1 *
[3] powerpc-unknown-linux-gnu-4.3.1 *
[4] x86_64-pc-linux-gnu-4.3.1 * |
|
|
Back to top |
|
|
gringo Advocate
Joined: 27 Apr 2003 Posts: 3793
|
Posted: Fri Jul 11, 2008 3:05 pm Post subject: |
|
|
@cyrillic -> thanks a lot for the info ! i´m experiencing the same problem and will try out your workaround.
btw, no need to patch crossdev, you simply can play with the --with-headers ( --without-headers) switches.
cheers _________________ Error: Failing not supported by current locale |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Fri Jul 11, 2008 3:31 pm Post subject: |
|
|
gringo wrote: | btw, no need to patch crossdev, you simply can play with the --with-headers ( --without-headers) switches. |
You also need to remove "-u" from the emerge options, or else some packages will get skipped. |
|
Back to top |
|
|
gringo Advocate
Joined: 27 Apr 2003 Posts: 3793
|
Posted: Fri Jul 11, 2008 3:32 pm Post subject: |
|
|
cyrillic wrote: | gringo wrote: | btw, no need to patch crossdev, you simply can play with the --with-headers ( --without-headers) switches. |
You also need to remove "-u" from the emerge options, or else some packages will get skipped. |
oops, sorry, you are right of course, i missed that part.
cheers _________________ Error: Failing not supported by current locale |
|
Back to top |
|
|
Pseudonimo Guru
Joined: 10 Mar 2007 Posts: 393
|
Posted: Mon Jul 21, 2008 9:09 pm Post subject: |
|
|
Thanks cyrillic, this fixed my problems!!
On my i686 I ran Code: | crossdev --stage3 --l 2.7-r2 --g 4.1.3 --target powerpc64-unknown-linux-gnu
crossdev --l 2.7-r2 --g 4.1.3 --target powerpc64-unknown-linux-gnu |
Though probably doing the last one only would've worked. I'll post on the bugzilla too so devs can know. _________________ Please search *well* before posting, look for bugs (check all status), use google syntax and *please* read the man pages and think. All obvious steps, frequently ignored. Add [solved] when finished. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Mon Jul 21, 2008 9:29 pm Post subject: |
|
|
Pseudonimo wrote: | probably doing the last one only would've worked. |
Yes, doing 2 passes is only required if you want gcc-4.3 |
|
Back to top |
|
|
Pseudonimo Guru
Joined: 10 Mar 2007 Posts: 393
|
Posted: Wed Aug 06, 2008 12:10 pm Post subject: |
|
|
I think this might have led me to https://bugs.gentoo.org/show_bug.cgi?id=233986, since I'm getting "undefined" errors.
I also tried to compile glibc by hand and had the
Code: | configure: error: this configuration requires -mlong-double-128 IBM extended format support |
So, this can be an upstream error, and your patch could be hurting some cases no? It worked for me for lower versions of gcc, it's >=gcc-4.3.0 that's problematic _________________ Please search *well* before posting, look for bugs (check all status), use google syntax and *please* read the man pages and think. All obvious steps, frequently ignored. Add [solved] when finished. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Wed Aug 06, 2008 4:37 pm Post subject: |
|
|
Pseudonimo wrote: | So, this can be an upstream error ... |
It is not an error, it is just a circular dependency that crossdev is not able to handle at this time.
Starting with gcc-4.3 the developers decided to "clean-up" the way headers are handled, and because of this, glibc-headers are required if you want to compile gcc.
Crossdev's --with-headers option is the right idea, but it doesn't actually work, because in order to compile cross-glibc (or just the headers) you need a cross-gcc.
My little workaround is just a hack, but hopefully someone with more programming skills can take this idea and provide a proper fix for crossdev. |
|
Back to top |
|
|
Pseudonimo Guru
Joined: 10 Mar 2007 Posts: 393
|
Posted: Wed Aug 06, 2008 10:38 pm Post subject: |
|
|
Ah now I get it! I didn't notice you used two gcc versions in the workaround..
I finally have cross gcc-4.3.1, thank you so much! I've been looking everywhere, were you following gcc ml, how did you know??
_________________ Please search *well* before posting, look for bugs (check all status), use google syntax and *please* read the man pages and think. All obvious steps, frequently ignored. Add [solved] when finished. |
|
Back to top |
|
|
cyrillic Watchman
Joined: 19 Feb 2003 Posts: 7313 Location: Groton, Massachusetts USA
|
Posted: Thu Aug 07, 2008 3:15 am Post subject: |
|
|
Pseudonimo wrote: | were you following gcc ml, how did you know?? |
It was a lucky guess ... |
|
Back to top |
|
|
|