LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-27-2011, 04:10 PM   #1
cenazoic
LQ Newbie
 
Registered: Jan 2009
Location: Minneapolis
Distribution: Arch, Slackware
Posts: 7

Rep: Reputation: 3
GCC not found


Hi all,

I recently installed the 64-bit 13.37 image on Linode.

I also manually downloaded and installed the /d/ group (including gcc) using installpkg.

When attempting to compile Apache, I get this error:


Quote:
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... yes
setting CC to "gcc"
setting CPP to "gcc -E"
setting CFLAGS to " -pthread"
setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... yes
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/usr/src/httpd-2.2.21':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Fine.

Config.log says:
Quote:
configure:4698: checking for C compiler version
configure:4707: gcc --version >&5
./configure: line 4709: /usr/bin/gcc: No such file or directory
configure:4718: $? = 127
configure:4707: gcc -v >&5
./configure: line 4709: /usr/bin/gcc: No such file or directory
configure:4718: $? = 127
configure:4707: gcc -V >&5
./configure: line 4709: /usr/bin/gcc: No such file or directory
configure:4718: $? = 127
configure:4707: gcc -qversion >&5
./configure: line 4709: /usr/bin/gcc: No such file or directory
configure:4718: $? = 127
configure:4740: checking for C compiler default output file name
configure:4762: gcc -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE conftest.c >&5
./configure: line 4764: /usr/bin/gcc: No such file or directory
configure:4766: $? = 127
configure:4803: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
| return ferror (f) || fclose (f) != 0;
|
| ;
| return 0;
| }
configure:4809: error: in `/usr/src/httpd-2.2.21':
configure:4813: error: C compiler cannot create executables
See `config.log' for more details.
me@linode:/usr/src/httpd-2.2.21# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc /usr/lib64/gcc /usr/X11R6/bin/gcc /usr/bin/X11/gcc /usr/X11/bin/gcc /usr/libexec/gcc /usr/man/man1/gcc.1.gz /usr/share/man/man1/gcc.1.gz /usr/X11/man/man1/gcc.1.gz
me@linode:/usr/src/httpd-2.2.21# gcc -v
-bash: /usr/bin/gcc: No such file or directory

So it seems to see it on the one hand and not find it on the other. Can anyone point me in the right direction?

Thanks for your help!
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 10-27-2011, 04:16 PM   #2
Cultist
Member
 
Registered: Feb 2010
Location: Chicago, IL
Distribution: Slackware64 14.1
Posts: 777

Rep: Reputation: 101Reputation: 101
are you able to compile and install any slackbuilds? Those almost always require gcc to install.

You may be trying to compile a 32-bit application without being multilib enabled
 
1 members found this post helpful.
Old 10-27-2011, 04:36 PM   #3
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
What is the output of:

Code:
ls -l /usr/bin/gcc
Adam
 
2 members found this post helpful.
Old 10-27-2011, 05:36 PM   #4
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,202

Rep: Reputation: 291Reputation: 291Reputation: 291
And also to the point what is the output of 'file /usr/bin/gcc'?

I suspect a 32 binary
 
1 members found this post helpful.
Old 10-27-2011, 06:45 PM   #5
cenazoic
LQ Newbie
 
Registered: Jan 2009
Location: Minneapolis
Distribution: Arch, Slackware
Posts: 7

Original Poster
Rep: Reputation: 3
Adam,

ls -l /usr/bin/gcc == /usr/bin/gcc -> gcc-4.5.3*

Dive,

file /usr/bin/gcc == /usr/bin/gcc: symbolic link to `gcc-4.5.3'

Slacktat,

After your comment I updated using AlienBob's multilib instructions/packages. While I can now 'gcc -v' and get an appropriate response, I'm still getting errors ./configuring Apache. Here's the config.log (different error, so progress, I suppose. )

Quote:
configure:4740: checking for C compiler default output file name
configure:4762: gcc -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE conftest.c >&5
/usr/libexec/gcc/x86_64-slackware-linux/4.5.3/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory
configure:4766: $? = 1
configure:4803: result:
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
| return ferror (f) || fclose (f) != 0;
|
| ;
| return 0;
| }
configure:4809: error: in `/usr/src/httpd-2.2.21':
configure:4813: error: C compiler cannot create executables
Thanks for the help, guys!

