I’m still working through the tutorials and I’ve come across an issue with compiling. I first had error messages about my last else statement which was because of a closed bracket in the wrong place, but now I think I have cleared that issue it throws up this fatal error.
I saw a couple of months ago that people were getting “error: lto-wrapper failed” errors but this was for all programs. I tested with the hello world sample code and it was fine.
Any suggestions?
Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: “Arduboy”
C:\Users\catri\Documents\Arduino\libraries\Arduboy2\src\Arduboy2Core.cpp: In function ‘buttonsState’:
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
Does this still happen if you restart the IDE?
And does it still happen if you reboot the computer?
This is almost certainly a bug in the IDE or the compiler,
but the question is ‘how frequent is it?’.
A ‘segmentation fault’ means that the compiler is reading memory it shouldn’t be reading,
which usually means it’s trying to dereference an invalid pointer or there’s a buffer overrun.
I haven’t seen anyone using Arduino 1.8.8 before,
so it might be an Arduino 1.8.8-specific bug,
or it might be specific to the Windows Store version.
It does still happen when I restart the IDE and also the laptop. I was able to compile other programs and also the earlier part of the tutorial I was working on (though I didn’t try stripping out the new parts of code an recompiling an earlier part of the lesson).
It only seems to be happening with this one program
thanks, I tried to find instructions on how to do this as I could see other people doing it, but I couldn’t find anything. You only know what you know.
It compiles fine for me on Arduino IDE 1.8.5,
so it’s definitely either a bug with the Arduino IDE 1.8.8,
a bug with the Windows Store version,
or a bug with your particular installation.
(Sometimes the Arduino IDE doesn’t install correctly and reintalling fixes it.)
Thanks Pharap, I downloaded from the Arduino website rather than the windows store but it might be the same versions. I will uninstall and try the earlier version.
My guess is it’s either a problem with the 1.8.8 version for Windows or it just didn’t install correctly.
Either way it’s fixed now.
It might be worth trying to upgrade again at a later date to see if the problem has been fixed (assuming it was a problem with the actual version and not the installation - it’s surprising how often the Arduino IDE doesn’t install correctly).