-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Command Line Build Failure #8100
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
What command are you using to compile this sketch exactly? Can you enable verbose compilation in the preferences and then show the verbose output of both the IDE build and the commandline build? |
After further investigation I've found that the CLI build works the first time, but subsequent builds fail with the error below. Command: /home/wesw/dev/arduino-1.8.6/arduino --pref build.path=/home/wesw/dev/src/homeauto/tempsensor/itest/bin --verify /home/wesw/dev/src/homeauto/tempsensor/itest/itest.ino Output from CLI build: |
Seems you're running into a problem that I recently also spotted (see arduino/arduino-builder#299 (comment) and arduino/arduino-builder#299). The problem is triggered because your build directory is inside the sketch directory, which is incorrectly handled by the build environment. For now, my recommendation would be to use a build path outside of your sketch directory, and to watch that PR for further discussion and a real fix. Note that there might be a second bug here: This problem also needs the "Build options changed, rebuilding all" to trigger. From what you're saying, it sounds like you're just running the exact same command twice, so the build options should not actually have been changed. I've seen this before on a Windows machine of a colleague, where we were also passing --pref to change the build path and/or sketchbook path and/or preferences.txt path IIRC, so there might be a problem there. Might also be related to having the build dir inside the sketch dir. |
That fixed the issue for me, thanks. |
When compiling sketches from the command line it seems that the include file behavior is different. The sketch below compiles in the IDE but fails from the command line with the error: "itest:2:18: error: test.h: No such file or directory". This is a simple sketch to demonstrate the problem. I have itest.ino and test.h. One note is that removing the ESP8266WiFi.h include fixes it. It seems that there is some funky include path stuff happening.
The sketch is as follows:
#include <ESP8266WiFi.h>
#include "test.h"
void setup()
{
}
void loop()
{
}
The text was updated successfully, but these errors were encountered: