php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40239 PHP 5.2.0 (threaded )fails to ./configure, though 5.1.6 does with same options
Submitted: 2007-01-25 17:12 UTC Modified: 2007-01-25 17:34 UTC
From: damokles at gmx dot net Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.0 OS: Linux
Private report: No CVE-ID: None
 [2007-01-25 17:12 UTC] damokles at gmx dot net
Description:
------------
./configure with the options from reproduce code fails for me though 5.1.6 has no problem configuring and compiling with this. The last lines of the configure script are:

checking for gcc... gcc
checking whether the C++ compiler (gcc  -pthread  ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.


Reproduce code:
---------------
./configure  --prefix=/usr --with-apxs2=/usr/bin/apxs2 --with-regex=php --with-config-file-path=/etc/php5 --disable-rpath --enable-memory-limit -disable-debug --with-layout=GNU -with-pear=/usr/share/php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-bcmath --with-bz2 --enable-ctype --with-db4 --with-iconv -enable-exif --enable-filepro --enable-ftp --with-gettext --enable-mbstring --enable-shmop --enable-sockets --enable-wddx --enable-xml --with-expat-dir=/usr --with-xmlrpc --enable-yp --with-zlib --without-pgsql --with-kerberos=/usr --with-openssl=/usr --enable-dbx --with-mime-magic=/usr/share/misc/file/magic.mime --with-exec-dir=/usr/lib/php5/libexec --disable-static --with-curl=shared,/usr --with-dom=shared,/usr --with-dom-xslt=shared,/usr --with-dom-exslt=shared,/usr --with-zlib-dir=/usr --with-gd=shared,/usr --enable-gd-native-ttf --with-jpeg-dir=shared,/usr --with-xpm-dir=shared,/usr/X11R6 -with-png-dir=shared,/usr --with-freetype-dir=shared,/usr --with-imap=shared,/usr --with-imap-ssl --with-ldap=shared,/usr --with-mcal=shared,/usr --with-mhash=shared,/usr --without-mm --with-mysql=shared,/usr --enable-xslt=shared --with-xslt-sablot=shared,/usr --with-snmp=shared,/usr --with-sybase-ct=shared,/usr --with-ttf=shared,/usr --with-t1lib=shared,/usr --enable-maintainer-zts

Expected result:
----------------
I'd expect the same output as in 5.1.6 :)

Actual result:
--------------
checking for gcc... gcc
checking whether the C++ compiler (gcc  -pthread  ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-25 17:14 UTC] tony2001@php.net
What's in your config.log ?
 [2007-01-25 17:25 UTC] damokles at gmx dot net
fp_except x = (fp_except) 0;

; return 0; }
configure:103600: checking for dlfcn.h
configure:103638: checking whether dlsym() requires a leading underscore in symbol names
configure:103706: gcc -o conftest -I/usr/include -g -O2 -pthread  -D_REENTRANT  conftest.c  1>&5
/tmp/ccSBAPb1.o(.text+0x32): In function `main':
/usr/src/php-5.2.0/configure:103692: undefined reference to `dlopen'
/tmp/ccSBAPb1.o(.text+0x49):/usr/src/php-5.2.0/configure:103697: undefined reference to `dlsym'
/tmp/ccSBAPb1.o(.text+0x6d):/usr/src/php-5.2.0/configure:103698: undefined reference to `dlsym'
collect2: ld returned 1 exit status
configure:103811: checking virtual machine dispatch method
configure:103815: checking whether to enable thread-safety
configure:103819: checking whether to enable inline optimization for GCC
configure:103823: checking whether to enable a memory limit
configure:103827: checking whether to enable Zend debugging
configure:103831: checking whether to enable Zend multibyte
configure:103916: checking for inline
configure:103959: checking target system is Darwin
configure:103971: checking for MM alignment and log values
configure:104015: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104040: checking for memory allocation using mmap(MAP_ANON)
configure:104084: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104106: checking for memory allocation using mmap(/dev/zero)
configure:104160: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104184: checking for mremap
configure:104212: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104279: checking for stdarg.h
configure:104493: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS -pthread  -D_REENTRANT  conftest.c  1>&5
configure:104513: checking for pthreads_cflags
configure:104583: checking for pthreads_lib
configure:104674: checking for POSIX threads
configure:105262: checking build system type
configure:105291: checking for ld used by /usr/src/php-5.2.0/meta_ccld
configure:105363: checking if the linker (/usr/bin/ld) is GNU ld
configure:105383: checking for /usr/bin/ld option to reload object files
configure:105408: checking for BSD-compatible nm
configure:105454: checking how to recognise dependent libraries
configure:105632: checking for object suffix
configure:105638: /usr/src/php-5.2.0/meta_ccld -c -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT conftest.c 1>&5
configure:105658: checking for executable suffix
configure:105668: /usr/src/php-5.2.0/meta_ccld -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT   conftest.c  1>&5
configure:105859: checking for c++
configure:105859: checking for g++
configure:105859: checking for gcc
configure:105891: checking whether the C++ compiler (gcc  -pthread  ) works
configure:105907: gcc -o conftest  -pthread  -D_REENTRANT   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);}
 [2007-01-25 17:26 UTC] damokles at gmx dot net
