This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: gcc error: /usr/bin/ld: cannot open crt1.o: No such file or directory


Navtej Buttar wrote: 

> the problem i am facing is when ever i want to compile a program I
> get an error message
>
> #gcc a.c
> /usr/bin/ld: cannot open crt1.o: No such file or directory
> collect2: ld returned 1 exit status
> 
> i am unable to degbug it.

You debug this by adding '-v' to the gcc command line. This will show you
the commands that the GCC front-end is passing to ld, including the path
where it expects to find crt1.o.

Chances are that crt1.o is in another RPM that you haven't installed. But
I've never tried to administer a Red Hat machine - I always install the dev
stuff at the start - and I don't have one handy to look at. See if there's a
glibc-dev RPM or similar and try installing that. On the other hand I'd have
expected that'd be a prerequisite for the GCC RPM.

Good luck,
Rup.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]