Hi all,
I just got hit by the problem that the compiler out of a sudden never ends. When starting compile/verify it always hangs with every sketch (even BLINK) after "Detecting libraries used...". I have not conscious changed anything before it happened. Last change made was the upgrade to macOS Mojave a week ago, but it works afterwards at least once, as far as I can say. I tried several IDE versions and board/Library combinations, always the same. Currently I have 1.8.7 installed. The very strange thing is that I have exactly the same behaviour on my other MacBook. Could be because the "Arduino"-Folder with the sketchbook and libraries folder are synced thru iCloud. But I had this setup since the first installtion.
This is the output. The progress bar stops at approx. 1/3 forever.
[code
/Applications/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/michaelreifges/Library/Arduino15/packages -hardware /Users/michaelreifges/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/michaelreifges/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/michaelreifges/Documents/Arduino/libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10807 -build-path /var/folders/zr/f4fhvylx32v0r1wvhgtl_px40000gn/T/arduino_build_571381 -warnings=all -build-cache /var/folders/zr/f4fhvylx32v0r1wvhgtl_px40000gn/T/arduino_cache_724491 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /Users/michaelreifges/Documents/Arduino/HubBett/HubBett.ino
/Applications/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /Applications/Arduino.app/Contents/Java/hardware -hardware /Users/michaelreifges/Library/Arduino15/packages -hardware /Users/michaelreifges/Documents/Arduino/hardware -tools /Applications/Arduino.app/Contents/Java/tools-builder -tools /Applications/Arduino.app/Contents/Java/hardware/tools/avr -tools /Users/michaelreifges/Library/Arduino15/packages -built-in-libraries /Applications/Arduino.app/Contents/Java/libraries -libraries /Users/michaelreifges/Documents/Arduino/libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10807 -build-path /var/folders/zr/f4fhvylx32v0r1wvhgtl_px40000gn/T/arduino_build_571381 -warnings=all -build-cache /var/folders/zr/f4fhvylx32v0r1wvhgtl_px40000gn/T/arduino_cache_724491 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino14.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-5.4.0-atmel3.6.1-arduino2.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.2.1.path=/Applications/Arduino.app/Contents/Java/hardware/tools/avr -verbose /Users/michaelreifges/Documents/Arduino/HubBett/HubBett.ino
Using board 'mega' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr
Using core 'arduino' from platform in folder: /Applications/Arduino.app/Contents/Java/hardware/arduino/avr
Detecting libraries used...
/Applications/Arduino.app/Contents/Java/hardware/tools/avr/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=atmega2560 -DF_CPU=16000000L -DARDUINO=10807 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/variants/mega /var/folders/zr/f4fhvylx32v0r1wvhgtl_px40000gn/T/arduino_build_571381/sketch/HubBett.ino.cpp -o /dev/null
]
Does somebody have any idea what might cause this or how to fix it?
Thank you very much.
There are ways to use cloud's for Arduino folders but I would recommend against it myself based on the number of people that have had issues with that approach.
Taking a wild guess: It might be caused by your antivirus software. Try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on. If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.
Thanks for the quick replies. I tried both suggestions received so far, but unfortunately nothing changed.
If I put the last command into terminal I get the same, basically noting. Not a single message. I can only stop it with "ctrl+c". Could it be related to the avr-g++ program and the Mojave upgrade, indeed?
Just saw that I have a lot of (probably dead?) arduino-builder and avr-g++ processes in the Activity Monitor although Arduino App ist not running.
I will hunt around to see if Mohave changed avr-g++ in some way and report back if I find steps to resolve.
RESOLVED: I added Xcode tools with the Terminal command xcode-select --install then restarted, and now can compile. (I believe avr-g++ is included in Xcode.)
I am having the same problem. I was still able to run last night with updated Mohave, but this morning it came out this same problem. I have try what @robert_zacharias said to install Xcode and restart mac. Unfortunately nothing changed. BTW, I am using arduino IDE 1.8.8.