SOLVED-Error: Request compile failed with message: 2 UNKNOWN: exit status 1

Just installed the latest 2.0 Beta 3 and did some minor setup pointing everything to my work directory under Win 10... c:\myusernam\Applications\Arduino

Opened up a couple examples, set my board as an UNO, but did not have a board connected. So far, I have had to select a board everytime I load a sketch, which is a bummer.

I was able to verify/compile several examples without issue. I then installed a couple of I2C libraries I use in my latest project, Keyboard_I2C and LiquidCrystal_I2C. I loaded up one of my projects without issue and again had to select a board... again a UNO. Tried to verify the code and it comes up with the error in the subject above.

It is difficult to debug an unknown error and I have no idea where to begin.

I do not use git and I guess the ide is expecting it to be installed as I get an error at startup that it cannot find the git executable. Is this mandatory that I use git for some purpose? Haven't needed it yet, well, for a couple of things in the past.

Also, I kind of like the old library manager. You get used to a few things and another window instead of a sidebar just seems cleaner.

Anyway, the latest beta is sidelined until I can figure out this unknown error. Thanks for any help!

John

johnjces:
Tried to verify the code and it comes up with the error in the subject above.

It is difficult to debug an unknown error and I have no idea where to begin.

Please do this:

  • Right click on the black “Output” pane at the bottom of the Arduino IDE 2.x window.
  • From the context menu, click “Copy All”.
  • 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 that will allow you to make the attachment.


johnjces:
I do not use git and I guess the ide is expecting it to be installed as I get an error at startup that it cannot find the git executable. Is this mandatory that I use git for some purpose? Haven’t needed it yet, well, for a couple of things in the past.

This should definitely not be required. I’m going to check it out on a Windows machine that doesn’t have Git installed. Since all the developers and testers use Git, it’s possible we missed this. There is some advanced Git integration functionality in the Theia IDE framework, but this is optional and was intentionally not exposed as a prominent part of the user interface due to it not being something of interest to the users the Arduino IDE is intended to be friendly to.

johnjces:
Also, I kind of like the old library manager. You get used to a few things and another window instead of a sidebar just seems cleaner.

I’m definitely sympathetic to this viewpoint. I am old enough to have gotten my start in GUIs with Windows 3.1 and so I’m very used to the classic UI conventions. But I also accept that things will inevitably change. Due to it being built on related technology, I switched from using Notepad++ (which uses the classic Windows UI conventions) to VS Code last summer for all my non-Arduino sketch text editing needs. I do find that I like the consistency between the Arduino IDE 2.x UI and VS Code UIs.

We now have a bug report about the "An unexpected error occurred when locating the Git executable" issue: https://github.com/arduino/arduino-ide/issues/163 I am also able to reproduce this on a machine that doesn't have Git installed.

You can safely ignore this error. The Arduino IDE 2.x will work fine even without Git installed, and really doesn't use it for anything worth mentioning.

Here are the results of 'copy all' from a minor test sketch I did which comes up with an ERROR 2: Unknown.

Not helpful!

Compilation error: Error: 2 UNKNOWN: exit status 1

Here's what the "copy all" is for one of my known good sketches that works/compiles great in the 1.8.X IDE. Error is of course in the 2.0 Beta

Compilation error: Error: 2 UNKNOWN: exit status 1

Somehow I think we are expecting a lot more info!

ALSO, one thing that always drives me crazy is software wanting me to do something outside the app to solve a problem. I, get this error on occasion when starting the app but not all the time:

Unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue.

When I go to that link the instructions are for Linux, not Windows. Now what to do? A new forum issue?

Thanks again!!

John

OK, let’s try this:

  • (In the Arduino IDE) click File > Preferences
  • Check the box next to "Show verbose output during: > compilation
  • Click “OK”
  • Sketch > Verify/Compile
  • Wait for the compilation to fail.
  • Right click on the black “Output” pane at the bottom of the Arduino IDE 2.x window.
  • From the context menu, click “Copy All”.
  • 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 that will allow you to make the attachment.

johnjces:
ALSO, one thing that always drives me crazy is software wanting me to do something outside the app to solve a problem. I, get this error on occasion when starting the app but not all the time:

Unable to watch for file changes in this large workspace. Please follow the instructions link to resolve this issue.

