Results 1 to 9 of 9
Hey.
I have a problem with compiling anything, ie "int main(void) { return 0; }" will give
Code:
$ gcc -o test test.c
collect2: cannot find 'ld'
ld is there ...
- 07-16-2008 #1Just Joined!
- Join Date
- Jul 2008
- Location
- Ipswich, UK
- Posts
- 5
[SOLVED] Collect2: cannot find ld
Hey.
I have a problem with compiling anything, ie "int main(void) { return 0; }" will give
ld is there and working (as far as i can tell)Code:$ gcc -o test test.c collect2: cannot find 'ld'
Im running a fresh install of Ubuntu 8.04.1 on a Acer Travelmate TE351 laptop and I cant compile anythingCode:$ whereis ld ld: /usr/bin/ld /usr/share/man/man1/ld.1.gz $ ld ld: no input files

Help?Last edited by sam159; 07-17-2008 at 12:43 AM. Reason: Solved problem
- 07-16-2008 #2
Hmmmm...... Have you installed build-essentials?
It looks like you have, since you have gcc and ld, but maybe there's something else missing.Code:sudo apt-get install build-essentials
*scratches head*Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 07-16-2008 #3Just Joined!
- Join Date
- Jul 2008
- Location
- Ipswich, UK
- Posts
- 5
build-essentials is installed...
- 07-16-2008 #4
From this link
Could that be it?There's a bug in some versions of gcc that if "." is in your path, collect2
will ignore $PATH when looking for ld because the FSF thinks it knows better
than you do in that case.Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 07-16-2008 #5Just Joined!
- Join Date
- Jul 2008
- Location
- Ipswich, UK
- Posts
- 5
so *should* be fine...Code:$ echo $PATH /home/sam/bin:/home/sam/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- 07-17-2008 #6Just Joined!
- Join Date
- Jul 2008
- Location
- Ipswich, UK
- Posts
- 5
Ok, its working now, turns out that the dropbear ssh server was the trouble, so im now running openssh-server and collect2 works fine.
How strange....Last edited by sam159; 07-17-2008 at 12:38 AM. Reason: typo
- 07-17-2008 #7
So you've logged on to your server and are trying to compile stuff, but it doesn't work when the server is running dropbear?
Or you're trying to compile this while sitting (locally) at the ssh server?Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode
- 07-17-2008 #8Just Joined!
- Join Date
- Jul 2008
- Location
- Ipswich, UK
- Posts
- 5
I was using it over ssh, went to use it directly and compiling worked.
didn't work when connected through dropbear.Last edited by sam159; 07-17-2008 at 01:05 AM. Reason: Clarified
- 07-17-2008 #9
Weird. Dropbear musn't be passing some critical information that openssh does.
Glad you got it sorted
Registered Linux user #388328 || Registered LFS user #15880
AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
Need instant help? Try us on IRC -- #linuxforums on freenode


Reply With Quote