Description
Describe the problem
When attempting to compile an completely empty sketch on MacOS, the CLI return exit status one with seemingly no error message. This is with a fresh install, the only thing done prior to receiving the error is installing the needed platform/core.
~/projects/arduino/test > arduino-cli compile --fqbn arduino:avr:uno --verbose --clean test.ino
Using board 'uno' from platform in folder: /Users/ivv/Library/Arduino15/packages/arduino/hardware/avr/1.8.5
Using core 'arduino' from platform in folder: /Users/ivv/Library/Arduino15/packages/arduino/hardware/avr/1.8.5
Detecting libraries used...
/Users/ivv/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/ivv/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/ivv/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/standard /private/tmp/arduino-sketch-6379EA0C0E6E5E5AAB9581BFB5390945/sketch/test.ino.cpp -o /dev/null
Generating function prototypes...
/Users/ivv/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/Users/ivv/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/cores/arduino -I/Users/ivv/Library/Arduino15/packages/arduino/hardware/avr/1.8.5/variants/standard /private/tmp/arduino-sketch-6379EA0C0E6E5E5AAB9581BFB5390945/sketch/test.ino.cpp -o /private/tmp/arduino-sketch-6379EA0C0E6E5E5AAB9581BFB5390945/preproc/ctags_target_for_gcc_minus_e.cpp
/Users/ivv/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /private/tmp/arduino-sketch-6379EA0C0E6E5E5AAB9581BFB5390945/preproc/ctags_target_for_gcc_minus_e.cpp
Used platform Version Path
arduino:avr 1.8.5 /Users/ivv/Library/Arduino15/packages/arduino/hardware/avr/1.8.5
Error during build: exit status 1
~/projects/arduino/test > echo $?
1
To reproduce
#!/usr/bin/env bash
rm -rf /Users/ivv/Library/Arduino15
arduino-cli core install arduino:avr
arduino-cli sketch new test
cd test
arduino-cli compile --fqbn arduino:avr:uno --verbose --clean test.ino
Expected behavior
The sketch should successfully compile and spit out a binary.
Arduino CLI version
arduino-cli Version: nightly-20221025 Commit: f239754 Date: 2022-10-25T01:35:53Z
Operating system
macOS
Operating system version
12.6
Additional context
Adding --build-path $PWD/build
shows that all files that are mentioned in the log look correct, it just stops at some later point (potentially linking of preprocessed files, or executing gcc?). The only thing that seemed fishy to me is the compile_commands.json
being completely empty.
I would appreciate some help with debugging this, I'm a bit lost myself.
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the nightly build
- My report contains all necessary details