fatal error: utility/u8g.h: No such file or directory

I know that this topic has been previously submitted, but I cannot find any resolution. I recently upgraded from 1.6.7 to 1.6.8. After making sure that U8GLIB was added to the library (via the sketch add library function) and editing the configuration.h file for the proper lcd (reprap_discont_full_graphic_smart_controller) I get the error message shown above. The full message is:

In file included from C:\Users\Bill\AppData\Local\Temp\buildca1f61a09b34f7c241a8e9f55d2a66a7.tmp\sketch\dogm_lcd_implementation.h:38:0,

from C:\Users\Bill\AppData\Local\Temp\buildca1f61a09b34f7c241a8e9f55d2a66a7.tmp\sketch\ultralcd.cpp:36:

C:\Users\Bill\AppData\Local\Temp\buildca1f61a09b34f7c241a8e9f55d2a66a7.tmp\sketch\dogm_font_data_marlin.h:12:25: fatal error: utility/u8g.h: No such file or directory

What am I overlooking or not doing? Any help will be greatly appreciated.

Attach the code you're using and post a link to where you downloaded U8GLIB and I'll have a look.

Thanks for taking a look. I downloaded the U8GLIB library from here: https://github.com/olikraus/u8glib

I am not sure what code you are referring to. I am trying to recompile Marlin with a minor change to my stepper parameters. I get the error when compiling marlin for upload to my arduino. The Marlin code is 1.0.1 I believe.

wmbussey: The Marlin code is 1.0.1 I believe.

Please check to verify the version so I can be sure I'm using the same code as you. Is there any particular reason you're using 1.0.1? I see in the release notes "This version has various known issues. We recommend using 1.0.2-1 or newer." If there are any configuration changes you've made other than the reprap_discont_full_graphic_smart_controller thing let me know(or you could just attach your code). Also what do you have selected in Tools > Board?

I really appreciate the attempt to help me with this. I thought the update would be pretty straight forward.

Looking at the LCD when The software loads I see Marlin 1.0.0 RC2. I had downloaded newer versions but apparently did not get them installed properly (understand that I have been printing prior to downloading and installing Arduino ver1.6.8).

Also, I have a Arduino/Genuino 2560 or Mega 2560 board selected .

I began to have a problem trying to upload the existing marlin software using ver. 1.6.8. Prior to the upload error, all I did was run the Include Library function to make sure U8GLIB was still installed.

Is there an easy way to attach the configuration.h file or do I just copy and paste it into a reply?

wmbussey:
Looking at the LCD when The software loads I see Marlin 1.0.0 RC2. I had downloaded newer versions but apparently did not get them installed properly

I need to know the version of the Marlin firmware code you have on your computer that you’re trying to compile when you get the error message, not the version that is installed on your printer. If you look around in the folders where the Marlin files are you should be able to find a file named README.md, Default_Version.h, or _Version.h, open that file with a text editor and look for a version number in the file. Or you can just attach the Marlin firmware files

wmbussey:
Is there an easy way to attach the configuration.h file or do I just copy and paste it into a reply?

You can copy and paste using code tags(the </> button) or if it’s too big for the forum to allow that you can click Reply(instead of Quick Reply) and there will be the “Attachments and other options” button you can click at the bottom of the window which will allow you to attach files.

OK, I’m with you now. I have Marlin 1.0.2-1 on my PC. Also I have discovered that I only get the error if I uncomment the define for the rerap_discount_full_graphic_smart_controller. With that statement undefined, Marlin compiles and uploads to the printer with no error.

I have attached The Configuration.h file.

Configuration.h (35.2 KB)

The problem is that the U8glib library you installed has the file at clib/u8g.h instead of the expected utility/u8g.h. So all you need to do is change lines 12 and 171 of the file Marlin/dogm_font_data_marlin.h from:

#include <utility/u8g.h>

to

#include <clib/u8g.h>

I have attached the updated file if you want to just replace your copy of the file with it. After those changes it compiles for me. Well, hopefully that will get you printing with updated firmware! Let me know how it goes. Per

dogm_font_data_marlin.h (15.4 KB)

Thank you, thank you. I copied your file and replaced the old file and now everything compiles great. Is the file/library problem something that should be corrected in the distribution or just a result of the source file selection I used? I had updated several times previously without encountering this problem.

Bill

Glad to hear it's working!

wmbussey: Is the file/library problem something that should be corrected in the distribution or just a result of the source file selection I used?

The older versions of the library had a utility folder but for some reason they renamed it to clib so I guess it depends on which version of the library is used which is correct. It's more confusing because the U8glib library files were originally hosted at https://code.google.com/archive/p/u8glib/ where the folder was named utility but when they moved it to GitHub the folder name changed and you can't look back at the GitHub commit history to see when it was changed. There is actually a copy of the U8glib library included with Marlin 1.0.2-1 at Marlin-1.0.2-1\ArduinoAddons\Arduino_1.5.x\hardware\marlin\avr\libraries\U8glib and that one still has the folder named utility and the same with Marlin 1.1.0-RC3. I submitted a pull request to the MarlinDev repository a while back to fix an issue caused by one of the included libraries conflicting with an Arduino built-in library and there was some discussion that seemed to conclude that they prefer including old versions of libraries that are known to work with Marlin because if people install the latest versions of the library instead there may be compatibility issues even though the new version is presumably improved. I notice that in the latest Marlin package that you can install using Boards Manager they are using the latest version of U8glib that has the clib folder.

I donwload a file from here for my formware cr10, before i tried to copilate this error jumps up

