Go Down

Topic: collect2.exe: error: ld returned 5 exit status (Read 143637 times) previous topic - next topic

Oregu

I can not say for sure, because experiments ended late at night))
This file is obtained from the package Arduino Ide 1.5.x version, but a version of it is not remember, but not the first and not the latest version 1.5.

-dev

You can download this file from this webpage: http://oregu.ru.
Just in case anybody was thinking of downloading an EXE from an UNTRUSTED source...  DON'T DO THIS.

Do what piroxilin suggested: download and install Arduino IDE 1.0.5 (or others, like 1.5.x?) in a separate directory, then copy the 1.0.5 ld.exe file into the 1.6.x hardware\tools\avr\avr\bin directory.

For Windows, if the old install associates the old IDE with .INO files, do a right-click -> open with -> Choose Default Program... and navigate to the 1.6.x install directory to find the Arduino.EXE.

Stay safe!
/dev
Really, I used to be /dev.  :(

rishrsoni

Hello Eveyone,
I was facing the same problem with while compiling example code given alongwith the Utouch library of Henning Karlsen. I ran 1.6.3 Arduino with compatibility of Windows98/WindowsME and suprisingly it complied smoothly. Hope it eases the trouble faced by you all !

P.S : Running Windows XP SP2

pard

I tried what /dev suggested, and it worked!

I used the ld.exe file from v1.0.5

Thanks /dev, you have helped a first time user get past this frustrating error, and into "learning mode". Your help is greatly appreciated.

AdrianML

Hi,

I had the same problem using 1.6.5 on my Windows XP and decided to downgrade Arduino software to 1.6.0.

This solved the problem and I also noticed that the file size for 1.6.0  (93,5mb) was larger than 1.6.5 (77mb)

Not sure if this has anything to do with it.

Good Luck!!


choban

I am trying to load some new firmware on my Lulzbot 3D TAZ 4 printer. I have read the Lulzbot documentation and the documentation on this forum for doing the Arduino verify and compile for uploading this software, but I can't get pass the verify/compile of the code. The following is the error that I get:

C:\Program Files (x86)\Arduino\libraries\Marlin_2015Q1_TAZ5_0/ultralcd.cpp:738: multiple definition of `u8g_dev_st7920_128x64_rrd_buf'
ultralcd.cpp.o:C:\Users\user\AppData\Local\Temp\build7762107252506360423.tmp/ultralcd.cpp:738: first defined here
collect2.exe: error: ld returned 1 exit status
Error compiling.

I have downloaded the Lulzbot Ardunio firmware add-on-files that are needed
I have downloaded the TAZ 5 firmware for the hexagon hot end
I am running version 1.6.5 of IDE
This software run on many other Lulzbot 3D printers so I'm sure the firmware code is correct,
   I'm just not sure what I am doing wrong.
This software contains a lot of files and programs, I think I have everything in the right place, but
apparently something is not correct.

I can compile and upload arduino firmware for other cards with no problem.

I am hoping that someone on this forum can help me.

Gorilla2

Hello Eveyone,
I was facing the same problem with while compiling example code given alongwith the Utouch library of Henning Karlsen. I ran 1.6.3 Arduino with compatibility of Windows98/WindowsME and suprisingly it complied smoothly. Hope it eases the trouble faced by you all !

P.S : Running Windows XP SP2
It works! Thanks!

ron_ironics

Hey, just check your code from Design #1 - Design #12.

In Design #4, I found the random number generator caused a problem (Didn't use that code) and in Design #5, I found that removing the "const" let it compile.

Ir's not "right", but you have to compare working Designs w/non-working Designs.

fabelec95

For all of you that use Arduino 1.6.5 on Windows XP, I could suggest to change TMP and TEMP system variable definition (System Properties => Advanced => Environment Variables)

By default they are defined as %USERPROFILE%\Local Settings\Temp
You could create a Temp directory on C drive and set both variable to C:\Temp

As Linkers are generally sensitive on paths content, it is advised to set simpler and shorter paths.

On my side this change solve all "collect2.exe: error: ld returned 5 exit status" errors I have on all Arduino projects with 1.6.5 release.

Have a good works!

ldeant

So, what is the fix? Is Windows XP limited to older versions of the Arduino IDE? Or is there going to be a fix sometime soon?

ldeant

Okay, I tried  a few of the fixes from this forum: changing the TEMP location, adding more variables, running in compatibility mode for Win98/ME.

I even tried installing the latest version, 16.5.

None of them worked, so I then uninstalled the IDE, found 16.0 in the older versions and it seems to work.

It looks like version 16.1 and newer are not 100% compatible with Windows XP.

I hope this helps others fix this problem.

miked2001

I have been having this same issue with a random number generator (random.seed) and anything involving Stepper.h. This error occurs on several different computers that I have tried.

They have one ting in common, Windows XP. I tried the same program on Windows 7 and Windows 8 and they compile with no issues.

I know your thoughts, "I am using this PC because it is old and perfect for this". I have searched around and found several others ways of solving these issues. Usually the solutions are more verbose but they have worked for me.

Best of luck.

Still a noob,
Mike D.

mark81815

Arduino  IDE 1.6.6
OS : winxp sp3
error message:
collect2.exe: error: ld returned 5 exit status

exit status 1


Code: [Select]
[sub]#include <Wire.h>
[/sub]
void setup() {
 Serial.begin(9600);
}
void loop() {
 Serial.println(analogRead(A0));
}





avandalen

I have this issue too (version 1.6.6)

Using an older ld.exe does help: (from versions 1.0.5)
arduino-1.0.5-r2\hardware\tools\avr\avr\bin\ld.exe

I can sent the zip file of the scetch.

73-de-LZ

#44
Nov 27, 2015, 11:48 pm Last Edit: Nov 28, 2015, 04:42 pm by 73-de-LZ
1. Make short name directory without spaces in C:, for example C:/TEMP,
2. From the Arduino IDE 1.6.6 open "File"=>"Prefernces" and hit the link to the file "preferences.txt", close the IDE as it is written "(edit only when Arduino is not running)", so exit from all opened scetches and close Arduino IDE.
3. Open the file preferences.txt and add at the first row this line :
build.path=C:\TEMP
4. Save it and start Arduino again.
5. If nasty error comes again add in your sketch 1, 2, 3 or more unused global variables.
Good luck!

Go Up