LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-26-2012, 10:40 AM   #1
ed01us
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Rep: Reputation: Disabled
C compiler not working


Tried to run minicom onred hat enterprise 5.2, but this failed because gcc was not installed. Installed gcc, but now when I do ./configure, i get the following error:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/admin/minicom-2.6.1':
configure: error: C compiler cannot create executables
See `config.log' for more details

Can someone help me figure out what is going on here?
 
Old 03-26-2012, 10:46 AM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Create a simple c program and try to compile it. See what kind of error it gives you.

hello.c
Code:
#include <stdio.h>

main()
{
   printf("Hello World\n");
}
compile with: gcc hello.c
 
Old 03-26-2012, 10:47 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,073

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
so...

Code:
See `config.log' for more details
It might throw some light into the issue. This can happen for many reasons, from an unconfigured environment to the wrong CFLAGS.
 
Old 03-26-2012, 10:50 AM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,508

Rep: Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102
How did you install gcc?
 
Old 03-26-2012, 10:54 AM   #5
ed01us
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
configlog

Here's a partial output of the config log:


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

It was created by minicom configure 2.6.1, which was
generated by GNU Autoconf 2.68. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = new-host
uname -m = i686
uname -r = 2.6.18-238.el5
uname -s = Linux
uname -v = #1 SMP Sun Dec 19 14:24:47 EST 2010

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/kerberos/sbin
PATH: /usr/kerberos/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/X11R6/bin
PATH: /home/admin/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2312: checking for a BSD-compatible install
configure:2380: result: /usr/bin/install -c
configure:2391: checking whether build environment is sane
configure:2441: result: yes
configure:2582: checking for a thread-safe mkdir -p
configure:2621: result: /bin/mkdir -p
configure:2634: checking for gawk
configure:2650: found /usr/bin/gawk
configure:2661: result: gawk
configure:2672: checking whether make sets $(MAKE)
configure:2694: result: yes
configure:2823: checking for gcc
configure:2839: found /usr/bin/gcc
configure:2850: result: gcc
configure:3079: checking for C compiler version
configure:3088: gcc --version >&5
2.7.2.3
configure:3099: $? = 0
configure:3088: gcc -v >&5
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/specs
gcc version 2.7.2.3
configure:3099: $? = 0
configure:3088: gcc -V >&5
gcc: argument to `-V' is missing
configure:3099: $? = 1
configure:3088: gcc -qversion >&5
gcc: unrecognized option `-qversion'
gcc: No input files
configure:3099: $? = 1
configure:3119: checking whether the C compiler works
configure:3141: gcc conftest.c >&5
ld: crt1.o: No such file: No such file or directory
configure:3145: $? = 1
configure:3183: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "minicom"
| #define PACKAGE_TARNAME "minicom"
| #define PACKAGE_VERSION "2.6.1"
| #define PACKAGE_STRING "minicom 2.6.1"
| #define PACKAGE_BUGREPORT "minicom-devel@lists.alioth.debian.org"
| #define PACKAGE_URL ""
| #define PACKAGE "minicom"
| #define VERSION "2.6.1"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3188: error: in `/home/admin/minicom-2.6.1':
configure:3190: error: C compiler cannot create executables
 
Old 03-26-2012, 10:56 AM   #6
ed01us
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
gcc installed from the following link through firefox:

http://rpmfind.net/linux/rpm2html/se...rise+5.2&arch=
 
Old 03-26-2012, 11:06 AM   #7
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
looks like the linker can't find a required library:

ld: crt1.o: No such file: No such file or directory

That file should be in /usr/lib. Try to re-install the compiler or find another package.

I haven't used minicom in over 15 years, brings back memories.
 
Old 03-26-2012, 11:12 AM   #8
ed01us
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Do you know any good package that I can use?
 
Old 03-26-2012, 11:18 AM   #9
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Any reason you are building from source? I see a minicom for Redhat 4 i386
 
Old 03-26-2012, 11:21 AM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,508

Rep: Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102
Quote:
Originally Posted by ed01us View Post
gcc installed from the following link through firefox:

http://rpmfind.net/linux/rpm2html/se...rise+5.2&arch=
It's VERY rare that you need to install directly from the RPM, especially for something as core as gcc. Chances are you installed gcc, but none of the libraries that it needs, which is why it doesn't work. Use YUM for this kind of thing.

I would start by removing the RPM you installed by hand, and issue a "yum install gcc" or similar. YUM probably has minicom as well:
Code:
yum list | grep -i minicom

Any time you want a program in any of the Redhat-based distros (RHEL, CentOS, Fedora), start by doing a "yum list | grep" to find if it's in yum. If it isn't, find the source. When you go to configure/compile the source, if you encounter any missing libraries or programs, again use yum to find and install them. 99% of the time you can use "yum provides" to find your missing library/binary.

Last edited by suicidaleggroll; 03-26-2012 at 11:27 AM.
 
Old 03-26-2012, 11:24 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,684

Rep: Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286Reputation: 3286
Quote:
Installed gcc
The default "Redhat EL 5.x" compiler is version 4.1.2.
( gcc version 2.7.2.3 is usually totally unusable for an OS from this century.)

Required packages, for gcc to be usable :
gcc, gcc-c++, glibc-devel-2.5-24, glibc-headers-2.5-24, kernel-headers-2.6.18-92
The shown versions are the old RHEL 5.2 versions.
Can be installed from your install DVD.
If you can use yum, glibc will be updated to version 2.5-81.el5_8.1.

.
 
Old 03-26-2012, 12:17 PM   #12
ed01us
LQ Newbie
 
Registered: Mar 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks! I will try that.
 
  


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
trying to get cc compiler working(perl 5.10.1) cybersilly Linux - Newbie 3 10-30-2009 09:39 AM
GCC compiler not working vijaya_svk Linux - Newbie 6 11-19-2007 05:24 AM
GCC compiler not working vijaya_svk Programming 3 11-19-2007 04:59 AM
c compiler not working jcai Linux - General 6 11-05-2004 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:25 PM.

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