Exit Status 1 Problem

Hi, Arduino community,

I am having trouble with this code that I wrote.>:( . Whenever I verify, I get this error code: exit status 1
Could someone please tell me where I've gone wrong? Thanks.

// These constants won't change:
const int sensorPin = A0;    // pin that the sensor is attached to
const int sound = 4;       // pin that the LED is attached to
const int sensorValue = 1000;
const int threshold = 400;   // an arbitrary threshold level that's in the range of the analog input

void setup() {
  // initialize the LED pin as an output:
  pinMode(sound, OUTPUT);
}

void loop() {

  // if the analog value is high enough, turn on the LED:
  if (sensorValue > threshold) {
    digitalWrite(sound, HIGH);
  } else {
    digitalWrite(sound, LOW);
  }
}

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

Hello,

Annabel-L16:
Whenever I verify, I get this error code: exit status 1

There is more to the error message. What is the rest of the message?

./opt/arduino-builder/arduino-builder -compile -core-api-version 10611 -hardware opt/arduino-builder/hardware -hardware ./opt/cores -tools opt/arduino-builder/tools -tools ./opt/tools -built-in-libraries opt/libraries/latest -logger humantags -fqbn arduino:avr:uno -build-cache /tmp -build-path /tmp/352402832/build -verbose -prefs runtime.tools.avr-gcc.path=./opt/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2 -prefs runtime.tools.avrdude.path=./opt/tools/avrdude/6.3.0-arduino14 -prefs runtime.tools.arduinoOTA.path=./opt/tools/arduinoOTA/1.2.1 -libraries /tmp/352402832/custom -libraries /tmp/352402832/pinned /tmp/352402832/Cookie_Jar_2nd_Draft

Linking everything together...

lto1: fatal error: bytecode stream generated with LTO version 3.0 instead of the expected 4.1

compilation terminated.

lto-wrapper: fatal error: ./opt/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/avr-gcc returned 1 exit status

compilation terminated.

/home/ubuntu/opt/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld: error: lto-wrapper failed

collect2: error: ld returned 1 exit status

exit status 1

Oooh. That's a crazy interesting error. Have you ever been able to Verify using that computer?

I have previously been able to verify code and upload it to an Arduino Uno, but today, everything is getting that error. I just tried with some code that I could verify last week and it is getting the same error.

Thanks

I have been using the online editor. A classmate using it too is experiencing the same error.

There are multiple other reports of this bug:

I recommend subscribing to those threads so that you'll be sure to get news of any progress in fixing it.

This is an Arduino Web Editor specific problem so the workaround is to use the regular Arduino IDE, which you can download for free from:

Ok, thanks for the help.

Hello, please follow topic Issue 2018-10-30: lto-wrapper error prevent compilations for further information and updates about this.

Thank you.