Erm sorry. Hope this is the right snippet:

/usr/src/php-5.2.0/configure:103520: undefined reference to `isfinite'
collect2: ld returned 1 exit status
configure: failed program was:
#line 103503 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char isfinite(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char isfinite();

int main() {

/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined (__stub_isfinite) || defined (__stub___isfinite)
choke me
#else
isfinite();
#endif

; return 0; }
configure:103498: checking for isinf
configure:103498: checking for isnan
configure:103553: checking whether fp_except is defined
configure:103570: gcc -c -I/usr/include -g -O2 -pthread  -D_REENTRANT conftest.c 1>&5
configure:103561:27: floatingpoint.h: No such file or directory
configure: In function `main':
configure:103565: error: `fp_except' undeclared (first use in this function)
configure:103565: error: (Each undeclared identifier is reported only once
configure:103565: error: for each function it appears in.)
configure:103565: error: syntax error before "x"
configure: failed program was:
#line 103559 "configure"
#include "confdefs.h"

#include <floatingpoint.h>

int main() {

fp_except x = (fp_except) 0;

; return 0; }
configure:103600: checking for dlfcn.h
configure:103638: checking whether dlsym() requires a leading underscore in symbol names
configure:103706: gcc -o conftest -I/usr/include -g -O2 -pthread  -D_REENTRANT  conftest.c  1>&5
/tmp/ccSBAPb1.o(.text+0x32): In function `main':
/usr/src/php-5.2.0/configure:103692: undefined reference to `dlopen'
/tmp/ccSBAPb1.o(.text+0x49):/usr/src/php-5.2.0/configure:103697: undefined reference to `dlsym'
/tmp/ccSBAPb1.o(.text+0x6d):/usr/src/php-5.2.0/configure:103698: undefined reference to `dlsym'
collect2: ld returned 1 exit status
configure:103811: checking virtual machine dispatch method
configure:103815: checking whether to enable thread-safety
configure:103819: checking whether to enable inline optimization for GCC
configure:103823: checking whether to enable a memory limit
configure:103827: checking whether to enable Zend debugging
configure:103831: checking whether to enable Zend multibyte
configure:103916: checking for inline
configure:103959: checking target system is Darwin
configure:103971: checking for MM alignment and log values
configure:104015: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104040: checking for memory allocation using mmap(MAP_ANON)
configure:104084: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104106: checking for memory allocation using mmap(/dev/zero)
configure:104160: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104184: checking for mremap
configure:104212: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT  conftest.c  1>&5
configure:104279: checking for stdarg.h
configure:104493: gcc -o conftest -I/usr/include -g -O2 -pthread -DZTS -pthread  -D_REENTRANT  conftest.c  1>&5
configure:104513: checking for pthreads_cflags
configure:104583: checking for pthreads_lib
configure:104674: checking for POSIX threads
configure:105262: checking build system type
configure:105291: checking for ld used by /usr/src/php-5.2.0/meta_ccld
configure:105363: checking if the linker (/usr/bin/ld) is GNU ld
configure:105383: checking for /usr/bin/ld option to reload object files
configure:105408: checking for BSD-compatible nm
configure:105454: checking how to recognise dependent libraries
configure:105632: checking for object suffix
configure:105638: /usr/src/php-5.2.0/meta_ccld -c -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT conftest.c 1>&5
configure:105658: checking for executable suffix
configure:105668: /usr/src/php-5.2.0/meta_ccld -o conftest -I/usr/include -g -O2 -pthread -DZTS  -D_REENTRANT   conftest.c  1>&5
configure:105859: checking for c++
configure:105859: checking for g++
configure:105859: checking for gcc
configure:105891: checking whether the C++ compiler (gcc  -pthread  ) works
configure:105907: gcc -o conftest  -pthread  -D_REENTRANT   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);}
 [2007-01-25 17:28 UTC] tony2001@php.net
gcc: installation problem, cannot exec `cc1plus': No such file or directory
 [2007-01-25 17:34 UTC] damokles at gmx dot net
Thanks. apt-get install g++ solved the problem. Though it's unclear to me why whithin the 5.x tree you need to install a new compiler.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 17:01:34 2025 UTC