Compilation

Hello good afternoon. I have been trying to compile the printer’s firmware for several days and I get the following error:

Arduino:1.8.5 (Windows 10), Tarjeta:“Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware -hardware C:\Users\jssan\AppData\Local\Arduino15\packages -tools C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\tools-builder -tools C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -tools C:\Users\jssan\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\libraries -libraries C:\Users\jssan\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10805 -build-path C:\Users\jssan\AppData\Local\Temp\arduino_build_415598 -warnings=none -build-cache C:\Users\jssan\AppData\Local\Temp\arduino_cache_835706 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\jssan\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5 -prefs=runtime.tools.avrdude.path=C:\Users\jssan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.0.1-arduino5 -verbose C:\Users\jssan\3D Objects\Marlin-CR10-1.1.x\Marlin\Marlin.ino
C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\arduino-builder -compile -logger=machine -hardware C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware -hardware C:\Users\jssan\AppData\Local\Arduino15\packages -tools C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\tools-builder -tools C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\tools\avr -tools C:\Users\jssan\AppData\Local\Arduino15\packages -built-in-libraries C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\libraries -libraries C:\Users\jssan\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10805 -build-path C:\Users\jssan\AppData\Local\Temp\arduino_build_415598 -warnings=none -build-cache C:\Users\jssan\AppData\Local\Temp\arduino_cache_835706 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\jssan\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5 -prefs=runtime.tools.avrdude.path=C:\Users\jssan\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.0.1-arduino5 -verbose C:\Users\jssan\3D Objects\Marlin-CR10-1.1.x\Marlin\Marlin.ino
Using board ‘mega’ from platform in folder: C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr
Using core ‘arduino’ from platform in folder: C:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr
Detecting libraries used…
“C:\Users\jssan\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR “-IC:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\cores\arduino” “-IC:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\variants\mega” “C:\Users\jssan\AppData\Local\Temp\arduino_build_415598\sketch\Marlin.ino.cpp” -o “nul”
“C:\Users\jssan\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-g++” -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR “-IC:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\cores\arduino” “-IC:\Users\jssan\Videos\arduino-1.8.5-windows\arduino-1.8.5\hardware\arduino\avr\variants\mega” “C:\Users\jssan\AppData\Local\Temp\arduino_build_415598\sketch\Marlin.ino.cpp” -o “C:\Users\jssan\AppData\Local\Temp\arduino_build_415598\preproc\ctags_target_for_gcc_minus_e.cpp”
C:\Users\jssan\3D Objects\Marlin-CR10-1.1.x\Marlin\Marlin.ino:45:110: fatal error: U8glib.h: No such file or directory

#include <U8glib.h> // library for graphics LCD by Oli Kraus (https://github.com/olikraus/U8glib_Arduino)

^

compilation terminated.

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

I hope you can help me. Thank you. regards

jssr:
I have been trying to compile the printer’s firmware for several days and I get the following error:

In days you didn’t think to Google the error message? This has already been discussed many times here and elsewhere.

jssr:
fatal error: U8glib.h: No such file or directory

#include <U8glib.h> // library for graphics LCD by Oli Kraus (https://github.com/olikraus/U8glib_Arduino)

^

When you see a “No such file or directory” error it almost always means you need to install the library that contains the missing file.

Often the code you’re compiling will come with documentation (either a comment or separate document) that tells you where to get the library dependencies. And to our astonishment, we find a helpful comment with a link right there in the error message:

In other cases the author of the code will not have been so kind and you’ll need to go on a hunt for the missing library.

A good place to start is the Arduino IDE’s Library Manager:

  • Sketch > Include Library > Manage Libraries…
  • In the “Filter your search…” box, type some keywords you have gleaned from the missing file name.
  • Scroll through the results for the right library. Click on it.
  • Click “Install”.
  • Wait for installation to finish.
  • Click “Close”.
  • Try compiling your code again.