When I go to that link the instructions are for Linux, not Windows. Now what to do? A new forum issue?

This is a known bug:
https://github.com/arduino/arduino-ide/issues/39
Please just ignore it. It doesn’t indicate any real problem and has nothing to do with the compilation failure you’re getting. I get this all the time (I’ve been beta testing for weeks), and the IDE works just fine for me.

(Could have sworn I clicked the Post button but I guess not. So we will try again).

My apologies for all the hand holding in setting the preferences to get the right data to you. But here it is:

Using board 'uno' from platform in folder: C:\Users\jjarrett\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Using core 'arduino' from platform in folder: C:\Users\jjarrett\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3
Detecting libraries used...
"C:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\standard" "C:\\Users\\jjarrett\\AppData\\Local\\Temp\\arduino-sketch-BCF1CB88F525B4FA4B31EBCF16F60785\\sketch\\I2C_LCD_Keypad.ino.cpp" -o nul
Alternatives for LiquidCrystal_I2C.h: [LiquidCrystal_I2C@1.1.2]
ResolveLibrary(LiquidCrystal_I2C.h)
  -> candidates: [LiquidCrystal_I2C@1.1.2]
"C:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\standard" "-Ic:\\Users\\jjarrett\\Applications\\Arduino\\libraries\\LiquidCrystal_I2C" "C:\\Users\\jjarrett\\AppData\\Local\\Temp\\arduino-sketch-BCF1CB88F525B4FA4B31EBCF16F60785\\sketch\\I2C_LCD_Keypad.ino.cpp" -o nul
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
  -> candidates: [Wire@1.0]
"C:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\standard" "-Ic:\\Users\\jjarrett\\Applications\\Arduino\\libraries\\LiquidCrystal_I2C" "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\Wire\\src" "C:\\Users\\jjarrett\\AppData\\Local\\Temp\\arduino-sketch-BCF1CB88F525B4FA4B31EBCF16F60785\\sketch\\I2C_LCD_Keypad.ino.cpp" -o nul
Alternatives for Keypad_I2C.h: [Keypad_I2C@3.0.0]
ResolveLibrary(Keypad_I2C.h)
  -> candidates: [Keypad_I2C@3.0.0]
"C:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\cores\\arduino" "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\variants\\standard" "-Ic:\\Users\\jjarrett\\Applications\\Arduino\\libraries\\LiquidCrystal_I2C" "-IC:\\Users\\jjarrett\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.3\\libraries\\Wire\\src" "-Ic:\\Users\\jjarrett\\Applications\\Arduino\\libraries\\Keypad_I2C" "C:\\Users\\jjarrett\\AppData\\Local\\Temp\\arduino-sketch-BCF1CB88F525B4FA4B31EBCF16F60785\\sketch\\I2C_LCD_Keypad.ino.cpp" -o nul
Alternatives for Keypad.h: []
ResolveLibrary(Keypad.h)
  -> candidates: []
Using library LiquidCrystal_I2C at version 1.1.2 in folder: c:\Users\jjarrett\Applications\Arduino\libraries\LiquidCrystal_I2C 
Using library Wire at version 1.0 in folder: C:\Users\jjarrett\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.3\libraries\Wire 
Using library Keypad_I2C at version 3.0.0 in folder: c:\Users\jjarrett\Applications\Arduino\libraries\Keypad_I2C 
Compilation error: Error: 2 UNKNOWN: exit status 1

Thank-you for the other info!!

John

johnjces:
My apologies for all the hand holding in setting the preferences to get the right data to you.

No apologies needed. I write my instructions in a very detailed and specific manner because I have found it’s best to not make any assumptions about the expertise of Arduino users. Arduino is meant to be accessible to everyone, whether they’ve been programming since the punchcard days, or this is the first line of code they’ve ever written. I have a collection of well-organized stock replies that I can quickly copy/paste, so it’s worth it for me to take some time to write them the first time. I’m sure some people roll their eyes a little at some of the instructions (“dude, I know how to copy/paste”), but for the most part I think it works out well.

johnjces:

Alternatives for Keypad.h: []

ResolveLibrary(Keypad.h)
  → candidates:

This is the error, even though it doesn’t look like one at all. In the classic Arduino IDE, this error would look something like this:

