LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   C compiler cannot create executable, Apache 2.2.17 install on Fedora 18 (https://www.linuxquestions.org/questions/linux-newbie-8/c-compiler-cannot-create-executable-apache-2-2-17-install-on-fedora-18-a-4175456791/)

rousbarr2004 04-04-2013 12:33 AM

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.

pan64 04-04-2013 12:45 AM

so what is in config.log ?

knudfl 04-04-2013 01:14 AM

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"

-

John VV 04-04-2013 01:23 AM

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

rousbarr2004 04-04-2013 04:37 PM

Quote:

Originally Posted by pan64 (Post 4924775)
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.

rousbarr2004 04-04-2013 04:49 PM

Quote:

Originally Posted by John VV (Post 4924789)
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.

knudfl 04-04-2013 05:06 PM

# 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/

John VV 04-04-2013 06:59 PM

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

rousbarr2004 04-04-2013 11:14 PM

Quote:

Originally Posted by knudfl (Post 4925300)
# 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.


All times are GMT -5. The time now is 10:41 PM.