Welcome! Log In Create A New Profile

Advanced

Cannot compile marlin on Windows 10 - File name too long? SOLVED

Posted by Veesta 
Cannot compile marlin on Windows 10 - File name too long? SOLVED
July 21, 2016 07:17AM
Hi there,

I'm having problems compiling on Windows 10. Something about file name being too long. This Marlin is RC6.

BUT, the exactly same set of files compiles and uploads without any problems when using Ubuntu 14.04.

Both OS has the same, latest version of Arduino IDE.

The error message says:
Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

fork/exec C:\ArduinoIDE\hardware\tools\avr/bin/avr-gcc.exe: The filename or extension is too long.
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
(Verbose output throws too much data for this forum to handdle, but eventually it fails with the same message)

Using Ubuntu to compile and upload is a PITA because i need to move my printer away from the nice and friendly flat surface, where i have done all the calibrations and printer sits comfortably.
I'd really like to use my laptop with Windows 10 to do this.

Who? What? Where?
Any ideas why Arduino IDE hates Windows 10?

Edited 2 time(s). Last edit at 07/22/2016 05:10AM by Veesta.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 11:05AM
I'm building Marlin on Windows-10. Do you have your Marlin folder buried down 37 levels? You might want to try moving it closer to the root of the file system and see if that helps.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 11:30AM
No, it is in the Desktop - C:/Users/Isäntä/Desktop/Marlin-RC/Marlin/Marlin.ino

Moving it to C:/marlin -> see what happens
(C:/marlin/Marlin/Marlin.ino)

Result is the same exact error message as above. sad smiley

Edited 1 time(s). Last edit at 07/21/2016 11:36AM by Veesta.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 01:57PM
I would try again with a fresh copy of Marlin from [github.com] and try compiling it before you make any changes.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 02:31PM
Thank you!
Fresh unaltered version of Marlin compiles.

Configuration.h fails.

When i copy "Configuration.h" from my version and overwrite the fresh. It fails as above.
Both of the files are encoded as UTF-8 (Reported by Notepad++)

So, what problem do i have with Configuration.h ??

EDIT: file removed

Edited 1 time(s). Last edit at 07/22/2016 05:10AM by Veesta.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 03:50PM
Make sure the configuration.h files are from the same Marlin version. They've changed it over the last several RC releases.

You really should only copy the settings inside the configuration.h, not copy the file itself.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 04:13PM
These are both from the same version.

1.1.0-RC6

Only thing changed is the Configuration.h parameters.
Everything else is exactly the same.

Can you compile a fresh 1.1.0-RC6 with that Configuration.h using Windows 10 and Arduino IDE 1.6.9 ??
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 05:16PM
Update:

Line:
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
Seems to be the shit here.

If i comment it out, it will compile.
Something to do with u8glib? (Yes, i have that installed and updated)

That kinda sucks as i have the 12864 display. tongue sticking out smiley

Edited 1 time(s). Last edit at 07/21/2016 05:23PM by Veesta.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 21, 2016 11:03PM
Made a new copy of Marlin, replaced the configuration.h file with yours and it compiles with no errors with Arduino 1.6.8. I haven't upgraded to 1.6.9 yet. Running Win10x64 with UAC totally off.

I use Documents/Arduino/printername/MarlinRC6/ with the github files in it. The printername is the name of the 3d printer, since I have more than one.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 22, 2016 05:01AM
Ok, disabled UAC from registry -> reboot -> compile -> fail as above. sad smiley

I found out what the problem is. It is indeed the U8glib.
Went to library manager and downgraded U8glib to 1.18.0 -> Compile works!


Sketch uses 107,004 bytes (42%) of program storage space. Maximum is 253,952 bytes.
Global variables use 5,056 bytes (61%) of dynamic memory, leaving 3,136 bytes for local variables. Maximum is 8,192 bytes.

Thanks everyone!
Re: Cannot compile marlin on Windows 10 - File name too long?
July 22, 2016 02:08PM
Interesting, I have U8glib 1.19.1 installed at the Ubuntu computer and it works.

In Windows 10, i must have 1.18.0 to work.
Re: Cannot compile marlin on Windows 10 - File name too long?
July 22, 2016 02:25PM
Odd, I'm compiling Marlin 1.1.0-RC6BugFix with U8glib 1.19.0 under Windows 10 64 bit. No problems here.
.
Re: Cannot compile marlin on Windows 10 - File name too long? SOLVED
July 28, 2016 03:03PM
Same problem here, also on Windows 10. I was having no problems compiling u8glib v1.19.1 while it was referenced globally through Sketch>Import Library. However, I tried to move it into my marlin folder and after updating the includes I'm left with the following error message:

fork/exec C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc.exe: The filename or extension is too long.
Error compiling for board Arduino/Genuino Mega or Mega 2560.

This might be why most of you aren't having an issue while Veesta is. I've tried compiling version 1.17, 1.18, and 1.18.1 with no change. I think what may have happened for Veesta is when he downgraded to 1.18.0 with arduino's library manager, it downloaded to his Documents>Arduino>libraries directory and was globally referenced (and worked where the local inclusion didn't). I submitted an issue on the github here: [github.com] so we'll see what happens. I'm just going to go back to global referencing for now.
Re: Cannot compile marlin on Windows 10 - File name too long? SOLVED
October 24, 2016 12:13AM
'Long Path can resolve error messages like: path too long, cannot delete file, too long path, destination path is too long, etc.
Sorry, only registered users may post in this forum.

Click here to login