Bug in ethernet library

Hi,

I recently bought an arduino ethernet shield v2 with micro sd-card slot. I found out, that if I use Fedora to compile and transmit the code to the arduino I just recieve false data. But with windows everthing works fine. Here I described the problem: Arduino Forum
What could be the reason for this behaviour?

Reargds
Chris

Temporary solution: It seems avr-gcc version 4.5.3 is not working with the ethernet library. Downgrading to avr-gcc-4.3.3-3.fc12.src and avr-binutils-2.18-5.fc12.i686 solved the problem for me. The arduino IDE 0022 still works.

Can you capture the hex file of both environments and compare the length and/or content?

( with avr-objdump a dissassemble is possible, google for the syntax )

This won't solve the problem, but it might shine some light on the cause.

Did you encounter this problem with all ethernet samples?
Did you encounter this problem with non ethernet code?

Hi,

none of the ethernet examples worked von Fedora, other non-ethernet code worked just fine.
I compared the binary output and they are different. Fedoras output is ~300 byte bigger. I also compared the libraries on the Windows and Fedora machine, those are the same.
I attached the zipped build folders and the verbose log output and of course the sketch. Maybe someone with a bit more knowledge than me can figure this out.

Regards
Chris

UPDATE I: I also attached the two disassembled sketch_ethTest.cpp.elf files.

UPDATE II: I found out that Windows uses avr-gcc version 4.3.2 and Fedora avr-gcc version 4.5.3 . After downgrading Fedora to avr-gcc-4.3.3-3.fc12.src and avr-binutils-2.18-5.fc12.i686 the sketch is working. It is still not the same size but it works. For future versions of arduino IDE it may be a good thing to know that newer versions of avr-gcc have problems with the ethernet library.

ETH BUG.zip (962 KB)

sketch_ethTest.pde (1.57 KB)

FEDORA_disassemble.txt (106 KB)

WINDOWS_disassemble.txt (101 KB)

I attached the working build directory and disassembled .elf (Had to make a new post because only 4 attachments are allowed.)

FEDORA_4.3.3_WORKIN_disassemble.txt (101 KB)

FEDORA_4.3.3_WORKING_build3814744923564484616.tmp.zip (171 KB)