sketch_mar03a:1:10: fatal error: Keypad.h: No such file or directory
 #include <Keypad.h>
          ^~~~~~~~~~
compilation terminated.
exit status 1
Keypad.h: No such file or directory

Unfortunately, there is something wrong with the Arduino IDE 2.x build system that makes this specific type of error message far less understandable:
https://github.com/arduino/arduino-ide/issues/37
Hopefully this will be fixed in an upcoming release.

OK, so now to your problem. This error usually occurs when the sketch uses a library that is not installed. It seems a little strange that your sketch is using both Keypad_I2C.h and Keypad.h. However, I don’t know anything about your code or the Keypad_I2C library you’re using so I suppose it’s possible that this is intended.

Well, maybe this will give you enough to chase down the issue. If not, you’ll need to post the sketch you’re compiling and also tell me where you downloaded these libraries from (or if you installed them via Library Manager, tell me the full name), then I’ll take a look to see if I can spot the problem.

The library is written by a Joe Young and not certain where I dug it up but works well with the I2C I/O expanders. I installed it as a zip file in the 2.0 IDE as I did in my 1.8.X IDE. It’s location on my win 10 64 bit PC is c:/Users/jjarrett/Applications/Arduino/Libraries

I have attached a picture and here’s a temporary link to the zip file library.

http://jcitssystems.com/TempStuff/Keypad_I2C.zip

2021-03-03 21_49_32-I2C_LCD_Keypad _ Arduino IDE 2.0.0-beta.3.png

OK, I took a look and it contains a link to this repository: https://github.com/joeyoung/arduino_keypads which says this:

This repository contains several separate arduino format libraries, each one adding to the library Keypad external expansion port communication via an I2C (or Wire( )) port on the arduino microprocessor.

...

The Keypad library is found on github.

So this library has a dependency on the Keypad library. If you don't install the Keypad library, then when you use the Keypad_I2C library you get this error.

The easiest way to install the Keypad library is via Library Manager:

  • Sketch > Include Library > Manage Libraries... - the Library Manager panel will open on the left side of the Arduino IDE 2.x window.
  • In the search field at the top of the Library Manager panel, type "Keypad".
  • Scroll down through the search results until you find "Keypad by Mark Stanley, Alexander Brevig". Click on it.
  • Click the "Install" button. An "Installation in progress" window will appear for a short time.
  • Wait until the "Installation in progress" window closes. The library is now installed.

Now you can try verifying your sketch again. It should be successful this time.

I somehow feel I should have paid more attention to Keypad NOT Keypad_I2C... argh. It makes perfect sense and thank-you so much for your help!

Is there any possibility of expanding errors to not include 'UNKNOWN" and be more granular, i.e. Error: Keypad Library Needed - Not Found or something similar?

Anyway, I'm liking 2.0 and again THANK-YOU! Fixed the issue!!

John

johnjces:
Is there any possibility of expanding errors to not include 'UNKNOWN" and be more granular, i.e. Error: Keypad Library Needed - Not Found or something similar?

I think it’s mandatory at least to restore the previous standardized error message:

sketch_mar03a:1:10: fatal error: Keypad.h: No such file or directory
 #include <Keypad.h>
          ^~~~~~~~~~
compilation terminated.
exit status 1
Keypad.h: No such file or directory

As I noted above, this has been reported to the developers and they are planning to investigate it.

It would also be interesting to consider also adding some sort of enhanced assist for the users when this happens. The most simple would be a link to a troubleshooting guide. There is already something of the sort when the sketch compilation fails due to it requiring more memory than the Arduino board has available.

More fancy would be a dialog that offers a Library Manager search based on the missing header file name. The only tricky thing is that the header file name and the library name don’t always match and you can also get this error for libraries that aren’t in Library Manager or files that aren’t part of a library. So that search wouldn’t necessarily provide the fix every time. But most of the time this error is caused by a missing library and there are about 4000 libraries in the Library Manager, so there’s a good chance it will be there.

johnjces:
Anyway, I’m liking 2.0

I’m very glad to hear that.

johnjces:
and again THANK-YOU! Fixed the issue!!

You’re welcome. Enjoy!
Per

Hi,

I’ve also problems with this message.

When compiling the error appears, the #include line tooltip says file not found. but i’m sure the file exist (see image)
the library works fine in Visual Micro and the 1.8 IDE.

