1

I build sample code with cross compile linaro. I have two situations

Situation 1:

I download gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf from linaro website and extract it to path /home/xxx/opt/toolchains. I also

export
PATH=$PATH:/home/xxx/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin

Then i use eclipse for testing some simple example codes with Cross Settings /home/xxx/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin. But when i compile, i get this error.

/home/xxx/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld:
cannot find crt1.o: No such file or directory
/home/xxx/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.5.0/../../../../arm-linux-gnueabihf/bin/ld:
cannot find crti.o: No such file or directory

I found and know that crti.o and crt1.o in /home/xxx/opt/toolchains/gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib.

Situation 2:

When i follow another way. The first, i install

sudo apt-get install gcc-arm-linux-gnueabihf

Then in eclipse path of Cross Settings i config /usr/bin/ and build. Everything is OK.

So with situation 1, How I setup correctly in Eclipse? Thank for your support.

MWiesner
  • 8,868
  • 11
  • 36
  • 70
Trung Trinh
  • 57
  • 1
  • 7
  • I'm having a very similar problem with Eclipse and cross-compilation (from a Windows environment/mingw to a Linux 2.6.x ARM environment). Crt1.o not found. Did you fix your problem? – Adrien May 17 '18 at 14:11
  • @Adrien: check your libraries include files *.so and files symbol link. maybe some file broken. – Trung Trinh May 31 '18 at 09:28
  • @Adrien Look into these potential areas. --dynamic-linker, --sysroot, make sure that you are linking with ld and not gcc – aiao Jul 23 '19 at 15:00

0 Answers0