sketch no longer compiles after upgrade to 1.8.7

After upgrading from 1.0.5 to 1.8.7, a sketch that compiles in 1.0.5 is now giving errors about the scope of some variables which should have been defined in avr/interrupts.h. I tried changing my settings to turn off aggressive caching as described in from 1.6.8 to 1.8.5 several sketches can not be compiled to arduino uno - Installation & Troubleshooting - Arduino Forum but it did not resolve the issue.

The other symptom is that it is only failing for the intended board that the compile fails. Since this is the board that the sketch was compiled for under 1.0.5 I am suspicious that this is a caching issue. Where is the cache located? I want to manually delete it to try and force a complete rebuild under the new environment.

Any other ideas are also welcome.

JoshuaBabcock:
is now giving errors about the scope of some variables which should have been defined in avr/interrupts.h.

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

JoshuaBabcock:
Where is the cache located?

It's a temporary folder with a randomized name. You can find the location by checking File > Preferences > Show verbose output during > compilation, compiling, then examine the contents of the black console window at the bottom of the Arduino IDE window (you need to scroll up to see it all).

Here's the error:

Arduino: 1.8.7 Hourly Build 2018/09/10 06:25 (Linux), Board: "Digispark (Default - 16.5mhz)"

/home/jbabcock/bin/arduino/arduino-builder -dump-prefs -logger=machine -hardware /home/jbabcock/bin/arduino/hardware -hardware /home/jbabcock/.arduino15/packages -tools /home/jbabcock/bin/arduino/tools-builder -tools /home/jbabcock/bin/arduino/hardware/tools/avr -tools /home/jbabcock/.arduino15/packages -built-in-libraries /home/jbabcock/bin/arduino/libraries -libraries /home/jbabcock/sketchbook/libraries -fqbn=digistump:avr:digispark-tiny -ide-version=10807 -build-path /tmp/arduino_build_396995 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/jbabcock/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5 -prefs=runtime.tools.avr-gcc-4.8.1-arduino5.path=/home/jbabcock/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5 -prefs=runtime.tools.micronucleus.path=/home/jbabcock/.arduino15/packages/digistump/tools/micronucleus/2.0a4 -prefs=runtime.tools.micronucleus-2.0a4.path=/home/jbabcock/.arduino15/packages/digistump/tools/micronucleus/2.0a4 -verbose /home/jbabcock/sketchbook/pinwheel/pinwheel.ino
/home/jbabcock/bin/arduino/arduino-builder -compile -logger=machine -hardware /home/jbabcock/bin/arduino/hardware -hardware /home/jbabcock/.arduino15/packages -tools /home/jbabcock/bin/arduino/tools-builder -tools /home/jbabcock/bin/arduino/hardware/tools/avr -tools /home/jbabcock/.arduino15/packages -built-in-libraries /home/jbabcock/bin/arduino/libraries -libraries /home/jbabcock/sketchbook/libraries -fqbn=digistump:avr:digispark-tiny -ide-version=10807 -build-path /tmp/arduino_build_396995 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/jbabcock/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5 -prefs=runtime.tools.avr-gcc-4.8.1-arduino5.path=/home/jbabcock/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5 -prefs=runtime.tools.micronucleus.path=/home/jbabcock/.arduino15/packages/digistump/tools/micronucleus/2.0a4 -prefs=runtime.tools.micronucleus-2.0a4.path=/home/jbabcock/.arduino15/packages/digistump/tools/micronucleus/2.0a4 -verbose /home/jbabcock/sketchbook/pinwheel/pinwheel.ino
Using board 'digispark-tiny' from platform in folder: /home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7
Using core 'tiny' from platform in folder: /home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7
Build options changed, rebuilding all
Detecting libraries used...
/home/jbabcock/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10807 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -I/home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7/cores/tiny -I/home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7/variants/digispark /tmp/arduino_build_396995/sketch/pinwheel.ino.cpp -o /dev/null
Generating function prototypes...
/home/jbabcock/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -w -x c++ -E -CC -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10807 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -I/home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7/cores/tiny -I/home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7/variants/digispark /tmp/arduino_build_396995/sketch/pinwheel.ino.cpp -o /tmp/arduino_build_396995/preproc/ctags_target_for_gcc_minus_e.cpp
/home/jbabcock/bin/arduino/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_396995/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/jbabcock/.arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino5/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=attiny85 -DF_CPU=16500000L -DARDUINO=10807 -DARDUINO_AVR_DIGISPARK -DARDUINO_ARCH_AVR -I/home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7/cores/tiny -I/home/jbabcock/.arduino15/packages/digistump/hardware/avr/1.6.7/variants/digispark /tmp/arduino_build_396995/sketch/pinwheel.ino.cpp -o /tmp/arduino_build_396995/sketch/pinwheel.ino.cpp.o
/home/jbabcock/sketchbook/pinwheel/pinwheel.ino: In function 'void setup()':
pinwheel:28:3: error: 'TCCR1B' was not declared in this scope
   TCCR1B |= 1<<CS10; // No prescaler (1/1)
   ^
pinwheel:32:16: error: 'WGM12' was not declared in this scope
   TCCR1B |= 1<<WGM12; // CTC mode with OCR1A register as TOP
                ^
pinwheel:33:3: error: 'TIMSK1' was not declared in this scope
   TIMSK1 |= 1<<OCIE1A; // Enable CTC interrupt for timer1
   ^
pinwheel:39:3: error: 'TIMSK0' was not declared in this scope
   TIMSK0 |= 1<<OCIE0A; // Enable CTC interrupt for timer0
   ^
exit status 1
'TCCR1B' was not declared in this scope

As far as the cache goes, I don't see it in the output, so I'm guessing that with the aggressive caching turned off that doesn't get created.

Now I see the cache directory. Right there in/tmp. Yup.

Anyway, I deleted it,restarted arduino, and the problem persists.

Please post your code, using code tags.

I think the problem is that the DigiSpark's ATtiny85 microcontroller simply does not use those register names. Possibly there is some malfunctioning code in your sketch to add compatibility with the ATtiny85, I couldn't know without seeing the code.

JoshuaBabcock:
giving errors about the scope of some variables which should have been defined in avr/interrupts.h.

They're macros and they would be defined in avr/iotn85.h, not avr/interrupts.h

Arduino: 1.8.7 Hourly Build

Maybe not the problem, but generally best to avoid the hourly build and stick with stable releases unless you are testing for the Arduino team. Hourly build often has bugs that haven't been found yet.

Delta_G:

Arduino: 1.8.7 Hourly Build

Maybe not the problem, but generally best to avoid the hourly build and stick with stable releases unless you are testing for the Arduino team. Hourly build often has bugs that haven't been found yet.

It wasn't. Installing the hourly build was a mistake, and I changed it to the 1.8.7 release with no result. Thanks for the tip though.

pert:
Please post your code, using code tags.

I think the problem is that the DigiSpark's ATtiny85 microcontroller simply does not use those register names. Possibly there is some malfunctioning code in your sketch to add compatibility with the ATtiny85, I couldn't know without seeing the code.
They're macros and they would be defined in avr/iotn85.h, not avr/interrupts.h

Yup, I was accidentally using a board that did to test the compilation. Sorry for the SPAM.

I'm glad to hear you found the problem. Enjoy!
Per