guix-devel
[Top][All Lists]
Advanced

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

Re: arm-none-eabi toolchain and compiling C++ stuff


From: Ekaitz Zarraga
Subject: Re: arm-none-eabi toolchain and compiling C++ stuff
Date: Wed, 20 Dec 2023 21:53:21 +0100



On 2023-12-20 21:28, Attila Lendvai wrote:
dear Guix,

i'm trying to compile something to a raspberry rp2040 microcontroller 
(https://codeberg.org/Riku_V/pico-serprog).

$ guix shell gcc-toolchain cmake make pkg-config -e "((@ (gnu packages embedded) 
make-arm-none-eabi-toolchain-7-2018-q2-update))"
$ cd _deps
$ git clone https://github.com/raspberrypi/pico-sdk.git pico_sdk-src
$ cd ..
$ cmake .
$ make

so far, so good. it compiles for a while, but then it fails with:

[ 14%] Building CXX object 
CMakeFiles/pico_serprog.dir/_deps/pico_sdk-src/src/rp2_common/pico_standard_link/new_delete.cpp.obj
In file included from 
pico-serprog/_deps/pico_sdk-src/src/rp2_common/pico_standard_link/new_delete.cpp:11:0:
/gnu/store/7i9fw82x6hljy6sb4g10v2dl53l7pybl-profile/arm-none-eabi/include/c++/cstdlib:75:25:
 fatal error: stdlib.h: No such file or directory
  #include_next <stdlib.h>

if i read this right, it tries to cross compile some C++ stuff, but a header 
file is missing.

$ guix locate stdlib.h
[...]
gcc-toolchain@13.2.0 
/gnu/store/dpfxpfyghkc19wz8jwaw31llhnvn8ngx-gcc-toolchain-13.2.0/include/stdlib.h
gcc-toolchain@11.3.0 
/gnu/store/5vn4pkf70ql7v1svrfknfkfsh4m3737h-gcc-toolchain-11.3.0/include/stdlib.h
clang-toolchain@15.0.7 
/gnu/store/6m5gi7l7bi93gnzm2j422q9wawq3p6al-clang-toolchain-15.0.7/include/stdlib.h
[...]

i.e. it's usually part of the gcc-toolchain package... but it's not part of the 
cross-compiling ones?

is that a bug in (gnu packages embedded)? shall i look into fixing it?

or am i the one who has invalid expectations?


Hi Attila,

I reported the very same problem some time ago. This should just work in Guix. I don't think your expectations are wrong.
It should work.

In fact, there is a proposal:

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

That claims to fix this.
We should take a look into it.

Thanks for raising a little bit more of awareness on this... I have some Picos at home and they are literally unusable at this point :)

Cheers,
Ekaitz



reply via email to

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