1
votes

I am trying to cross compile glibc 2.16 for ARM on a x86_64 machine running ubuntu 12.04. I am using the gcc-arm-linux-gnueabi toolchain from the repository. configured with:

 ../glibc-2.16.0/configure --build=arm-linux-gnueabi --host=arm-linux-gnueabi --enable-add-ons --with-headers=/usr/arm/include/ --prefix=/usr/arm

when i run make i hit this error:

/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find libgcc_s.so.1 collect2: ld returned 1 exit status

location of libgcc_s.so

/usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc_s.so

creating a symlink to libgcc_s.so.1 in the same folder causes this error:

/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot open linker script file /usr/lib/gcc/arm-linux-gnueabi/4.6/libgcc_s.so.1: Too many open files
collect2: ld returned 1 exit status

Any ideas what to do next?

1

1 Answers

2
votes

This was caused by a broken toolchain, i completely removed and purged all arm-linux related files and re-installed the toolchain and libs and now it works again.