Skip to content

Doesn´t compile after minor change #8324

@ottocarv

Description

@ottocarv

Using ArduinoIDE 1.8.8 (Windows Store 1.8.19.0)

I have built an LCD clock with Arduino Nano and ESP-01 that maintains itself right on time by asking a date and time service site on the Internet. The code compiled OK yesterday (the actual prototype is still running flawlessly) and then today I decided to change the update interval from 6 to 4 hours.
I´ve changed ONE SINGLE NUMBER from the code and then it compiles no more, not even if I change the number back to what it was.
This is the second time this issue occurs; in the first time I had to revamp the code to make it smaller, then it worked again. This time it´s diferent: I´ve made no substantial change, just a single number from 4 to 6.
Here is what I´ve got from the compiler output window:

Linking everything together...
"C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567/NanoClock_V3.ino.elf" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\sketch\NanoClock_V3.ino.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SPFD5408\SPFD5408_Adafruit_GFX.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SPFD5408\SPFD5408_Adafruit_TFTLCD.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SPFD5408\SPFD5408_TouchScreen.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SPFD5408\glcdfont.c.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SD\File.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SD\SD.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SD\utility\Sd2Card.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SD\utility\SdFile.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SD\utility\SdVolume.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SoftwareSerial\SoftwareSerial.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567\libraries\SPI\SPI.cpp.o" "C:\Users\ottof\AppData\Local\Temp\arduino_build_393567/..\arduino_cache_517380\core\core_arduino_avr_nano_cpu_atmega328old_1465f6d64018740f7e766831526df7ff.a" "-LC:\Users\ottof\AppData\Local\Temp\arduino_build_393567" -lm
In function 'global constructors keyed to 65535_0_NanoClock_V3.ino.cpp.o':

lto1.exe: internal compiler error: Segmentation fault

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.19.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

The changed section of the code is:
if (!(hours % 6) && isConnected() && doUpd)
{
defTime();
doUpd = false;
}
else doUpd = true;

Just changed 6 to 4 on the line above. What kind of error is this and what is causing it?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DuplicateAnother item already exists for this topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions