apache / nuttx

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

NuttX compile error #11109

Closed zouboan closed 1 year ago

zouboan commented 1 year ago

Hi: I haven't tested nuttx in a few months. Today I updated my local nuttx branch to master branch, but i was surprised to find that the compilation failed. The compilation log is as follows:

zouboan@mini:~/d/FeedForward/nuttx$ tools/configure.sh stm32f4discovery:nsh
  Copy files
install: setting permissions for ‘/home/zouboan/d/FeedForward/nuttx/tools/../defconfig’: Operation not permitted
Failed to backup /home/zouboan/d/FeedForward/nuttx/tools/../boards/*/*/stm32f4discovery/configs/nsh/defconfig
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan@mini:~/d/FeedForward/nuttx$ sudo tools/configure.sh stm32f4discovery:nsh[sudo] password for zouboan: 
No configuration change.
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan@mini:~/d/FeedForward/nuttx$ make
sed: preserving permissions for ‘/home/zouboan/d/FeedForward/nuttx/sedkOIREX’: Operation not permitted
/usr/bin/bash: line 1: tools/mkconfig: No such file or directory
make: *** [tools/Unix.mk:254: include/nuttx/config.h] Error 127
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan@mini:~/d/FeedForward/nuttx$ sudo make
/usr/bin/bash: line 1: tools/mkconfig: No such file or directory
make: *** [tools/Unix.mk:254: include/nuttx/config.h] Error 127
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan@mini:~/d/FeedForward/nuttx$ make distclean
gcc: error: unrecognized command-line option ‘-mfloat-abi=soft’
gcc: error: unrecognized command-line option ‘-mfloat-abi=soft’
Makefile:22: chip/Make.defs: No such file or directory
make[1]: *** No rule to make target 'chip/Make.defs'.  Stop.
make: *** [tools/Unix.mk:748: arch/arm/src_clean] Error 2

I'm sure there's no such problem a few months ago, and there's no changes to my toolchains. Anyone who can give me some advice? thanks!

xiaoxiang781216 commented 1 year ago

why do you invoke configure.sh with sudo?

zouboan commented 1 year ago

why do you invoke configure.sh with sudo?

Because there's an error:Operation not permitted. But a few months ago, there's no such error and it does not need sudo

xiaoxiang781216 commented 1 year ago

Please remove sudo from your command.

zouboan commented 1 year ago

Please remove sudo from your command.

zouboan@mini:~/d/FeedForward/nuttx$ tools/configure.sh stm32f4discovery:nsh
Copy files
install: setting permissions for ‘/home/zouboan/d/FeedForward/nuttx/tools/../defconfig’: Operation not permitted
Failed to backup /home/zouboan/d/FeedForward/nuttx/tools/../boards/*/*/stm32f4discovery/configs/nsh/defconfig
zouboan@mini:~/d/FeedForward/nuttx$ 
zouboan commented 1 year ago

The problem lies in the unexpected modification of nuttx directory permissions, thanks for your advice