开发者

gcc support libraries fail when cross-compiling

I'm trying to cross-compile gcc 4.4.3 and it's cross libraries. I have set all the Environment Variables needed for cross-compilation (AS, CC, CXX, AR, RANLIB, STRIP) and used the same setup for a lot of other stuff alrea开发者_JAVA百科dy, all of which worked fine.

Now gcc itself also compiles without a problem but the support libraries are really puzzling me. When using make all of them, except for libgcc which compiles fine, give me:

configure: error: C compiler cannot create executables

The point in config.log where they all fail is:

configure:2569: checking for C compiler default output file name

configure:2572: i686-pc-gnu-gcc -g -march=i686 -O2 -pipe -mtune=generic conftest.c >&5

/home/lnz/abs-hurd/cross/cross/libexec/gcc/i686-pc-gnu/4.4.3/cc1: error while loading shared libraries: libc.so.0.3: cannot open shared object file: No such file or directory

The Problem here seems to be that cc1 is trying to load the libc used for the target. ldd confirms that this cc1 does not try to load libc.so.0.3 (linked to libc.so.6). libc.so.0.3 is not missing from the lib dir either. When trying the exact same command configure uses from command line everything works fine.

Help with this would be great, I've been looking at this for days without any progress.


Have you tried strace yet? You'll presumably want to do some filtering on that :-), of course.


Of course after I search for 4 days I find it in google 30mins after posting here -.-

What I had to do was set RPATH_ENVVAR to my LD_LIBRARY_PATH because apparently configure uses the target library dir when cross-compiling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