When i’m looking in the examples list (Files/Examples) the example sketch is included, so the directory is parsed by the Arduino 2.0 IDE. (i’m using the 2.0 beta 4 version).

i also included the library.
I hope someone can help.


COM485 library

Reinosoft:
I’ve also problems with this message.

Hi @Reinosoft. Your screenshot cuts off the essential part of the output. In order to help you, we’ll need the full text of the output, not a picture of part of the text.

Please do this:
[list type=decimal]

  • Right click on the black “Output” pane at the bottom of the Arduino IDE 2.x window.
  • From the context menu, click “Copy All”.
  • 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 that will allow you to make the attachment.

I’m totaly agree with Pert. If some files or libraries are missing at the moment you need to activate verbose compilation for understund the issue.
The standard compilation feedback should be more detailed

Hi,

thanks for your response,
here is the debugger output https://reinosoft.cf/ul/compileroutput.txt, i hope this will help.

Yes, now we can see that the sketch and library code are causing compiler errors:

In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:4:0:
c:\Arduino\ArduinoLibs\libraries\UseFullFunctions/NTPtime.h: In function 'void UnixToTime(uint32_t, DS1302_DateTime&)':
c:\Arduino\ArduinoLibs\libraries\UseFullFunctions/NTPtime.h:35:1: error: label 'start' defined but not used [-Werror=unused-label]
 start:  
 ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:5:0:
c:\Arduino\ArduinoLibs\libraries\HomeProject2/def.h: At global scope:
c:\Arduino\ArduinoLibs\libraries\HomeProject2/def.h:102:13: warning: 'thisRS_Adress' initialized and declared 'extern'
 extern byte thisRS_Adress = NOT_DEFINED;
             ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\WifiSD.h:9:0,
                 from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:25:
