I'm using a Mac with macOS 13.1 Ventura. When I want to compile a sketch I get the following error message:
Arduino: 1.8.19 (Mac OS X), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 16KB cache + 48KB IRAM (IRAM), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, All Flash Contents, 921600"
fork/exec /Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/xtensa-lx106-elf-g++: permission denied
Fehler beim Kompilieren für das Board NodeMCU 1.0 (ESP-12E Module).
The folder "portable" contains the ArduBlock stuff and it worked 2 years ago but now it cannot be accessed. I tried going around gatekeeper, I checked the permissions with CMD+I on the files but I have r/w access.
I changed the way I checked the permissions: I used the terminal with "ls -l" and changed the permissions via terminal as well (sudo chmod -R 755 /Applications/Arduino.app/Contents/Java/portable/).
Very nice that the cmd+I shows not the whole permissions of files and folders. Anyway, I have another error message that isn't clear to me:
/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: /Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so: error loading plugin: dlopen(/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so, 0x0002): tried: '/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so' (no such file), '/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/bin/../libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so' (not a mach-o file), '/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so' (no such file), '/Applications/Arduino.app/Contents/Java/portable/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so' (not a mach-o file)
collect2: error: ld returned 1 exit status
exit status 1
Fehler beim Kompilieren für das Board NodeMCU 1.0 (ESP-12E Module).
Hi,
thanks for the link. The links in the thread are dead so it wasn't directly helpful. I got some new words for a google research but it wasn't helping as well.
Even an empty sketch like
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
cannot be compiled. The error message is the same as I get for my sketch.
You should make sure to update the adafruit-nrfutil tool you distribute with your "smartwatch-boards" platform so that it has the required executable permissions when installed. That way, the users won't suffer from the same error.
Yes, this is what I did to solve the permission problem. The GUI of macOS is not giving you full permission control or at least on a more basic level compared to the past.
Anyway, anybody knows something about this "mach-o file" error message?
xtensa-lx106-elf-gcc/3.0.4-gcc10.3-1757bed/libexec/gcc/xtensa-lx106-elf/10.3.0/liblto_plugin.so' (not a mach-o file) collect2: error: ld returned 1 exit status exit status 1
I see you are using a fairly outdated version of the ESP8266 boards platform. The problem may have been solved in a later version, which uses a newer xtensa-lx106-elf-gcc compiler.
Unless you are using that version of the ESP8266 boards platform for a specific reason, I recommend you update to the latest version:
Select Tools > Board > Boards Manager from the Arduino IDE menus.
Wait for the updates to finish.
Scroll down through the list of boards platforms until you see the "esp8266 by ESP8266 Community" entry. Click on it.
Click the Update button.
Wait for the update to finish.
Click the Close button.
Now try compiling your sketch again. Hopefully the error will no longer occur.