0

I am working with arm-none-eabi-gcc on Ubuntu 20.04 version. My code repo already contains arm tools, but those are 2012 tools. When I did make(the file which contains compile commands), I got the arm-none-eabi-gcc not found error. Resolved this error by downloading the latest arm tools and replacing tool files. Later got an undefined reference for the '__exit' error, which I resolved by checking the post at exit.c:(.text+0x18): undefined reference to `_exit' when using arm-none-eabi-gcc Currently am facing a new error

tools/arm-2012.09/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: ../Debug/obj/nvram_functions.o: in function rtc_init_language_struct': nvram_functions.c:(.text+0x4a28): undefined reference to ctype_ptr' collect2: error: ld returned 1 exit status make[1]: *** [makefile:299: elf] Error 1

Please help me resolve this issue. Unable to find a solution in other posts

Sujith Kumar
  • 872
  • 6
  • 19

1 Answers1

1

Compilers and their support libraries tend to come in pairs - I wouldn't expect this to work if you just replaced the compiler binary but not the support libraries.

Compiled binaries built with one compiler version, or linked against a specific C library binary, are not guaranteed to be compatible with those compiled with a different version of the same compiler or C library.

solidpixel
  • 10,688
  • 1
  • 20
  • 33
  • I have copied all required binaries as well. – supriya789 May 26 '23 at 05:18
  • Can someone help me on this. I kind of stuck with this. Unable to identify which libraries were missing here. – supriya789 May 29 '23 at 05:31
  • Again, this is normally a sign that you have mismatched objects/libraries built with different versions of the compiler and/or C library. Rather than patching bits of an existing compiler install, compile the whole project (including dependencies) with a clean install of the same compiler. Make sure your C library also comes from the same compiler install. – solidpixel May 29 '23 at 08:27