I dont know what lese to do, before flasing my printer it gets blank and doesnt work any more please help In file included from sketch\SdFile.h:27:0,

from sketch\cardreader.h:8,

from sketch\cardreader.cpp:2:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

^

In file included from sketch\Marlin.h:10:0,

from sketch\cardreader.cpp:1:

d:\users\rick\desktop\firmware pack source folder\windows arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

extension typedef long long fpos_t;

^

Se encontraron múltiples librerías para "U8glib.h" Usado: D:\Users\Rick\Desktop\Firmware Pack Source Folder\Windows Arduino\portable\sketchbook\libraries\U8glib-1.19.1 No usado: D:\Users\Rick\Desktop\Firmware Pack Source Folder\Windows Arduino\portable\sketchbook\libraries\arduino_613091 In file included from sketch\SdBaseFile.cpp:24:0:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

^

In file included from sketch\Marlin.h:10:0,

from sketch\SdBaseFile.cpp:21:

d:\users\rick\desktop\firmware pack source folder\windows arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

extension typedef long long fpos_t;

^

sketch\SdBaseFile.cpp: In member function 'void SdBaseFile::getpos(fpos_t*)':

SdBaseFile.cpp:298:8: error: request for member 'position' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

pos->position = curPosition_;

^

SdBaseFile.cpp:299:8: error: request for member 'cluster' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

pos->cluster = curCluster_;

^

sketch\SdBaseFile.cpp: In member function 'void SdBaseFile::setpos(fpos_t*)':

SdBaseFile.cpp:1496:23: error: request for member 'position' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

curPosition_ = pos->position;

^

SdBaseFile.cpp:1497:22: error: request for member 'cluster' in '* pos', which is of non-class type 'fpos_t {aka long long int}'

curCluster_ = pos->cluster;

^

exit status 1 In file included from sketch\SdFile.h:27:0,

from sketch\SdFile.cpp:23:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

^

In file included from sketch\Marlin.h:10:0,

from sketch\SdFile.cpp:20:

d:\users\rick\desktop\firmware pack source folder\windows arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

extension typedef long long fpos_t;

^

In file included from sketch\SdFile.h:27:0,

from sketch\cardreader.h:8,

from sketch\ultralcd.cpp:6:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

^

In file included from sketch\Marlin.h:10:0,

from sketch\temperature.h:24,

from sketch\ultralcd.cpp:1:

d:\users\rick\desktop\firmware pack source folder\windows arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

extension typedef long long fpos_t;

^

In file included from sketch\SdFile.h:27:0,

from sketch\cardreader.h:8,

from sketch\Marlin_main.cpp:44:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

^

In file included from sketch\Marlin.h:10:0,

from sketch\Marlin_main.cpp:30:

d:\users\rick\desktop\firmware pack source folder\windows arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

extension typedef long long fpos_t;

^

In file included from sketch\SdFile.h:27:0,

from sketch\cardreader.h:8,

from sketch\stepper.cpp:30:

SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'

struct fpos_t {

^

In file included from sketch\Marlin.h:10:0,

from sketch\stepper.cpp:24:

d:\users\rick\desktop\firmware pack source folder\windows arduino\hardware\tools\avr\avr\include\stdio.h:950:33: note: 'fpos_t' has a previous declaration here

extension typedef long long fpos_t;

^

using typedef-name 'fpos_t' after 'struct'

indestructible:
SdBaseFile.h:38:8: error: using typedef-name ‘fpos_t’ after ‘struct’

This issue with Marlin was fixed long ago and has been well documented. You have a few options:

They easiest is to use the last version of Arduino AVR Boards that is compatible with the version of Marlin you’re attempting to compile:
(In the Arduino IDE) Tools > Board > Boards Manager
Wait for the downloads to finish.
Click on “Arduino AVR Boards”
From the dropdown menu, select “1.6.11”.
Click “Install”.
Wait for the installation to finish.
Click “Close”.

You should now be able to compile without getting that error. The Arduino IDE may periodically notify you that a newer version of Arduino AVR Boards is available. You will need to refrain from updating, otherwise the error will come back.

Another option is to update to the modern version of Marlin that is compatible with the latest version of Arduino AVR Boards. If you get the official Marlin, you would need to configure Marlin to work with your 3D printer. You might check whether the manufacturer of your 3D printer has provided an updated version of the firmware for your 3D printer. If they don’t, then you might want to hassle them about that, since any responsible company would provide that level of support for their products.

The last option would be to patch your current version of Marlin to fix the issue. You can see the patch here:

I am trying to load the program on an Elecrow smart plant watering kit that came with a bad program. I am almost there but I am getting the error message clib/u8 g.h: no such file or directory. I have been looking but I cant find that file. Can anyone help? Thanks

Watermaid:
I am trying to load the program on an Elecrow smart plant watering kit that came with a bad program. I am almost there but I am getting the error message clib/u8 g.h: no such file or directory. I have been looking but I cant find that file. Can anyone help? Thanks

Please do this:

  • When you encounter an error, you’ll see a button on the right side of the orange bar “Copy error messages” in the Arduino IDE (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button…
  • 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.

``Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino Esplora"

Build options changed, rebuilding all In file included from C:\Users\Dell\Desktop\watering_kit (8)\watering_kit\watering_kit.ino:2:0:

U8glib.h:42:22: error: clib/u8g.h: No such file or directory

compilation terminated.

exit status 1 clib/u8g.h: No such file or directory

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Here is the error message.

Please post a link to where you downloaded the watering kit code from.