help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

arm-none-eabi-toolchain: stdlib.h not found


From: Stefan
Subject: arm-none-eabi-toolchain: stdlib.h not found
Date: Sat, 7 Oct 2023 13:44:39 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

Hi Ekaitz!

I tried to reproduce your problem, and indeed it produces the same error you are encountering.

$ guix shell arm-none-eabi-toolchain
[env]$ ls
a.c
[env]$ cat a.c
#include <cstdlib>
void operator delete(void* p) {std::free(p);}
int main() {return 0;}
[env]$ arm-none-eabi-g++ -x c++ a.c
In file included from a.c:1:0:
/gnu/store/6bq6svar4b2mkp2k3laxqqs1nsxykrvf-profile/arm-none-eabi/include/c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.

Then I tried it with my self build toolchain gcc12-cross-newlib-arm-none-eabi-toolchain-12.2.0¹, which works as expected:

$ arm-none-eabi-g++ -x c++ -c a.c
$ ls
a.c  a.o
$ arm-none-eabi-g++ -x c++ a.c -lg -lrdpmon
$ ls
a.c  a.o  a.out
$ file a.out
a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped


Bye

Stefan


¹ https://lists.gnu.org/archive/html/guix-devel/2023-10/msg00014.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]