If you have no luck in Library Manager then load up your favorite search engine and do a search for the missing filename. You will often get multiple results. If you have a lot of results you might add “arduino” as an additional search keyword. I will usually prefer results on github.com since that is where most Arduino libraries are hosted and downloading from there is fast and easy. In some cases there will be multiple libraries that contain the given filename and you’ll need to do some evaluation to determine which seems the most appropriate, then try it out. After downloading the library you found you’ll need to install it. This requires a different process than the Library Manager installation. You will find instructions here:

c:\users\jssan\appdata\local\temp\arduino_build_154528\sketch\src\hal\hal_avr\hal.h:38:0,

from C:\Users\jssan\AppData\Local\Temp\arduino_build_154528\sketch\src\inc/MarlinConfig.h:28,

from C:\Users\jssan\AppData\Local\Temp\arduino_build_154528\sketch\src\Marlin.h:25,

from C:\Users\jssan\AppData\Local\Temp\arduino_build_154528\sketch\src\Marlin.cpp:31:

c:\users\jssan\appdata\local\temp\arduino_build_154528\sketch\configuration.h:953:28: error: pasting "/* Creality CR10-S stock sensor*/" and "_RPORT" does not give a valid preprocessing token

#define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor

^

c:\users\jssan\appdata\local\temp\arduino_build_154528\sketch\src\hal\hal_avr\fastio_AVR.h:66:43: note: in definition of macro '_READ'

#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)

^

C:\Users\jssan\AppData\Local\Temp\arduino_build_154528\sketch\src\feature/runout.h:61:29: note: in expansion of macro 'READ'

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

C:\Users\jssan\AppData\Local\Temp\arduino_build_154528\sketch\src\feature/runout.h:61:34: note: in expansion of macro 'FIL_RUNOUT_PIN'

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

c:\users\jssan\appdata\local\temp\arduino_build_154528\sketch\configuration.h:953:28: error: pasting "/* Creality CR10-S stock sensor*/" and "_PIN" does not give a valid preprocessing token

#define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor

^

c:\users\jssan\appdata\local\temp\arduino_build_154528\sketch\src\hal\hal_avr\fastio_AVR.h:66:64: note: in definition of macro '_READ'

#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)

^

C:\Users\jssan\AppData\Local\Temp\arduino_build_154528\sketch\src\feature/runout.h:61:29: note: in expansion of macro 'READ'

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

C:\Users\jssan\AppData\Local\Temp\arduino_build_154528\sketch\src\feature/runout.h:61:34: note: in expansion of macro 'FIL_RUNOUT_PIN'

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of text as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn’t show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Are you still using Arduino IDE 1.8.5? It’s much more helpful if you post the complete output that you get via the “Copy error messages” button in the Arduino IDE. That would have told me exactly which version of the Arduino IDE you’re using. You did that in the first post so I’m confused why you didn’t the second time.

Arduino:1.8.5 (Windows 10), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin.

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

Wow, you're really having a struggle!

Something seems to be messed up with your installation of Arduino AVR Boards. It's using a very outdated toolchain.

To fix this you'll need to take some drastic action. Be aware this is somewhat advanced and will remove any boards you have installed via Boards Manager:

  • Click the link on the line following File > Preferences > More preferences can be edited directly in the file. This will open the Arduino15 (or similar name depending on OS) folder.
  • Delete all files and folders under the Arduino15 folder except for preferences.txt. Please be very careful when deleting things from your computer. When in doubt, back up!
  • Restart the Arduino IDE

Verify that you can now use your board before reinstalling any packages via Boards Manager.

Arduino:1.8.5 (Windows 10), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Archiving built core (caching) in: C:\Users\jssan\AppData\Local\Temp\arduino_cache_976280\core\core_arduino_avr_mega_cpu_atmega2560_eebe80b08784ba478cff07c27703f803.a
fork/exec C:\arduino-1.8.5\hardware\tools\avr/bin/avr-gcc.exe: The filename or extension is too long.
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

Thank you for your answers. I've been trying to compile for several days. Now after a good time the last error comes out. I hope that with your help I can solve it.

Instead of Arduino IDE 1.8.5, try using the Arduino IDE Hourly Build, which you can download here:

