apache / nuttx

Apache NuttX is a mature, real-time embedded operating system (RTOS)
https://nuttx.apache.org/
Apache License 2.0
2.6k stars 1.11k forks source link

Removing app via menuconfig causes build fail #9092

Closed TimJTi closed 1 year ago

TimJTi commented 1 year ago

If you deselect an app usingmake menuconfigthe build always fails, even if you do a make clean and a make apps_clean.

The only solution is a make distclean which doesn't seem right to me?

Foe example, enabling then disabling the tone generator example app gies the following error:

LD: nuttx
arm-none-eabi-ld: /home/tim/designs/nuttx/nuttx/staging/libapps.a(builtin_list.c.home.tim.designs.nuttx.apps.builtin.o):(.rodata+0x34): undefined reference to `audio_rttl_main'
acassis commented 1 year ago

@TimJTi seems it is something specific for your setup or your board, etc. You didn't supply much information to duplicate the issue.

Here is a test confirming that building system is working as expected:

$ ./tools/configure.sh esp32-devkitc:nsh

$ make menuconfig

Enable HELLO

$ make -j

Compiled fine:

LD: nuttx CP: nuttx.hex MKIMAGE: ESP32 binary esptool.py -c esp32 elf2image -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx esptool.py v3.3 Creating esp32 image... Merged 1 ELF section Successfully created esp32 image. Generated: nuttx.bin (ESP32 compatible)

$ make menuconfig

Disable HELLO

$ make -j

Compiled fine:

LD: nuttx CP: nuttx.hex MKIMAGE: ESP32 binary esptool.py -c esp32 elf2image -fs 4MB -fm dio -ff 40m -o nuttx.bin nuttx esptool.py v3.3 Creating esp32 image... Merged 1 ELF section Successfully created esp32 image. Generated: nuttx.bin (ESP32 compatible)

TimJTi commented 1 year ago

Hmmm....this has been the case (for me) for a few months or more, but wasn't an issue a year ago. I wonder it it is related to having out-of-tree apps which I only added relatively recently. I have a symbolic link to my custom apps folder - I will have a play around, and see if I can work out the reason.

TimJTi commented 1 year ago

I went to investigate this and now can't replicate it. Either something has changed or I was being a numpty (most likely) so I will close for now and can always reopen if I see it again and can provide more information.

TimJTi commented 1 year ago

Reopened in error!