c:\Arduino\ArduinoLibs\libraries\UseFullFunctions/urlencode.h: In function 'String urlencode(String)':
c:\Arduino\ArduinoLibs\libraries\UseFullFunctions/urlencode.h:38:10: warning: variable 'code2' set but not used [-Wunused-but-set-variable]
     char code2;
          ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:25:0:
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\WifiSD.h: In function 'bool handleWifi()':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\WifiSD.h:60:1: error: no return statement in function returning non-void [-Werror=return-type]
 }
 ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:25:0:
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\WifiSD.h: In function 'bool handleFileRead(String)':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\WifiSD.h:219:14: warning: unused variable 'sent' [-Wunused-variable]
       size_t sent = WebServer.streamFile(file, contentType);    // Send it to the client
              ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:26:0:
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Server.h: In function 'void buildWebPage()':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Server.h:40:39: error: narrowing conversion of 'myFile.fs::File::read()' from 'int' to 'char' inside { } [-Werror=narrowing]
     char   RawAdress[2] = {myFile.read(),myFile.read()};
                                       ^
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Server.h:40:53: error: narrowing conversion of 'myFile.fs::File::read()' from 'int' to 'char' inside { } [-Werror=narrowing]
     char   RawAdress[2] = {myFile.read(),myFile.read()};
                                                     ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:52:0:
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h: In member function 'bool SerialComm::addtoBuff(char)':
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h:195:12: warning: unused variable 'myval' [-Wunused-variable]
       byte myval = myChar;
            ^
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h: In member function 'bool SerialComm::FlushData()':
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h:279:14: warning: unused variable 'c' [-Wunused-variable]
         char c = serial.read();
              ^
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h:281:5: error: no return statement in function returning non-void [-Werror=return-type]
     }
     ^
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h: In member function 'short int SerialComm::readint()':
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h:494:14: warning: unused variable 'skip' [-Wunused-variable]
         byte skip = read(); //skip the byte!
              ^
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h: In member function 'short int SerialComm::buffer2int(byte, byte)':
c:\Arduino\ArduinoLibs\libraries\COM485/COM485.h:627:5: error: no return statement in function returning non-void [-Werror=return-type]
     }
     ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:54:0:
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Serial_Master.h: In function 'void doFlush()':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Serial_Master.h:47:10: warning: unused variable 'c' [-Wunused-variable]
     byte c = RS.read();
          ^
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Serial_Master.h: In function 'void IncomingInput(byte)':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Serial_Master.h:186:10: warning: unused variable 'd' [-Wunused-variable]
     bool d = GetSetIOstatus(fromAdress, C_INPUT, inputno, newstate);
          ^
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Serial_Master.h: In function 'void IncomingOutput(byte)':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\Serial_Master.h:203:10: warning: unused variable 'd' [-Wunused-variable]
     bool d = GetSetIOstatus(fromAdress, C_OUTPUT, outputno, newstate);
          ^
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino: In function 'void fillStats(byte)':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:127:17: warning: comparison is always false due to limited range of data type [-Wtype-limits]
     if (errorno == READ_INT_ERROR) {
                 ^
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino: In function 'void onMenuArrive(String, byte)':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:265:48: warning: comparison is always true due to limited range of data type [-Wtype-limits]
     if (myArea > 0 && myArea <= 16 && newstate >= 0 && newstate <= 2) {
                                                ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:4:0:
c:\Arduino\ArduinoLibs\libraries\UseFullFunctions/NTPtime.h: In function 'bool isDST(int, int, int, int)':
c:\Arduino\ArduinoLibs\libraries\UseFullFunctions/NTPtime.h:136:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:53:0:
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\buffer.h: In function 'bool addATSAreatoBuff(byte, byte)':
c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\buffer.h:138:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
In file included from c:\Arduino\Projects\Homeboard\Programmering\HomeBoard_Master\HomeBoard_Master.ino:41:0:
c:\Arduino\ArduinoLibs\libraries\SerialMenu/SerialMenu.h: In member function 'String SerialMenu::getParam(byte, bool, bool, bool)':
c:\Arduino\ArduinoLibs\libraries\SerialMenu/SerialMenu.h:168:5: error: control reaches end of non-void function [-Werror=return-type]
     }
     ^

A tricky thing about the ESP32 boards platform is that when you have File > Preferences > Compiler warnings set to “More” or “All”, compiler warnings get upgraded to errors. The ESP32 developers did this to advocate for writing warning-free code. Unfortunately, not all library authors follow these best practices, so sometimes low quality code that you didn’t write is the cause of the warning.

So you can fix the warnings or you can change the warning level preference to “Default”.

As for this part of the output:

Multiple libraries were found for "SD.h"
 Used: C:\Users\ED12Q\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\SD
 Not used: C:\Arduino\Arduino\libraries\SD
Multiple libraries were found for "WiFiUdp.h"
 Used: C:\Users\ED12Q\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi
 Not used: C:\Arduino\Arduino\libraries\WiFi
Using library UseFullFunctions in folder: c:\Arduino\ArduinoLibs\libraries\UseFullFunctions (legacy)
Using library ErriezDS1302 at version 1.0.0 in folder: c:\Arduino\ArduinoLibs\libraries\ErriezDS1302 
Using library EasyNTPClient at version 1.1.0 in folder: c:\Arduino\ArduinoLibs\libraries\EasyNTPClient 
Using library WiFi at version 1.0 in folder: C:\Users\ED12Q\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WiFi 
Using library HomeProject2 in folder: c:\Arduino\ArduinoLibs\libraries\HomeProject2 (legacy)
Using library Hex2Dec in folder: c:\Arduino\ArduinoLibs\libraries\Hex2Dec (legacy)
Using library WebServer at version 1.0 in folder: C:\Users\ED12Q\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\WebServer 
Using library FS at version 1.0 in folder: C:\Users\ED12Q\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\FS 
Using library SD at version 1.0.5 in folder: C:\Users\ED12Q\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\SD 
Using library SPI at version 1.0 in folder: C:\Users\ED12Q\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\libraries\SPI 
Using library SerialMenu at version 1.0.0 in folder: c:\Arduino\ArduinoLibs\libraries\SerialMenu 
Using library COM485 at version 2.1.1 in folder: c:\Arduino\ArduinoLibs\libraries\COM485 

This is just some helpful information provided by the Arduino IDE. The only time it might indicate a problem is if you see that there were multiple libraries and the IDE picked a different one than you had intended. Otherwise, you can ignore that part of the output.

Hi,

You’re right. after changing the value to default the sketch compile without problems.
I never thought the solution was that easy!

Thanks

1 Like

You’re welcome. I’m glad to hear it’s working now. Enjoy!
Per