I believe that has a fix for the "filename or extension is too long" error. If you want details on the cause and the work done to fix it, you can read:

and the other discussions linked from that one.

Arduino:1.8.6 Hourly Build 2018/08/14 10:33 (Windows 10), Tarjeta:“Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

In file included from c:\users\jssan\appdata\local\temp\arduino_build_253070\sketch\src\hal\hal_avr\hal.h:38:0,

from sketch\src\inc/MarlinConfig.h:28,

from sketch\src\Marlin.h:25,

from sketch\src\Marlin.cpp:31:

c:\users\jssan\appdata\local\temp\arduino_build_253070\sketch\configuration.h:956:28: error: pasting “/* Creality CR10-S stock sensor*/” and “_RPORT” does not give a valid preprocessing token

#define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor

^

c:\users\jssan\appdata\local\temp\arduino_build_253070\sketch\src\hal\hal_avr\fastio_AVR.h:66:43: note: in definition of macro ‘_READ’

#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)

^

sketch\src\feature/runout.h:61:29: note: in expansion of macro ‘READ’

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

sketch\src\feature/runout.h:61:34: note: in expansion of macro ‘FIL_RUNOUT_PIN’

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

c:\users\jssan\appdata\local\temp\arduino_build_253070\sketch\configuration.h:956:28: error: pasting “/* Creality CR10-S stock sensor*/” and “_PIN” does not give a valid preprocessing token

#define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor

^

c:\users\jssan\appdata\local\temp\arduino_build_253070\sketch\src\hal\hal_avr\fastio_AVR.h:66:64: note: in definition of macro ‘_READ’

#define _READ(IO) TEST(DIO ## IO ## _RPORT, DIO ## IO ## _PIN)

^

sketch\src\feature/runout.h:61:29: note: in expansion of macro ‘READ’

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

sketch\src\feature/runout.h:61:34: note: in expansion of macro ‘FIL_RUNOUT_PIN’

const bool is_out = READ(FIL_RUNOUT_PIN) == FIL_RUNOUT_INVERTING;

^

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

Este reporte podría tener más información con
“Mostrar salida detallada durante la compilación”
opción habilitada en Archivo → Preferencias.

Actually, here's corrected instructions, disregard the previous ones:

  • In the Arduino IDE, click on the configuration.h tab.
  • Change line 956 from:
#define FIL_RUNOUT_PIN 2 // Creality CR10-S stock sensor

to:

// Creality CR10-S stock sensor
#define FIL_RUNOUT_PIN 2
  • Try compiling again.

Arduino:1.8.6 Hourly Build 2018/08/14 10:33 (Windows 10), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

libraries\U8glib\clib\u8g_polygon.c.o (symbol from plugin): In function `pg_ClearPolygonXY':

(.text+0x0): multiple definition of `pg_ClearPolygonXY'

libraries\U8g2\clib\u8g2_polygon.c.o (symbol from plugin):(.text+0x0): first defined here

c:/users/jssan/videos/arduino-nightly/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

libraries\U8glib\clib\u8g_polygon.c.o (symbol from plugin): In function `pg_ClearPolygonXY':

(.text+0x0): multiple definition of `pg_AddPolygonXY'

libraries\U8g2\clib\u8g2_polygon.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\U8glib\clib\u8g_polygon.c.o (symbol from plugin): In function `pg_ClearPolygonXY':

(.text+0x0): multiple definition of `pg_DrawPolygon'

libraries\U8g2\clib\u8g2_polygon.c.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

