php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39439 Configure complains about gcc
Submitted: 2006-11-09 00:43 UTC Modified: 2010-12-20 12:20 UTC
From: mark at oneeach dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.0 OS: Linux RHEL4
Private report: No CVE-ID: None
 [2006-11-09 00:43 UTC] mark at oneeach dot com
Description:
------------
When trying to configure php 5.2.0 (with the configure line detailed in the reproduce code section), it aborts with the error detailed in "actual result".

I initially thought something must be wrong on the server, except that I can go back and configure+compile any other version of PHP (such as 5.1.6) and there are no errors (as shown in expected result).

Thanks,
-Mark

Reproduce code:
---------------
./configure  --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --disable-path-info-check --disable-cgi --with-zlib --with-bz2 --enable-sockets --with-openssl --with-curl --with-curlwrappers --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config --with-gmp --with-mcrypt --with-mhash --with-pspell --with-gettext --with-tidy --with-libxml-dir --with-xsl --enable-exif --with-jpeg-dir --with-png-dir --with-gd --enable-gd-native-ttf --with-ttf --with-freetype-dir --with-imap --with-imap-ssl --with-kerberos

Expected result:
----------------
Configuring libtool
checking build system type... i686-pc-linux-gnu
checking for ld used by gcc... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
checking for /usr/bin/ld option to reload object files... (cached) -r
checking for BSD-compatible nm... (cached) /usr/bin/nm -B
checking how to recognise dependent libraries... (cached) pass_all
checking for object suffix... (cached) o
checking for executable suffix... (cached) no
checking the maximum length of command line arguments... (cached) 32768
checking command to parse /usr/bin/nm -B output from gcc object... (cached) ok
checking for objdir... (cached) .libs
checking for ar... (cached) ar
checking for ranlib... (cached) ranlib
checking for strip... (cached) strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... (cached) no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool

Actual result:
--------------
Configuring libtool
checking build system type... i686-pc-linux-gnu
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking for c++... no
checking for g++... no
checking for gcc... gcc
checking whether the C++ compiler (gcc   ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-09 00:48 UTC] tony2001@php.net
Are you sure you have gcc-c++..rpm package installed?
What's in your config.log?
 [2006-11-09 17:39 UTC] mark at oneeach dot com
[root@web1 ~]# grep gcc install.log
Installing libgcc-3.4.3-22.1.i386.
compat-gcc-32-3.2.3-47.3.i386.rpm
compat-gcc-32-c++-3.2.3-47.3.i386.rpm
compat-libgcc-296-2.96-132.7.2.i386.rpm
gcc-3.4.3-22.1.i386.rpm
gcc-c++-3.4.3-22.1.i386.rpm
gcc-g77-3.4.3-22.1.i386.rpm
gcc-gnat-3.4.3-22.1.i386.rpm
gcc-java-3.4.3-22.1.i386.rpm
gcc-objc-3.4.3-22.1.i386.rpm
gcc4-4.0.0-0.14.EL4.i386.rpm
gcc4-c++-4.0.0-0.14.EL4.i386.rpm
gcc4-gfortran-4.0.0-0.14.EL4.i386.rpm

I wondered about the same thing at first, but then it wouldn't successfully build other versions of PHP start to finish if that were the case.
 [2006-11-09 17:53 UTC] tony2001@php.net
Well this line: "checking for c++... no" says that c++ is missing on your system.
What is in your config.log again?
 [2006-11-09 20:04 UTC] mark at oneeach dot com
I understand that would make you think gcc was missing, however isn't it true that I wouldn't be able to configure and make PHP-5.1.6 (or any version) if that were the case?

With php 5.2.0 the (relevant portion) of the config.log is:
----
configure:105859: checking for gcc
configure:105891: checking whether the C++ compiler (gcc   ) works
configure:105907: gcc -o conftest     conftest.C  1>&5
gcc: installation problem, cannot exec `cc1plus': No such file or directory
configure: failed program was:

#line 105902 "configure"
#include "confdefs.h"

int main(){return(0);}
----

With PHP-5.1.6 (same box, same user, etc):
----
configure:105692: checking if gcc static flag  works
configure:105742: checking if gcc supports -fno-rtti -fno-exceptions
configure:105792: checking for gcc option to produce PIC
configure:106003: checking if gcc PIC flag -fPIC works
configure:106020: gcc -c -I/usr/include -g -O2  -fPIC -DPIC conftest.c 1>&5
configure:106024: $? = 0
configure:106062: checking if gcc supports -c -o file.o
configure:106133: checking whether the gcc linker (/usr/bin/ld) supports shared libraries
configure:106994: checking whether -lc should be explicitly linked in
configure:106998: gcc -c -I/usr/include -g -O2  conftest.c 1>&5
configure:107011: gcc -shared conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2>&1 | grep  -lc  >/dev/null 2>&1
configure:107030: checking dynamic linker characteristics
configure:107604: checking how to hardcode library paths into programs
configure:107642: checking whether stripping libraries is possible
configure:108227: checking if libtool supports shared libraries
configure:108231: checking whether to build shared libraries
configure:108254: checking whether to build static libraries
----
 [2006-11-09 20:18 UTC] tony2001@php.net
Type this in your shell:
# which c++
# c++

 [2006-11-09 21:41 UTC] mark at oneeach dot com
Removed and re-installed gcc packages, everything is fine now. Thanks for your time.
 [2006-11-09 21:52 UTC] tony2001@php.net
No problem.

 [2010-12-20 12:20 UTC] jani@php.net
-Package: Tidy +Package: Compile Failure
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Aug 26 16:00:03 2025 UTC