LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 04-29-2006, 08:29 AM   #1
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 102

Rep: Reputation: 15
can't compile anything: some file not found by ld.


ok, so I've got my "hello world" program, written with nano, copied from a book.

I try to compile it by typing this:
gcc hello.c
and I get the message as follows:
/usr/lib/gcc-lib/i486-slackware-linux/3.3.6/../../../../i486+slackware-linux
/bin/ld:crt1.o: No such file: No such file or directory.
collect2: ld returned 1 exit status.

It's not my hello world program which is making the mistake, because other people sourcecodes make similar ouputs.

Through doing a bit of reading I found that ld is something that attaches files to my program. Anyway, I'd have thought that these files would have been included with the distro or with ld or with the compiler?

How do I remedy this?
 
Old 04-29-2006, 08:38 AM   #2
kostian
Member
 
Registered: Jul 2004
Location: LT
Posts: 150

Rep: Reputation: 15
Quote:
Originally Posted by wilsonsamm
/bin/ld:crt1.o: No such file: No such file or directory.
crt1.o is part of glibc package and should be located in /usr/lib/
Does this file exist on your system?
 
Old 04-29-2006, 09:21 AM   #3
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 102

Original Poster
Rep: Reputation: 15
hmm, I just looked, and there's a whole load of ".o" files missing from the directory.

where do I get these files? p2p?
 
Old 04-29-2006, 02:05 PM   #4
kostian
Member
 
Registered: Jul 2004
Location: LT
Posts: 150

Rep: Reputation: 15
I guess you don't have glibc package installed, use your slackware cd1 or obtaint the package from a mirror
 
Old 04-29-2006, 02:54 PM   #5
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 102

Original Poster
Rep: Reputation: 15
Well, I copied the archive into /usr/lib/, tarred it out (it put all the files at the right paths itself, no?)

and yet the problem occurs
Could I be using the wrong version of glibc? or is there something else I'm doing wrong?
 
Old 05-28-2006, 08:04 PM   #6
scorbett
Member
 
Registered: May 2002
Location: Canada
Distribution: Slackware, Mandriva, RedHat
Posts: 46

Rep: Reputation: 15
Quote:
Originally Posted by wilsonsamm
Well, I copied the archive into /usr/lib/, tarred it out (it put all the files at the right paths itself, no?)
If you got the tar.gz file from your slackware install cd, you should use pkgtool or installpkg instead of manually unpacking it.
 
Old 05-30-2006, 06:58 AM   #7
wilsonsamm
Member
 
Registered: Aug 2005
Location: Sheffield, UK
Distribution: Gentoo
Posts: 102

Original Poster
Rep: Reputation: 15
Sorted. Thanks!
 
  


Reply

Tags
compilation


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/bin/sh: cmp: command not found - when compile 2.6.15 again . -=Graz=- Slackware 7 05-05-2006 08:39 PM
X not found when trying to compile in X ADINSX Linux - Software 3 03-28-2005 11:33 AM
No module raid0 found during kernel compile mcalizo Linux - Software 2 12-08-2004 12:09 AM
Compile error--Qt3 not found David the H. Linux - General 4 09-29-2004 01:59 PM
Kernel Compile: Image Cannot Be Found katana Linux - General 1 11-20-2002 01:45 AM


All times are GMT -5. The time now is 12:07 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration