-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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
Latest 2.x branch: fatal error: lib/u8g.h: No such file or directory #8323
Comments
Yep, fails for me in the Arduino IDE with a RAMPS config as well. Same error. Build works in Visual Studio Code with PlatformIO though. |
Seems most likely related to #8262. |
@Bob-the-Kuhn I just ran into also... I think it blows up when a Graphical LCD Panel is selected. |
I tweaked the The changes I had to make can be seen here: I think it's to do with how the IDE loads the U8g library, and the syntax the Arduino IDE expects for an include on the include path ( I'm probably wrong though, I'm really just guessing ;-) |
Dupe of #7931 Follow trail for debug fix available from arduino/arduino-builder project (and please close once confirmed - thx) EDIT: I forgot that the latest debug build with work-around proposal did not work 100% correctly for me, so please open a new issue at arduino project so they can understand the need to fix (below is link to the build, but I would urge all to open an issue on the arduino-builder project) Of course just using PlatformIO is a permanent immediate solution. |
@fiveangle, my latest issue was that, and I resolved it by changing the temp path but, as described by the OP, there are other things wrong here (including the Now that I've fixed the path-too-long thing, I get these errors from the compiler:
|
And the penny dropped - @Bob-the-Kuhn's changes require the U8Glib-HAL library, not the standard U8g library. Replacing the original U8g library with U8glib-HAL make all those last errors go away and everything compiles cleanly (using my version with the modified |
Nope, I was being an idiot and hadn't enabled an LCD - still a lot of errors. I'm going to leave this to the experts, sorry if my meddling added any confusion. |
This is a platformio.ini issue. The U8glib-HAL in the [common] section is supposed to automatically install the needed library. Try the following change for your board:
There needs to be EXACTLY 2 spaces between the start of the line and U8glib-HAL_ID1932. This works on my system but then so does the current bugfix. I'll push this to the code base after I do a few sanity checks. |
@Bob-the-Kuhn it works in PlatformIO for me (in VS Code). It doesn't work in the Arduino IDE. Is there a way to make the U8glib-HAL library play nice with the Arduino IDE? |
Shoot - I hadn't thought about the Arduino IDE. Looks like the idea of having just one library doesn't work in all situations. Back to u8g for Arduino/AVR boards and U8glib-HAL for the others. |
Are we confident that w/a resolves ? There's no guarantee that shortening the temp path from I too found a seemingly different failure mode after the first debug build of arduino-builder which theoretically shoud have resolved. However it wasn't until the newer debug build that moves knee point closer to 31k vs 32k that I got a successful compile (albeit with different binary sizes after every build, so still needs resolution, but at least compiled). Can you confirm installation of the latest debug arduino-builder I linked above does not get you further along ? |
@fiveangle, this is a different problem. The error related to the length of the command line was a red herring. Bob's work on the U8glib doesn't seem to be compatible with the Arduino IDE. |
good good - sorry to distract ! |
There's several changes that need to be done to resolve the Arduino IDE problem:
Unfortunately that breaks the LPC1768 code. That fix involves a change to the library which can take up to 24 hours to happen. Looks like the solution will take multiple steps:
|
I've just merged PR #8338 to take care of the Platformio folks. On to the U8glib-HAL changes. |
4:55 PM CST Please hold off on this. My Arduino IDE fixes no longer work. Scott - I don't have the rights to fork U8glib-HAL so I can't do a PR against it. Please replace U8glib-HAL with this. Here's some proposed text for the PR. Arduino IDE compatibility (part 1 of 2)
NOTE - the LIB directory needs to stay around until Bugfix2.0.x is updated. LIB will be deleted on a follow up PR. |
I just ran into a "filename or extension is too long" error when compiling with Arduino. Is this the 32K limit issue being discussed earlier? I think I have the issues fixed but ... Could a couple of you try the following with Arduino & with PlatformIO? https://www.dropbox.com/s/euw84aace3yqbbz/2.0.x%20compile%20fixes.zip?dl=0 It looks like changing <lib/u8g.h> to <U8glib.h> fixes the platformio issue and most of the Arduino IDE build issue. There were a couple of other includes that needed to be fixed for the Arduino IDE issue.. |
I was able to get Arduino to compile using the beta version. I've just merged the updates via PR #8341 |
Works for me too - error-free compilation in VS Code and Arduino IDE. Thanks, Bob. |
Sorry for the late reply, @Bob-the-Kuhn — You now have full powers on https://github.com/MarlinFirmware/U8glib-HAL |
Great news - others can compile the new code. Now to see if it can run displays besides VIKI2 & RepRap Discount Full Graphics Smart Controller. |
Hello sorry for posting this issue and disappearing. I grabbed the latest as of just now and I'm now receiving this build error (no doubt) related to the previous one: sketch\src\lcd\dogm\u8g_dev_ssd1306_sh1106_128x64_I2C.cpp:72:20: fatal error: U8glib.h: No such file or directory #include <U8glib.h>
compilation terminated. exit status 1 |
Have you installed the U8glib library using the library manager in the Arduino IDE? |
Oops sorry nope I didn't. Just did now. Building, it's definitely gotten further than last time so I'm thinking it is good. Will confirm in just a moment... |
Ok, so now I installed the U8glib stuff and it goes through almost the entire compile (err, "verify") process and then at the end I get this:
Some people mention that Arduino IDE may have gotten corrupted, but I loaded up Skynet and an older version of Marlin v2 and they both compiled without issue in the same version of the IDE (1.8.5). Any ideas? |
Interestingly, compiling it from my Raspi3 with Arduino IDE returns a flood of build warnings (as opposed to the virtually silent verbosity of my windows box), but it actually seems to succeed: Ugh I can't paste this in pastebin because of a 512k limit. I'll just include the top and bottom warnings (its 2.5mb of text for the whole thing)
...
|
I think your Pi is probably not using the correct compiler flags (I think the missing one is -fpermissive). Make sure it has the latest board definition for the Anet board. On Windows ~~you're~ you could be running into the Arduino bug fiveangle mentioned, where the compiler is trying to execute a command more than 32K characters long. An easy way to try to work around that is to change the build path by opening up the Arduino IDE preferences file and adding You need to edit the preferences file while the Arduino IDE is not running. The file is here: Otherwise, another workaround is to follow the link above and update your Arduino environment to use the bugfix build tools: |
Another Arduino work around is to use the Beta version of Arduino. That worked for me. |
Thanks guys @benlye not sure why I'm getting those warnings. I've loaded up Arduino 1.9.0 beta and verified that I'm using the latest anet machine configs:
As for the compile flag, I checked the platform.txt in the "anet-board" stuff and it did have it under cpp flags. Is that the right place to check for it?
|
@Bob-the-Kuhn and @benlye I loaded up 1.9.0 beta on my Windows box and changed the build path in the preferences.txt to c:\tmp. Sorry I should have attempted one at a time to pinpoint the actual fix, but I didn't. Everything is working great now - from Windows at least, and I guess the Pi is just showing me harmless(???) warnings. I'll go ahead and close this issue out unless you see a reason to keep it open. Thanks for all your help (and everyone else!) |
Path length issue is supposedly fixed in 1.9 so changing build dir should not be needed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
When I compile the 2.x branch using the default Anet A8 Configuration.h and Configuration_adv.h files I receive the following error:
No other changes have been made to the configuration files. DOGLCD is NOT enabled. Build would likely fail with any config file I think.
Arduino IDE v1.8.5
The text was updated successfully, but these errors were encountered: