Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201949 - cross compiling gcc fails because of broken library search paths
Summary: cross compiling gcc fails because of broken library search paths
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-11 14:29 UTC by zeuner
Modified: 2007-12-18 08:06 UTC (History)
1 user (show)

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


Attachments
/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libiberty/config.log (config.log,48.73 KB, text/plain)
2007-12-11 14:33 UTC, zeuner
Details
/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libstdc++-v3/config.log (config.log,97.87 KB, text/plain)
2007-12-11 14:34 UTC, zeuner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zeuner 2007-12-11 14:29:21 UTC
I'm trying to cross-compile gcc for x86_64 on i686 using crossdev (that is, I already have a crossdev-gcc, but I want to compile one to run independently inside the cross-compiled environment). It fails on configuring libiberty or libstdc++-v3 because it cannot link (crt1.o is not found). A workaround is to symlink $ROOT/usr/x86_64-pc-linux-gnu/usr/lib/*crt*.o to /usr/x86_64-pc-linux-gnu/lib so the *crt*.o libraries are found.

Reproducible: Always

Steps to Reproduce:
1. create cross compile environment using crossdev
2. install gcc prerequisites into cross compile environment
3. try to install gcc into the cross compile environment

Actual Results:  
failure when configuring libiberty or libstdc++-v3

Expected Results:  
exit 0
Comment 1 zeuner 2007-12-11 14:33:41 UTC
Created attachment 138260 [details]
/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libiberty/config.log
Comment 2 zeuner 2007-12-11 14:34:18 UTC
Created attachment 138261 [details]
/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libstdc++-v3/config.log
Comment 3 SpanKY gentoo-dev 2007-12-11 16:43:08 UTC
no idea why you're talking about ROOT ... crossdev does everything independent of ROOT

use crossdev like normal and you get glibc installed into /usr/$CTARGET/
Comment 4 zeuner 2007-12-13 14:36:57 UTC
(In reply to comment #3)
> no idea why you're talking about ROOT ... crossdev does everything independent
> of ROOT
> 
> use crossdev like normal and you get glibc installed into /usr/$CTARGET/
> 

Yes, creating glibc and gcc in /usr/$CTARGET using crossdev worked fine. The problem was raised by trying to create a working gcc inside $ROOT using the toolchain created by crossdev with regular emerge. Is there a better way to have a cross-compiled $ROOT with a working compiler inside (thus not being forced to cross-compile anymore)?
Comment 5 SpanKY gentoo-dev 2007-12-13 18:51:54 UTC
i still dont understand what you're attempting to do

when you run `crossdev <target>`, it builds up a proper cross-compiler toolchain which includes glibc being installed into /usr/<target>

if you want to build up a gcc to run on <target>, then you do:
ROOT=/some/place emerge gcc
(assuming you've setup everything else)

please post any questions you have to the embedded list ... bugzilla is for fixing bugs, not handling support
Comment 6 zeuner 2007-12-17 14:24:12 UTC
(In reply to comment #5)
> i still dont understand what you're attempting to do
> 

but interestingly, you describe what I'm attempting to do in detail

> when you run `crossdev <target>`, it builds up a proper cross-compiler
> toolchain which includes glibc being installed into /usr/<target>
> 

Did that. (Step 1 in the bug report)

> if you want to build up a gcc to run on <target>, then you do:
> ROOT=/some/place emerge gcc

Tried that. (Step 3 in the bug report, and the actual bug)

> (assuming you've setup everything else)

Did that before. (Step 2 in the bug report)

> 
> please post any questions you have to the embedded list ... bugzilla is for
> fixing bugs, not handling support
> 

So it looks like I was already doing it correctly, when I encountered the bug. Furthermore, I provided a workaround and asked for the bug to be fixed. As you correctly stated, bugzilla is for fixing bugs, so I put it in the correct place. But it is not for making fun of bug reporters, so it may be more helpful to ask for possibly missing information instead for doing so.
Comment 7 SpanKY gentoo-dev 2007-12-18 08:06:43 UTC
if you're symlinking stuff, you're doing it wrong

crossdev already takes care of making sure the crt objects are in the right place for the cross-compiler toolchain

if it's not finding it, you're doing something wrong.  look for help on the embedded mailing list, not here.

i dont know why you think i'm "making fun of you" when i'm not.  i'm simply telling you you're doing (whatever it is you're doing) wrong.  whether it be the commands you're running or improperly setting up your cross-environment, i dont know.  ask for help on the mailing list.