LinuxQuestions.org
Review your favorite Linux distribution.
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 04-04-2013, 01:33 AM   #1
rousbarr2004
LQ Newbie
 
Registered: Feb 2012
Location: Texas
Posts: 4

Rep: Reputation: Disabled
C compiler cannot create executable, Apache 2.2.17 install on Fedora 18


So I'm the newbie trying to install Apache, everything runs great until I configure. Help is greatly appreciated.

[root@localhost httpd-2.2.17]# ./configure --enable-mods-shared=all --prefix=/usr/local/apache
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-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 `/home/russ/httpd-2.2.17':
configure: error: C compiler cannot create executables
See `config.log' for more details.
 
Old 04-04-2013, 01:45 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272Reputation: 2272
so what is in config.log ?
 
Old 04-04-2013, 02:14 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Welcome to LQ.

How to get gcc to work : # yum install gcc-c++
.. which will also install the dependencies for gcc :
glibc-devel glibc-headers kernel-headers.

Also suggest : $ yum grouplist
# yum install "Development Tools"

-
 
Old 04-04-2013, 02:23 AM   #4
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,827

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
are you 100% sure that you need the old apache 2.2.17 ?
it is very old
older even that the current 2.2.24 build on the apache web site
http://httpd.apache.org/download.cgi#apache22

2.4 is in the fedora repos and on the install dvd

Also fedora , by default , dose not use "/usr/local"
it is not in the system path
the default install location on fedora/red hat/ cent is "/var/www/http"
/var/www/http/index.html is the "congratulations you installed apache " web page


Now i do recommend that one builds from source everything for the first few installs .That way you learn how to install everything and set it up

but fedora has a install group to install everything needed
Code:
su -
yum grouplist 
---- then from that list install it ----
yum groupinstall "web server"
Apache 2.2.17 is way to old for the current gcc 4.8 in fedora 18
it is likely you will need to install along side 4.8 gcc 4.1

Last edited by John VV; 04-04-2013 at 02:26 AM.
 
Old 04-04-2013, 05:37 PM   #5
rousbarr2004
LQ Newbie
 
Registered: Feb 2012
Location: Texas
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
so what is in config.log ?
I think this is where it goes wrong.

configure:3510: checking for APR
configure:3595: result: yes
configure:3870: checking for APR-util
configure:3955: result: yes
configure:4203: checking for gcc
configure:4230: result: gcc
configure:4462: checking for C compiler version
configure:4470: gcc --version >&5
./configure: line 4472: gcc: command not found
configure:4474: $? = 127
configure:4481: gcc -v >&5
./configure: line 4483: gcc: command not found
configure:4485: $? = 127
configure:4492: gcc -V >&5
./configure: line 4494: gcc: command not found
configure:4496: $? = 127
configure:4519: checking for C compiler default output file name
configure:4541: gcc -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE conftest.c >&5
./configure: line 4543: gcc: command not found
configure:4545: $? = 127
configure:4583: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:4589: error: in `/home/russ/httpd-2.2.17':
configure:4592: error: C compiler cannot create executables
See `config.log' for more details.
 
Old 04-04-2013, 05:49 PM   #6
rousbarr2004
LQ Newbie
 
Registered: Feb 2012
Location: Texas
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by John VV View Post
are you 100% sure that you need the old apache 2.2.17 ?
it is very old
older even that the current 2.2.24 build on the apache web site
http://httpd.apache.org/download.cgi#apache22

2.4 is in the fedora repos and on the install dvd

Also fedora , by default , dose not use "/usr/local"
it is not in the system path
the default install location on fedora/red hat/ cent is "/var/www/http"
/var/www/http/index.html is the "congratulations you installed apache " web page


Now i do recommend that one builds from source everything for the first few installs .That way you learn how to install everything and set it up

but fedora has a install group to install everything needed
Code:
su -
yum grouplist 
---- then from that list install it ----
yum groupinstall "web server"
Apache 2.2.17 is way to old for the current gcc 4.8 in fedora 18
it is likely you will need to install along side 4.8 gcc 4.1

I am running the 2.2.17 because that is what the book was written with. I am installing as part of class lab assignment. Original text was for Fedore 17 and 2.2.17, however I could not find Fedora 17 ISO and loaded 18. At this point I just need Apache w/ modules to finish the last 4 weeks. I did forget to mention that I am running Fedore on Oracle VM Virtualbox, but I do not think this has an impact other than sluggish GUI performance.
 
Old 04-04-2013, 06:06 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 6.

Apache : httpd-2.2.17 is the Fedora 15 version.

ISO : All versions 15...18 are available from Fedora.
http://dl.fedoraproject.org/pub/fedora/linux/releases/
 
1 members found this post helpful.
Old 04-04-2013, 07:59 PM   #8
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,827

Rep: Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409Reputation: 2409
well the error in the above post
shows you did not install the "development tools "

Code:
su -
yum grouplist 
/*----- then from that long list install the group --------*/
yum groupinstall "Development Tools"
but be aware
that Apache 2.2.17 is older than the current fedora 18 gcc compiler " gcc 4.8 "

you might need to hack the Apache source code to get it to build on gcc 4.8

or
install gcc 4.3 or gcc 4.1 along side gcc 4.8 and set "alternatives" to the gcc 4.3 or 4.1 version

this is a very common issue with fedora
Fedora is a fast passed "Research and development " distro that trys to use the
"Newest of the NEW " including sometimes BETA testing versions of lib's and programs

a lot of programs will not "yet" build ( without hacking ) on the current versions of fedora

Last edited by John VV; 04-04-2013 at 08:02 PM.
 
1 members found this post helpful.
Old 04-05-2013, 12:14 AM   #9
rousbarr2004
LQ Newbie
 
Registered: Feb 2012
Location: Texas
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
# 6.

Apache : httpd-2.2.17 is the Fedora 15 version.

ISO : All versions 15...18 are available from Fedora.
http://dl.fedoraproject.org/pub/fedora/linux/releases/
Thanks, I will look there next time I need an older version.
 
  


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
checking for C compiler default output... configure: error: C compiler cannot create clubbing80s Linux - Software 3 07-05-2010 09:17 PM
i keep getting c can not create executable while installing mad play in fedora naren4055 Fedora 29 05-01-2010 04:19 PM
Audacity install: error: C compiler cannot create executables Jinouchi Linux - Software 2 02-25-2008 11:29 AM
Apache http server - error: C compiler cannot create executables Jinouchi Linux - Server 3 01-04-2008 04:39 PM
Problem with gcc: configure: error: C compiler cannot create executable abefroman SUSE / openSUSE 4 05-11-2005 07:12 PM


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