-
-
Notifications
You must be signed in to change notification settings - Fork 114
Builder is unable to find generic libraries for 3rd party boards #97
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
Any on-going work regarding this issue? 1.6.8 is still showing the problem. We're using IDE 1.6.5 in the meantime. |
Turns out the fix that was applied only worked for includes directly from the main .ino file. When scanning the compiler error output for missing includes, it only looked at the first line. However, when the .ino file includes a .h file in the sketch, which again includes a .h file from a library, the output looks like:
So the error in the first line is not found. The fix is of course simple: Scan all lines instead of just the first. I'll prepare a PR in a minute. |
The primary way to detect includes is to scan the compiler error output for "#include" lines. However, older gcc versions did not print the error line itself, only a message about the error, which would not be detected. In bd5d3ec (Fix include resolution for older compilers), a fallback was added to scan for "fatal error" followed by the missing include filename, but that fallback only looked at the first line of the error output. When the missing #include line is not in the source file being compiled, but in an included file, the error message would something like this: In file included from binouts.ino:52:0: regtable.h:31:22: fatal error: register.h: No such file or directory So the filename that should be found is in the second line (or further). This commit changes the fallback process to keep scanning lines of compiler output, until one is found, instead of only looking at the first line. This fixes arduino#97. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Thanks @matthijskooijman! Looking forward to testing the fix on the next release. |
Issue #83 is not totally fixed. Using platform-generic libraries (under SKETCHES/libraries/) from 3rd-party boards does not work. Libraries cannot be found by the builder.
I tested the SWAP library:
https://github.com/panStamp/swap
with this example:
https://github.com/panStamp/swap/tree/master/examples/binouts
for panStamp NRG2 board:
http://panstamp.org/arduino/package_panstamp_index.json
The text was updated successfully, but these errors were encountered: