Creating a public locker

I’m creating a public locker for a project, and I’m almost done, but it says here:

Error compiling for board Arduino/Genuino Uno.

I don’t know how to fix it, I’ve tried restarting the arduino, unplugging and re-plugging the cord, but it doesn’t work. Can somebody help me? Also, here’s my code in case it has anything to do with the issue.
(i put it in a file because it’s to big to fit in this post.

lcd_code.ino (10 KB)

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum’s code tags markup to your reply.
  • Press “Ctrl + V”. This will paste the error between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

If the text exceeds the forum’s 9000 character limit, save it to a .txt file and post it as an attachment. If you click the “Reply” button here, you will see an “Attachments and other settings” link.

Ok here you go Sorry if before it was uncomfortable. Here’s the issue
also: how do you save it as a txt? this is my first time on this forum.

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: “Arduino/Genuino Uno”

C:\Users\Administrator\Desktop\David’s stuff\lcd_code\lcd_code.ino: In function ‘enterPassword’:

C:\Users\Administrator\Desktop\David’s stuff\lcd_code\lcd_code.ino:316:1: 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.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.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

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

It compiles fine for me. Did you install the necessary libraries?

Maybe uninstall and reinstall the Arduino IDE?

yes. Do you have any suggestions to what i should do?

Which Operating System are you using ?

davidgao1345:
Ok here you go

You forgot to use the code tags as I requested.

davidgao1345:
how do you save it as a txt?

Paste it into a text editor and then save the file with a .txt extension. There are plenty of good text editors. I use Notepad++:
https://notepad-plus-plus.org/
But please only post things to the forum as attachments when they exceed the forum's 9000 character limit. You will be more likely to get help if you post things directly to the forum so people don't need to download a file to help you.

This is caused by a bug in the avr-gcc 5.4.0 compiler. To fix it, you only need to update your Arduino AVR Boards:

  • Tools > Board > Boards Manager
  • Wait for the downloads to finish.
  • Click on "Arduino AVR Boards".
  • Click the "Update" button".
  • Wait for the update to finish.
  • Click the "Close" button.

You will now be able to compile your sketch without getting this error.

i'm using windows 10

like this

lcd_code_txt.txt (11.1 KB)