On Wed, 16 Aug 2023 16:29:11 +0200 I wrote: > On Wed, 16 Aug 2023 14:32:23 +0200 > Bernd Walter <ti...@cicely7.cicely.de> wrote: > > > On Wed, Aug 16, 2023 at 11:18:19AM +0200, Milan Obuch wrote:
[ snip ] > > > Additionally, for Raspberry Pi Pico, there is one more error > > > message, this time somewhat serious: > > > > > > Generating: nuttx.uf2 > > > tools/rp2040/elf2uf2 nuttx nuttx.uf2; > > > ld-elf.so.1: /usr/local/lib/gcc10/libstdc++.so.6: version > > > GLIBCXX_3.4.29 required by > > > /wrk/usr/ports/devel/apache-nuttx/work/nuttx/tools/rp2040/elf2uf2 > > > not found gmake: *** [tools/Unix.mk:541: nuttx] Error 1 > > > > > > and, consequently, nuttx.uf2 file for uploading to the board is > > > not prepared. This is not fatal for me, because I can execute > > > command > > > > > > /wrk/pico/pico-examples/build/elf2uf2/elf2uf2 -v nuttx > > > nuttx.bin.uf2 > > > > > > manually and got it. Again, it would be nice to fix this. In my > > > eyes, the preferable way for this would be just using already > > > available elf2uf2 binary, either in path, or, maybe, with > > > explicitly assigned via some ELF2UF2= assignment. The > > > PICO_SDK_PATH=/wrk/pico/pico-sdk assignment used above is just for > > > building this binary. I'd prefer to do it just once as part of > > > working setup preparation and not for every build, which could be > > > just done the way I mentioned. > > > > > > I run into that problem as well. > > It is very specific to the RP2040 build and Nuttx compiles some kind > > of tool, but uses a disfunctional GCC version, because it doesn't > > use the system compiler. > > Unfortunately the broken compiler is a dependency of the xtensa > > compiler toolchain. > > So you either have the xtensa build tools or you compile for RP2040. > > > > This is my local workaround: > > diff --git a/contrib/nuttx/tools/rp2040/Makefile.host > > b/contrib/nuttx/tools/rp2040/Makefile.host index > > 32717c11f7..aada7f9709 100644 --- > > a/contrib/nuttx/tools/rp2040/Makefile.host +++ > > b/contrib/nuttx/tools/rp2040/Makefile.host @@ -28,7 +28,7 @@ CFLAGS > > = -O2 -std=c++14 CFLAGS += > > -I$(PICO_SDK_PATH)/src/common/boot_uf2/include > > elf2uf2: $(PICO_SDK_PATH)/tools/elf2uf2/main.cpp > > - @g++ $(CFLAGS) -o $@ $< > > + @c++ $(CFLAGS) -o $@ $< > > > > clean: > > @rm -f *.o *.a *.dSYM *~ .*.swp > > > > Thanks, I suspected something like this, I did not analyzed it > thoroughly. I can live with this now, as I use jail for NuttX builds, > I can as easily use additional one for RP2040... I'll see later. > Note: using 12.0.0 sources, this problem does not occur. It looks like there was some change in build process after 12.0.0 was released. Regards, Milan