Cena
 
Old 10-27-2011, 07:14 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,202

Rep: Reputation: 291Reputation: 291Reputation: 291
Go back a step. You shouldn't need to build 32bit apache/httpd on 64bit slackware. You should use 64bit.

Any reason why the provided stock slackware package is no good for you?

If you need to update then it's a matter of finding out the missing libs and installing/building those too.

As usual www.slackbuilds.org has a lot of things that your local slackware mirror doesn't provide.
 
Old 10-27-2011, 07:17 PM   #7
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,202

Rep: Reputation: 291Reputation: 291Reputation: 291
By the way did you run 'file' on that gcc-4.5.3?
 
Old 10-27-2011, 08:21 PM   #8
NoStressHQ
Member
 
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 272

Rep: Reputation: 87
It's normal, the Linode's Slackware is a highly lighten one...

You need to install quite some packages more than that, sorry, I don't remember the exact packages, but I remember spending some time doing "installpkg" from the mirrors. (wget was missing too if I remember well).

You might miss binutils or gnu ld...

Anyway on the server, moreover if you have a tiny one (low mem, low disk) as I have, you'd better use the 32 bit version to save some space.

Don't be desperate, install some more packages from the basic repo and you should get somewhere .
(Just avoid the X and KDE stuff, all the rest worth installing).

Good luck and keep the faith !

Garry.

Edit: I remember having focused on first having lftp installed, to be able to have a "local mirror" on the server, after that, package installs were easier. Btw, Linode recently changed the bandwidth policy, and you have no limit to "download" from the server point of view, so use it without being shy .

Last edited by NoStressHQ; 10-27-2011 at 08:25 PM.
 
Old 10-27-2011, 08:51 PM   #9
the3dfxdude
Member
 
Registered: May 2007
Posts: 315

Rep: Reputation: 84
Quote:
Originally Posted by cenazoic View Post
Adam,

ls -l /usr/bin/gcc == /usr/bin/gcc -> gcc-4.5.3*

Dive,

file /usr/bin/gcc == /usr/bin/gcc: symbolic link to `gcc-4.5.3'

Slacktat,

After your comment I updated using AlienBob's multilib instructions/packages. While I can now 'gcc -v' and get an appropriate response, I'm still getting errors ./configuring Apache. Here's the config.log (different error, so progress, I suppose. )



Thanks for the help, guys!

Cena

It is clear from the log file you are missing
libmpc-0.8.2-x86_64-2.txz

Please also run 'ldd /usr/libexec/gcc/x86_64-slackware-linux/4.5.3/cc1' to check for more missing libraries. You should have got the required libraries from the l/ series, which is not clear that you installed that series.

I'm not sure what this other talk about 32-bit Apache / 64-bit multi-lib, so you might want to explain more. But if you are multi-lib, make sure you install the appropriate corresponding multi-lib packages so you can compile the way you are intending.
 
Old 03-01-2013, 10:51 AM   #10
nblxxx
LQ Newbie
 
Registered: May 2012
Posts: 4

Rep: Reputation: Disabled
Hi folks,

I recently got myself a linode node with a slackware64 13.37 image, upgraded to current, installed gcc then tried to install nginx and got the "checking for C compiler ... not found" issue

However the line right before that tells me i'm running a 3.7.10 kernel, which is not the same version my gcc was compiled against (3.7.1)

Does that matter? should i recompile all my dev packages against this kernel (including kernel source) ?

thanks,
 
  


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
gcc-4.5.2 - Pass 1 error -gcc command not found ?? adi_30stm Linux From Scratch 20 11-17-2011 12:23 PM
GCC not found QianChen Linux - Newbie 1 07-19-2006 04:49 PM
GCC not found? newuser455 Linux - Software 4 06-27-2005 02:55 AM
gcc vs. g++ -> iostream lib found vs. not found CooManChu Linux - General 1 12-11-2004 09:20 AM


All times are GMT -5. The time now is 10:05 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 Google+: linuxquestions
Open Source Consulting | Domain Registration