Arduino:1.8.6 Hourly Build 2018/08/14 10:25 (Linux), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
el puerto seleccionado avrdude: stk500v2_getsync(): timeout communicating with programmer
no existe o tu placa no esta conectada
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdFile.h:37,
from sketch/cardreader.h:34,
from sketch/endstops.cpp:28:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdFile.h:37,
from sketch/cardreader.h:34,
from sketch/runout.h:30,
from sketch/runout.cpp:31:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdFile.h:37,
from sketch/cardreader.h:34,
from sketch/stepper.cpp:87:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdFile.h:37,
from sketch/cardreader.h:34,
from sketch/ultralcd.cpp:30:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdVolume.cpp:33:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdFile.h:37,
from sketch/SdFile.cpp:33:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdFile.h:37,
from sketch/cardreader.h:34,
from sketch/cardreader.cpp:27:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/Sd2Card.cpp:33:0:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdBaseFile.cpp:34:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/SdVolume.h:38:0,
from sketch/SdBaseFile.h:38,
from sketch/SdFile.h:37,
from sketch/cardreader.h:34,
from sketch/Marlin_main.cpp:259:
sketch/Sd2Card.h:104:14: warning: ISO C++11 requires whitespace after the macro name
#define SPI-SCK_PIN SCK_PIN
^
In file included from sketch/MarlinConfig.h:27:0,
from sketch/Sd2Card.cpp:29:
sketch/Sd2Card.cpp: In member function 'bool Sd2Card::init(uint8_t, pin_t)':
fastio.h:87:29: error: 'DIOSPI_SCK_PIN_DDR' was not declared in this scope
#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
^
sketch/macros.h:71:19: note: in definition of macro 'SBI'
#define SBI(n,b) (n |= _BV(b))
^
sketch/fastio.h:99:31: note: in expansion of macro '_SET_OUTPUT'
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
^
sketch/Sd2Card.cpp:318:3: note: in expansion of macro 'SET_OUTPUT'
SET_OUTPUT(SPI_SCK_PIN);
^
In file included from /home/pepe/Descargas/arduino-nightly/hardware/tools/avr/avr/include/avr/io.h:99:0,
from sketch/fastio.h:34,
from sketch/HAL.h:33,
from sketch/MarlinConfig.h:39,
from sketch/Sd2Card.cpp:29:
fastio.h:87:48: error: 'DIOSPI_SCK_PIN_PIN' was not declared in this scope
#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
^
sketch/fastio.h:87:25: note: in expansion of macro 'SBI'
#define _SET_OUTPUT(IO) SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
^
sketch/fastio.h:99:31: note: in expansion of macro '_SET_OUTPUT'
#define SET_OUTPUT(IO) _SET_OUTPUT(IO)
^
sketch/Sd2Card.cpp:318:3: note: in expansion of macro 'SET_OUTPUT'
SET_OUTPUT(SPI_SCK_PIN);
^
exit status 1
'DIOSPI_SCK_PIN_DDR' was not declared in this scope

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

Arduino:1.8.6 Hourly Build 2018/08/14 10:33 (Windows 10), Tarjeta:"Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

libraries\U8glib\clib\u8g_polygon.c.o (symbol from plugin): In function `pg_ClearPolygonXY':

(.text+0x0): multiple definition of `pg_ClearPolygonXY'

libraries\U8g2\clib\u8g2_polygon.c.o (symbol from plugin):(.text+0x0): first defined here

c:/users/jssan/videos/arduino-nightly/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

libraries\U8glib\clib\u8g_polygon.c.o (symbol from plugin): In function `pg_ClearPolygonXY':

(.text+0x0): multiple definition of `pg_AddPolygonXY'

libraries\U8g2\clib\u8g2_polygon.c.o (symbol from plugin):(.text+0x0): first defined here

libraries\U8glib\clib\u8g_polygon.c.o (symbol from plugin): In function `pg_ClearPolygonXY':

(.text+0x0): multiple definition of `pg_DrawPolygon'

libraries\U8g2\clib\u8g2_polygon.c.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compilando para la tarjeta Arduino/Genuino Mega or Mega 2560.

Este reporte podría tener más información con
"Mostrar salida detallada durante la compilación"
opción habilitada en Archivo -> Preferencias.

Can not anyone help me please.

Sorry for the delay. I had some work deadlines and got behind on the forum threads. If you're still having troubles, please make a .zip file of your whole Marlin sketch and post it here as an attachment. I'll take a look and see if I can figure out what the problem is.