LinuxQuestions.org
Visit Jeremy's Blog.
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
 
Search this Thread
Old 02-14-2005, 03:42 PM   #1
afertis
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Rep: Reputation: 0
Question gcc on Fedora 2


Hello.

I have installed Fedora Core 2 and I am trying to run configure for many programs but I get the error "checking whether the C compiler (gcc ) works ... no".

So, I tried to check gcc command.

I made a file test.c

int main(void) {
return 1;
}

When I run gcc -v test.c, I get the error:
"/usr/bin/ld/: crt1.o: No such file, no such file or directory
collect2: ld returned 1 exit status"

Why do I have this problem?

Apostolos
 
Old 02-14-2005, 03:47 PM   #2
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
Re: gcc on Fedora 2

Quote:
Originally posted by afertis



Why do I have this problem?


hehe... because of rpm (j/k ) ??? look for a gcc-libs (shouldn't be in there, but with rpm based distro's you never know) also check what packages you have installed related to glibc - crt1.o comes with glibc.

EDIT: Apparently glibc is split on fedora - look for glibc-devel-2.x.x or glibc-2.x.x-devel

Last edited by __J; 02-14-2005 at 05:03 PM.
 
Old 02-14-2005, 05:03 PM   #3
afertis
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
I have glibc-2.3.3-27.1. I do not have gcc-libs. What should I do to make it work?

Apostolos
 
Old 02-14-2005, 05:18 PM   #4
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
look for glibc-2.x.x-devel or glibc-devel-2.x.x, it should come with one of those.
 
Old 02-15-2005, 12:31 PM   #5
afertis
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
I looked for those packages but they are not installed and I cannot find them in the list of the Fedora Core 2 packages. Do you have any other idea?

Thanks.
 
Old 02-15-2005, 04:46 PM   #6
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
check on your install cd's. It's gotta be around somewhere ( it's kinda ridiculous that the package is even split at all).

EDIT: according to google, it's on disc 3 called glibc-devel-2.3.3-74.i386.rpm

Last edited by __J; 02-15-2005 at 04:48 PM.
 
Old 02-16-2005, 12:52 AM   #7
afertis
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Thank you very much. It worked.

The gcc compiler works.

Now, I get the message "C++ compiler cannot create executables" when I run ./configure. Do you have any idea of what this could be?

A.
 
Old 02-16-2005, 05:33 AM   #8
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
post the config.log. There could be multiple reasons for this but check and make sure you have g++-libs ( I think fedora splits the c++ std libraries into a seperate package).
 
Old 02-16-2005, 12:29 PM   #9
afertis
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Here is the config.log


This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:764: checking whether make sets ${MAKE}
configure:793: checking for gcc
configure:909: checking whether the C compiler (gcc ) works
configure:925: gcc -o conftest conftest.c 1>&5
configure:951: checking whether the C compiler (gcc ) is a cross-compiler
configure:956: checking whether we are using GNU C
configure:965: gcc -E conftest.c
configure:984: checking whether gcc accepts -g
configure:1020: checking for c++
configure:1053: checking whether the C++ compiler (c++ ) works
configure:1069: c++ -o conftest conftest.C 1>&5
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
configure: failed program was:

#line 1064 "configure"
#include "confdefs.h"

int main(){return(0);}
 
Old 02-16-2005, 12:48 PM   #10
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
check for it in its own separate packate ( something like libstdc++-xxxx and libstdc++-xxxxx-devel).
 
Old 02-16-2005, 03:01 PM   #11
afertis
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
I installed those packages and I still get the same message. The config.log is still the same.

A.
 
Old 02-16-2005, 03:19 PM   #12
afertis
LQ Newbie
 
Registered: Nov 2003
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks. I installed some other c++ - related rpms and it worked.'

A.
 
Old 02-16-2005, 04:24 PM   #13
__J
Senior Member
 
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
no problem
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 4 bad gcc? sausagejohnson Fedora 7 07-05-2005 10:12 AM
Fedora GCC/G++ Problem Verbal Kint Linux - Software 2 05-20-2005 09:37 AM
GCC For Fedora Core 3 TwiztedTom Linux - Software 2 05-09-2005 06:38 AM
Compiling C with GCC in Fedora Markness Linux - Newbie 3 04-28-2005 10:01 PM
gcc problem, fedora c1 Yell0w_c0w Programming 7 03-12-2004 05:43 PM


All times are GMT -5. The time now is 04:32 AM.

Main Menu
Advertisement
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 Google+: linuxquestions
Open Source Consulting | Domain Registration