Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crossdev amd64 -> alpha fails to build
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Wed Jul 09, 2008 9:41 pm    Post subject: crossdev amd64 -> alpha fails to build Reply with quote

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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Thu Jul 10, 2008 5:32 am    Post subject: Reply with quote

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
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Thu Jul 10, 2008 12:00 pm    Post subject: Reply with quote

thanks for the hint. i will try it out.
is there anything i should report on b.g.o.?
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Thu Jul 10, 2008 9:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Fri Jul 11, 2008 3:00 pm    Post subject: Re: crossdev amd64 -> alpha fails to build Reply with quote

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
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3747

PostPosted: Fri Jul 11, 2008 3:05 pm    Post subject: Reply with quote

@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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Fri Jul 11, 2008 3:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3747

PostPosted: Fri Jul 11, 2008 3:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
Pseudonimo
Guru
Guru


Joined: 10 Mar 2007
Posts: 393

PostPosted: Mon Jul 21, 2008 9:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Mon Jul 21, 2008 9:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Pseudonimo
Guru
Guru


Joined: 10 Mar 2007
Posts: 393

PostPosted: Wed Aug 06, 2008 12:10 pm    Post subject: Reply with quote

I think this might have led me to http://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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Wed Aug 06, 2008 4:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Pseudonimo
Guru
Guru


Joined: 10 Mar 2007
Posts: 393

PostPosted: Wed Aug 06, 2008 10:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7301
Location: Groton, Massachusetts USA

PostPosted: Thu Aug 07, 2008 3:15 am    Post subject: Reply with quote

Pseudonimo wrote:
were you following gcc ml, how did you know??

It was a lucky guess ... :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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