MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.18k stars 19.22k forks source link

Can't compile any more #1083

Closed f0086 closed 9 years ago

f0086 commented 10 years ago

I am using the HEAD version of the code and arduino 1.0.5. Is marlin not compatible with my arduino version?

In file included from SdFile.h:27:0,
                 from cardreader.h:8,
                 from ultralcd.cpp:6:
SdBaseFile.h:38:8: error: using typedef-name 'fpos_t' after 'struct'
 struct fpos_t {
        ^
In file included from Marlin.h:10:0,
                 from temperature.h:24,
                 from ultralcd.cpp:1:
/usr/avr/include/stdio.h:947:19: note: 'fpos_t' has a previous declaration here
 typedef long long fpos_t;
                   ^
festlv commented 9 years ago

I have the same problem. I believe the problem is caused by a new release of avr-libc, where a type with the same name as the one used in sdfat library is introduced.

In upstream SdFat this struct has been renamed to FatPos_t: https://github.com/greiman/SdFat/blob/master/SdFat/SdBaseFile.h#L60 Either do a search&replace in SdBaseFile.{h, cpp} and replace fpos_t with FatPos_t or sed it:

sed -i 's/fpos_t/FatPos_t/' SdBaseFile.h

sed -i 's/fpos_t/FatPos_t/' SdBaseFile.cpp
f0086 commented 9 years ago

Great! Works perfect, thanks! Will this change be fixed upstream?

festlv commented 9 years ago

Another note- this only affects builds with SDSUPPORT on. If you don't need SD support, you can compile without SD support on systems with latest avr-libc.

boelle commented 9 years ago

please open a new issue if this is still present in the current bug fixing branch

https://github.com/ErikZalm/Marlin/tree/Marlin-v1-bug-fixing

BoRKeLSNoRKeL commented 7 years ago

i''m new, thats a tool i can use more often .. find and replace a text . worked for me on the marlin code thanx

github-actions[bot] commented 2 years ago

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.