-
-
Notifications
You must be signed in to change notification settings - Fork 440
"Compilation error: Error: 2 UNKNOWN: exit status 1" error message is unnecessarily cryptic #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same error. I installed first DallasTemperature library from library manager, and for OneWire library I do the same. After that I tried compile code at the bottom of the page. My OS is Ubuntu 20.10 #include <DallasTemperature.h>
#include <LiquidCrystal.h>
#include <OneWire.h>
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
// Definicja wejść wyświetlacza ciekłokrystalicznego //definition of lcd output
LiquidCrystal lcd(4, 5, 6, 7, 8, 9);
void setup(void) {
// Inicjacja czujnika //sensor initiation
sensors.begin();
// Inicjacja wyświetlacza //screen initiation
lcd.begin(16, 2);
lcd.clear();
}
void loop(void) {
lcd.setCursor(0, 0);
lcd.print("Temperatura:");
lcd.setCursor(0, 1);
sensors.requestTemperatures();
lcd.print(sensors.getTempCByIndex(0));
lcd.setCursor(6, 1);
lcd.print("st.C");
delay(1000);
} |
I see. I'm not sure if it is due to libraries, I still get this error even from examples without library (File>Examples>Basics>Blink) still causes this error yet there are no libraries? |
For Blink example from Basic folder of examples I have that error: |
@TheAnton205 @Pioxis which board have you selected? please try to manually add support for your board via the boards manager on the left sidebar or from the "Tools > Board > Boards Manager" menu |
Additionally I get that info from my terminal, when Error appeared:
When I first opened program I was prompted for select the board. I selected for Arduino UNO. |
SOLVED: For me I solved it by reinstalling the beta IDE and by reinstalling Arduino AVR Boards by Arduino, version 1.8.3 Everything seems working now, thanks. |
Same issue here. A program that easily compiles and runs under the old IDE gets:
when compiled with V2. No other discernable complaints when using verbose mode on compile. I did uninstall/reinstall IDE 2.0 to no avail. Here's my program
|
I think this is a case of bad error messages. I got the error too, "Compilation error: Error: 2 UNKNOWN: exit status 1" in the output window. I started the program from the console, and there I see:
If I install the servo lib everything is fine, so the error message in the output window is wrong. |
Patrik,
I'd like to replicate what you've done. I'm not familiar with "starting
from the console". How is that done?
Chuck
…On Sat, Apr 17, 2021 at 6:54 AM Patrik Hermansson ***@***.***> wrote:
I think this is a case of bad error messages. I got the error too,
"Compilation error: Error: 2 UNKNOWN: exit status 1" in the output window.
I started the program from the console, and there I see:
daemon INFO /tmp/.arduinoIDE-unsaved2021316-1396774-1hhgvhh.m6o3/Blink/Blink.ino:1:10: fatal error: Servo.h: No such file or directory
daemon INFO #include <Servo.h>
daemon INFO ^~~~~~~~~
daemon INFO compilation terminated.
root ERROR Request compile failed with error: 2 UNKNOWN: exit status 1
If I install the servo lib everything is fine, so the error message in the
output window is wrong.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACU7VQIU55ED5DPENLUVH5DTJGHHPANCNFSM4YNAQF6A>
.
|
I started the program from the command prompt in Linux. You can do the same with Windows Powershell . You go to the program installation folder and run the program by entering it's name. Then you see all log messages directly. |
Very cool interface.
Sadly I am no closer to solution. No complaints about Servo.h, which is
fine since I'm not including it.
Here's the errors when I compile.
daemon INFO inventory.Store.ConfigFileUsed()
C:\Users\ccbland\AppData\Local\Arduino15\inventory.yaml
daemon INFO inventory.Store.ConfigFileUsed()
C:\Users\ccbland\AppData\Local\Arduino15\inventory.yaml
daemon INFO Searching tools required for board arduino:avr:uno
daemon INFO Required tool [tool:
{ToolName:"arduinoOTA",ToolVersion:"1.3.0",ToolPackager:"arduino"}]
daemon INFO Required tool [tool:
{ToolName:"avr-gcc",ToolVersion:"7.3.0-atmel3.6.1-arduino7",ToolPackager:"arduino"}]
daemon INFO Required tool [tool:
{ToolName:"avrdude",ToolVersion:"6.3.0-arduino17",ToolPackager:"arduino"}]
daemon INFO Adding libraries dir [dir: C:\Program Files
(x86)\Arduino\libraries, location: ide]
daemon INFO Adding libraries dir [dir:
C:\Users\ccbland\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\libraries,
location: platform]
daemon INFO Adding libraries dir [dir:
C:\Users\ccbland\Documents\Arduino\libraries, location: user]
daemon INFO Resolving include IRremote.h for arch avr
daemon INFO found better lib [lib: IRremote, prio: 5E9]
root ERROR Request compile failed with error: 2 UNKNOWN: exit status 1
…On Sun, Apr 18, 2021 at 6:59 AM Patrik Hermansson ***@***.***> wrote:
I started the program from the command prompt in Linux. You can du the
same with Windows Powershell . You go to the program installation folder
and run the program by entering it's name. Then you see all log messages
directly.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#151 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACU7VQJCQFSY2RRU7LX7ZRLTJLQS7ANCNFSM4YNAQF6A>
.
|
Same issue here. Win 10 Pro 64 bits. Arduino Uno, Core installed (as suggested by the IDE itself). Can't compile anything, same error message. |
Same error here, opening a detailed issue about it now. |
Same error here, but like @bphermansson, when I compiled with verbose, I saw the the error comes from a lacking library. |
upgrading to Arduino IDE v2.0.0 beta 9 worked for me |
I had this error specifically when I added #include <LiquidCrystal.h> in my code. I'm using a Dell XPS, Windows 10 Arduino IDE |
Same error! Out or the blue, I couldn't compile anymore! Now, as soon as I restart Arduino IDE, I get this message: So, I've update the board's extension to esp32 by Espressif Systems V1.0.6, getting Then, after changing it to esp32 by Espressif Systems V1.0.5, the error became: Back to esp32 by Espressif Systems V1.0.4, same thing again! Aug. 21th 9:20PM: By the way, I've just installed ESP32 V2.0.0, from What to do now? |
im new to arduino and it says exit status 1 i dont know what to do |
@markyousif. This issue tracker is only to be used to submit detailed, formal bug reports and feature requests. You need to ask for help on the Arduino Forum. I'm sure we'll be able to help you out over there: |
Each actual cause of the generic "Error: 2 UNKNOWN" errors reported through this thread was completely unrelated to the others. The valuable feedback this issue ended up providing is that the current practice of exposing the users to internal details of the gRPC interface causes confusion and provides absolutely no benefit. Even though the statuses have been made slightly more specific by arduino/arduino-cli#1251, in the end it's only a change from this:
to this:
The "13 INTERNAL" doesn't add anything of value to the console output, and will likely even be misleading since "INTERNAL" implies something wrong within the IDE itself, so it's not really much of an improvement for the users over the mysterious "2 UNKNOWN". |
Describe the bug
Any program I run and attempt to compile I get this error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected for the code to compile.
Desktop (please complete the following information):
Additional context
This could be due to from when some notification occurred which I couldn't figure out what it was for. I do remember that it led to this link. However, I don't see this notification anymore?
The text was updated successfully, but these errors were encountered: