Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-27-2011, 04:10 PM
|
#1
|
|
LQ Newbie
Registered: Jan 2009
Location: Minneapolis
Distribution: Arch, Slackware
Posts: 5
Rep:
|
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.
|
10-27-2011, 04:16 PM
|
#2
|
|
Member
Registered: Feb 2010
Location: Chicago, IL
Distribution: Slackware64 14.0
Posts: 742
Rep:
|
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.
|
10-27-2011, 04:36 PM
|
#3
|
|
Senior Member
Registered: May 2006
Posts: 3,012
|
What is the output of:
Adam
|
|
|
2 members found this post helpful.
|
10-27-2011, 05:36 PM
|
#4
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,081
|
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.
|
10-27-2011, 06:45 PM
|
#5
|
|
LQ Newbie
Registered: Jan 2009
Location: Minneapolis
Distribution: Arch, Slackware
Posts: 5
Original Poster
Rep:
|
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
|
|
|
|
10-27-2011, 07:14 PM
|
#6
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,081
|
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.
|
|
|
|
10-27-2011, 07:17 PM
|
#7
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,081
|
By the way did you run 'file' on that gcc-4.5.3?
|
|
|
|
10-27-2011, 08:21 PM
|
#8
|
|
Member
Registered: Apr 2010
Location: Lausanne - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware Leet - 32/64bit
Posts: 190
Rep:
|
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.
|
|
|
|
10-27-2011, 08:51 PM
|
#9
|
|
Member
Registered: May 2007
Posts: 276
Rep:
|
Quote:
Originally Posted by cenazoic
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.
|
|
|
|
03-01-2013, 10:51 AM
|
#10
|
|
LQ Newbie
Registered: May 2012
Posts: 4
Rep: 
|
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,
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:37 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|