Having trouble adding U8glib library to a sketch. Any help?

I am adding an LCD Graphic Controller to my 3D printer running a Ramps 1.4 board on an Arduino Mega 2560, so I need to add the U8glib library but I'm getting the error in error1.txt

I followed the advice from this post (U8glib.h compiling error), but it resulted in error2.txt

Apparently I can't attach txt files? Anyways, here's the files.

https://drive.google.com/file/d/1NhgVNSWMOdriwMQZ4KVyQAiRB40rQqdC/view?usp=sharing

https://drive.google.com/file/d/1eGcByxx4oMMLY4K4SCdI2Z7T4dNe3D3x/view?usp=sharing

If it helps, here is the u8g.h file the first error referenced (this is with the changed line 115 as recommended in the aforementioned forum post):

https://drive.google.com/file/d/1pmqSVIj79VqwjT8gGlWlKB9CrTy4Cakr/view?usp=sharing

You did your research :wink: Thanks for that.

You can post your errors in the post, not as attachments or links. For error2, I think we need to see your sketch as well as the modified version of libraries. I'm not familiar with Ramps, but I suspect that there are multiple files; if so, zip your sketch directory and attach it.

error1.txt

In file included from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/U8glib-HAL.h:47:0,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\HAL\AVR\u8g_com_HAL_AVR_sw_spi.cpp:65:
C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/clib/u8g.h:115:25: internal compiler error: in type_hash_canon, at tree.c:7158
 typedef uint8_t PROGMEM u8g_pgm_uint8_t;
                         ^~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
In file included from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/U8glib-HAL.h:47:0,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\dogm\u8g_fontutf8.h:11,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\lcdprint.h:53,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\marlinui.h:85,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\feature\stepper_driver_safety.cpp:23:
C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/clib/u8g.h:115:25: internal compiler error: in type_hash_canon, at tree.c:7158
 typedef uint8_t PROGMEM u8g_pgm_uint8_t;
                         ^~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
In file included from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/U8glib-HAL.h:47:0,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\dogm\u8g_fontutf8.h:11,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\lcdprint.h:53,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\marlinui.h:85,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\gcode\calibrate\G28.cpp:48:
C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/clib/u8g.h:115:25: internal compiler error: in type_hash_canon, at tree.c:7158
 typedef uint8_t PROGMEM u8g_pgm_uint8_t;
                         ^~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
In file included from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/U8glib-HAL.h:47:0,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\dogm\u8g_fontutf8.h:11,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\lcdprint.h:53,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\marlinui.h:85,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\gcode\queue.cpp:32:
C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/clib/u8g.h:115:25: internal compiler error: in type_hash_canon, at tree.c:7158
 typedef uint8_t PROGMEM u8g_pgm_uint8_t;
                         ^~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
In file included from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/U8glib-HAL.h:47:0,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\dogm\u8g_fontutf8.h:11,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\lcdprint.h:53,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\marlinui.h:85,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\MarlinCore.cpp:61:
C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/clib/u8g.h:115:25: internal compiler error: in type_hash_canon, at tree.c:7158
 typedef uint8_t PROGMEM u8g_pgm_uint8_t;
                         ^~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
In file included from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/U8glib-HAL.h:47:0,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\dogm\u8g_fontutf8.h:11,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\lcdprint.h:53,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\lcd\marlinui.h:85,
                 from C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x\Marlin\src\gcode\control\M17_M18_M84.cpp:25:
C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Arduino\libraries\U8glib-HAL\src/clib/u8g.h:115:25: internal compiler error: in type_hash_canon, at tree.c:7158
 typedef uint8_t PROGMEM u8g_pgm_uint8_t;
                         ^~~~~~~~~~~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
exit status 1
Error compiling for board Arduino Mega or Mega 2560.

Unfortunately, error2.txt is too big so we have to live with that :frowning:

Sorry, I'm compiling the sketch now to post a Zip.

Edit: Ya I'm dumb. I figured that out.

It says "Sorry new users cannot upload attachments."

Great system Arduino has for their new user forum lol

You don't have to compile to post a sketch. I think that it's this directory that you need to zip: C:\Users\Caleb\OneDrive - Texas A&M University\Documents\Marlin-2.0.x

Not familiar with Marlin so can't help you further.

I have moved your topic to a more suitable location on the forum.

I can't even post a google drive link. How can I get you my sketch?

Something fishy is going on; did you flag some of your posts? I see messages "view ignored content" in some of your posts.

Give it between 30 minutes and an hour and try to post the google link again.

I didn't flag anything on purpose, and I have no idea what the view ignored content is.

If that didn't work, google drive is finally working:

https://drive.google.com/file/d/1gUPm13ZfCdZKElbHXCkA5RSE4R5wC0Ar/view?usp=sharing

Hi @calebdollar. I apologize for the inconvenience. This automatic restriction is intended to prevent abuse of the forum by bots. However, it can sometimes have a harmful effect on people, such as yourself, who only intend to use the forum responsibly.

Fortunately, the requirements for moving to the next "trust level" with the forum software are very minimal. You will find that each trust level imposes less restrictions. Since you have already gone from trust level 0 to trust level 1, you will see an improvement.

You can learn about the Discourse forum software's "trust level" system here:

They were flags made by the forum's automated spam detection system, triggered due to multiple links to the same domain by a new user.

The spam detection system does sometimes have some unfortunate false positives, and this is why every action it takes is reviewed by a human moderators. So even though there might be a temporary inconvenience, everything will be set right eventually. Fortunately, we have a very active and dedicated group of moderators, so the situation is usually resolved very quickly.

I have already restored the posts that were put on queue by the spam detection system.

Ah I see. Well thankyou for being quick with fixing it. Now hopefully I can get some help uploading this darn library.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.