[RC9.2]Compilation error

Yesterday I removed all .arduinoIDE-unsaved* from c:\users\sterretje\appdata\local\temp; see [rc9.2]Temporary directories. For no reason, I rebooted my (Win10) PC after that.

This morning I copied a sketch from Keypad (4 toggle switches) + WS2812 (RGB) + Sound Seor - #6 by dunk1 and compiled. First mistake was that there was no board selected (my bad, not a problem); after fixing that by selecting Uno and compiling again, I got the below error message. Note that there is no actual error in the output.

Using board 'uno' from platform in folder: C:\Users\sterretje\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4
Using core 'arduino' from platform in folder: C:\Users\sterretje\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.4
Detecting libraries used...
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "C:\\Users\\sterretje\\AppData\\Local\\Temp\\arduino-sketch-1ECF83C2896EED3C002E5E9FE32474CE\\sketch\\sketch_aug17a.ino.cpp" -o nul
Alternatives for FastLED.h: [FastLED@3.1.6]
ResolveLibrary(FastLED.h)
  -> candidates: [FastLED@3.1.6]
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "C:\\Users\\sterretje\\AppData\\Local\\Temp\\arduino-sketch-1ECF83C2896EED3C002E5E9FE32474CE\\sketch\\sketch_aug17a.ino.cpp" -o nul
Alternatives for Keypad.h: [Keypad@3.1.1]
ResolveLibrary(Keypad.h)
  -> candidates: [Keypad@3.1.1]
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\AppData\\Local\\Temp\\arduino-sketch-1ECF83C2896EED3C002E5E9FE32474CE\\sketch\\sketch_aug17a.ino.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\FastLED.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\bitswap.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\colorpalettes.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\colorutils.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\hsv2rgb.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\lib8tion.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\noise.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\power_mgt.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED\\wiring.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src\\Key.cpp" -o nul
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src\\Keypad.cpp" -o nul
Generating function prototypes...
"C:\\Users\\sterretje\\AppData\\Local\\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 "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\cores\\arduino" "-IC:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.4\\variants\\standard" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\FastLED" "-IC:\\Users\\sterretje\\Documents\\Arduino\\libraries\\Keypad\\src" "C:\\Users\\sterretje\\AppData\\Local\\Temp\\arduino-sketch-1ECF83C2896EED3C002E5E9FE32474CE\\sketch\\sketch_aug17a.ino.cpp" -o "C:\\Users\\sterretje\\AppData\\Local\\Temp\\arduino-sketch-1ECF83C2896EED3C002E5E9FE32474CE\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Users\\sterretje\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\sterretje\\AppData\\Local\\Temp\\arduino-sketch-1ECF83C2896EED3C002E5E9FE32474CE\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Using library FastLED at version 3.1.6 in folder: C:\Users\sterretje\Documents\Arduino\libraries\FastLED 
Using library Keypad at version 3.1.1 in folder: C:\Users\sterretje\Documents\Arduino\libraries\Keypad 
exit status 1

Compilation error: exit status 1

Compiled again without changes and it was successful.

I've tried to reproduce it by

  1. closing the IDE
  2. removing everything that I think was Arduino related from the temp directory
  3. starting the IDE
  4. copied the same sketch
  5. compiled without board selected and it failed as epected
  6. fixed the board and it compiled without problem

For now, this is a once-off.

You did not reboot the second time around?

The silent ending is Weird anyway may be need to get rid also of some cached data elsewhere

It might be this bug:

I mentioned the upload output specifically in that issue because I was able to consistently reproduce it with that output, but I had suspicions that it might not be limited to the upload output, and since that time I have noticed it happening occasionally with the compilation output as well (the issue seems to be somewhat intermittent even for the upload output).

Since the "Using library ..." lines come at the end of the output, it might seem unlikely that anything was missing. However, this text comes from a separate stream than the stream containing any error messages, and it is that stderr stream where I have seen truncation (all AVRDUDE output is printed on stderr even when the upload is successful).

It certainly doesn't give us much to work with. For now, I will make sure to keep an eye out for any other reports and also for any occurrences of it during my own usage. Please let us know if you experience it again.

Indeed. Reason being that a reboot takes an hour (in the process of trying to fix that).

I also did not run PC Cleaner.

I will.

Indeed, this was compile only.

Just out of curiosity - do you have an active anti virus scanning your disk?

Yes, TotalAV

An hypothesis: anti-virus software tend to quarantine new files (esp temporary files where malware hides) for scanning so if at first run after clean up a reboot the IDE is copying over lots of stuff (large libraries) into a temporary space for compilation may be the files become unavailable for the compile process just after copying them over and thus the compilation process fails. Then if you wait a bit the files are available again (out of quarantine) and the compile process can proceed.

if you can bless / exclude from scanning the temp directory Arduino uses, may be the behaviour would be different?

It would be easy if the IDE would just use a dedicated directory and dump all its files / subdirectories in there; in that case you could exclude one directory. I'm reluctant to exclude the full temp directory.

on my Mac it seems the temporary files are always created under a specific directory (/private/var/folders) but indeed there are other temp files there for the system