Go Down

Topic: many cases of ld.exe crashes. (on windows xp). (Read 27122 times) previous topic - next topic

ardukey

Hi to all,
I've reistalled an old Xp PS3 version.
I understand that xp is not supported any more in many ways, but I always worked with arduino without problems.

Not I encounter many ld.exe crash reports.

I installed arduino 1.6.3
I'm asking to myself if xp is not enough updated to work fine with arduino..

there's some way to understand why I receive these crash, symply adding a line or a variable on a scratch?

(one example: I defined an "int a" in a "if cicle" and it worked, but declaring "int a;" on the top of the scratch, instead of doing that in the "if cicle", it gave a crash)

Please help me,
I'm frustrated..
I don't know what's wrong with my xp.. (arduino version? framenet version? java? .. xp not more supported?)

federicofissore

please turn verbose compilation on and share the whole output

ardukey

Sorry for make you waiting,
the error log is:

Code: [Select]
Arduino: 1.6.3 (Windows XP), Board: "Arduino Uno"

C:\Program Files\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10603 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files\Arduino\hardware\arduino\avr\variants\standard C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\A1.cpp -o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\A1.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\hooks.c.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\WInterrupts.c.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\wiring.c.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\wiring_analog.c.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\wiring_digital.c.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\wiring_pulse.c.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\wiring_shift.c.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\abi.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\CDC.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\HardwareSerial.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\HardwareSerial0.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\HardwareSerial1.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\HardwareSerial2.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\HardwareSerial3.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\HID.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\IPAddress.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\main.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\new.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\Print.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\Stream.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\Tone.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\USBCore.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\WMath.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\WString.cpp.o

Using previously compiled file: C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\core.a

C:\Program Files\Arduino\hardware\tools\avr/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp/A1.cpp.elf C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp\A1.cpp.o C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp/core.a -LC:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\build1553794396625798415.tmp -lm

collect2.exe: error: ld returned 5 exit status

Error compiling.


During compiling the ld.exe crashes:
ld.exe has encountered a problem and needs to close.  We are sorry for the inconvenience.
(classic xp windows for crashes).

Tank you..
I still receive many crashes, but I can't understand why..

oldmaker

I pointed out the same problem in the thread "Re: IDE 1.6.1 is now available for download".
Only one sketch of mine, compiling fine with IDE 1.0.x, cannot compile with IDE 1.6.1 (always on Windows XP), interrupting with message "collect2.exe: error: ld returned 5 exit status".

The same sketch, with the same IDE, on another PC with Windows 8.1, compiles fine.

As suggested by Federico, I tried with next versions of IDE, 1.6.2 and 1.6.3, but "the song remains the same"  ;)
I also tried disabling every possible software, without success.

The verbose output of IDE 1.6.3 is in the attachment, because it's too long and the forum sw disallows me inserting it in the post.

federicofissore

oldmaker, this is the output of which IDE?

oldmaker

#5
Apr 13, 2015, 02:46 pm Last Edit: Apr 13, 2015, 02:46 pm by oldmaker
Federico, it's the verbose output of IDE 1.6.3, on Windows XP.

Protonerd

I pointed out the same problem in the thread "Re: IDE 1.6.1 is now available for download".
Only one sketch of mine, compiling fine with IDE 1.0.x, cannot compile with IDE 1.6.1 (always on Windows XP), interrupting with message "collect2.exe: error: ld returned 5 exit status".

The same sketch, with the same IDE, on another PC with Windows 8.1, compiles fine.

As suggested by Federico, I tried with next versions of IDE, 1.6.2 and 1.6.3, but "the song remains the same"  ;)
I also tried disabling every possible software, without success.

The verbose output of IDE 1.6.3 is in the attachment, because it's too long and the forum sw disallows me inserting it in the post.

I have the same issue with my machine running with XP, I already started another thread. johnwasser was kind to help me compile it his machine without problem which gave me an idea.
I copied the same sketch on my WIN7 machine, and there everything is OK.

So now I have the following:
1. machine running WIN XP and IDE 1.6.3 -> collect2.exe: error: ld returned 5 exit status
2. machine running WIN7 and IDE 1.6.0 -> no problem

I guess if the IDE 1.6.3 had an issue, word would be out by now. So that leaves WIN XP as the root cause. But what exactly?

ardukey

Is not a problem only for IDE 1.6.3.
I upgraded my IDE for the same reason (crash ld.exe and the other erors).
hope someone che help us.

(I'm afraid about obsolescence of XP..)

oldmaker

I found another sketch of mine causing the same error, but today I discovered a ridiculous work-around: adding some totally useless global variables, the two sketches compiles OK also with IDE 1.6.x on Win XP:
Code: [Select]
int y = 0;
int z = 0;
int w = 0;


The first sketch needs at least 3 additional global variables, the second at least 6.
It doesn't matter the name, the type or the values; the only requirement seems to be the number of variables added.

However I opened the issue #2989 on GitHub.

Datman

Hi
I have XP sp3 on two computers: a HP desktop and a Dell laptop.

I previously installed v1.6.1 on the desktop: no problems; 1.6.4: non problems.

Yesterday I updated the v1.0.5 (6?) (no problem) on the laptop to 1.6.4 (pasted from the zip):
collect2.exe: error: ld returned 5 exit status.
I've also tried a complete installation of the v1.6.3: the same error.

I have simply pasted v1.6.4 from the zip file without installing: on the desktop is OK, but on the laptop NOT.

Compiling some very simple sketches, it works.
Hi,I'm Gianluca from Roma.I play&work with electronics since I was16(1984).
After 25yrs of maintenance on cameras&video mixers,since 2013myJob is HDTVstudios design.
Since Jan2015 IPlayWith Arduino:bit.ly/2F3LPWP
Thanks 4 a Karma if U like my answer

Datman

Now I've tried adding variables: they have to be at least 6:

int aa;
int bb;
int cc;
int dd;
int ee;
int ff;

...but after these there are already many other similar declarations, but they don't work!... >:(
Hi,I'm Gianluca from Roma.I play&work with electronics since I was16(1984).
After 25yrs of maintenance on cameras&video mixers,since 2013myJob is HDTVstudios design.
Since Jan2015 IPlayWith Arduino:bit.ly/2F3LPWP
Thanks 4 a Karma if U like my answer

oldmaker

I found a third sketch of mine, that was ok with IDE 1.0.6, causing ld.exe crash with IDE 1.6.3.
This sketch needs at least 12  :o  additional global variables, obviously all useless.
But this illogical workaround ever works.
Pay attention to avoid variable name duplication !

oldmaker

#12
Apr 23, 2015, 07:45 pm Last Edit: Apr 23, 2015, 07:49 pm by oldmaker
User f41_ardu discovered another workaround for this issue: replace original file ld.exe with the file of the same name copied from the previous IDE 1.0.6.
For details see this thread: 1.6.3 ld returmed 5 exit status error with a struct in a class?

kocickamia

Confirm problem. In IDE 1.6.0 seems all OK, but in newer IDE (1.6.1, 1.6.3, which i tested) compile failed with "collect2.exe: error: ld returned 5 exit status" error. WinXP SP3.

Protonerd

Thanks guys for following up on this issue, I will give the fix of f41_ardu a try, that one looks very promising!

Go Up