This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error when building cross compiler


Denis Onischenko <denis.onischenko@gmail.com> writes:

> I am getting the following error when compiling "x86_64 to powerpc64"
> cross gcc, as soon as the libgcc_s.so.1 has appeared in obj/gcc
> directory.

This question would be more appropriate for the mailing list
gcc-help@gcc.gnu.org.  Please take any followups there.  Thanks.


> configure:2572: /a/linux/.powerpc/gcc/obj/./gcc/xgcc
> -B/a/linux/.powerpc/gcc/obj/./gcc/
> -B/a/linux/.powerpc/cross-tools/powerpc64-unknown-linux-gnu/bin/
> -B/a/linux/.powerpc/cross-tools/powerpc64-unknown-linux-gnu/lib/
> -isystem /a/linux/.powerpc/cross-tools/powerpc64-unknown-linux-gnu/include
> -isystem /a/linux/.powerpc/cross-tools/powerpc64-unknown-linux-gnu/sys-include
> -g -O2     conftest.c  >&5
> /a/linux/.powerpc/gcc/obj/./gcc/cc1: error while loading shared
> libraries: /a/linux/.powerpc/gcc/obj/./gcc/libgcc_s.so.1: ELF file
> data encoding not little-endian

...

> It seems that host cc1 executable tries to load target libgcc_s.so.1
> from obj/gcc directory, rather than host libgcc_s.so.1 from /lib. The
> message "error while loading shared libraries:
> /a/linux/.powerpc/gcc/obj/./gcc/libgcc_s.so.1: ELF file data encoding
> not little-endian" is from glibc.

What version of gcc are you using?

Exactly how did you run the configure script?

The -B option tells gcc where to find passes, but it does not normally
tell the dynamic linker where to find shared libraries.  Something is
causing the dynamic linker to think that it should use
/a/linux/.powerpc/gcc/obj/./gcc/libgcc_s.so.1 rather than
/lib/libgcc_s.so.1.  Is it possible that you have LD_LIBRARY_PATH set
in the environment?

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]