Edit report at http://bugs.php.net/bug.php?id=36419&edit=1
ID: 36419 Comment by: idl3mind at gmail dot com Reported by: michael at stellarent dot com Summary: rpmbuild -bb php.spec fails Status: Bogus Type: Bug Package: *Compile Issues Operating System: Fedora Core 2 PHP Version: 5.1.2 Block user comment: N New Comment: thanks Michael. removing -Wno-pointer-sign worked like a champ. Previous Comments: ------------------------------------------------------------------------ [2006-03-08 08:27:05] tony2...@php.net Report that to Redhat, they are the authors the php.spec file and PHP developers have nothing to do with it. ------------------------------------------------------------------------ [2006-03-07 23:32:32] michael at stellarent dot com PS: What do you mean by "We do not support any third-party packages."? What 3rd party packages are you referring to? Thanks, Michael. ------------------------------------------------------------------------ [2006-03-07 23:26:46] michael at stellarent dot com You might say my gcc is borked, but that's not correct at all. Since reporting the problem I have discovered the nature of the problem, which lies with php.spec file. The CFLAGS variable in php.spec file has the flag "-Wno-pointer-sign" which does not exist in gcc < 4.x. Thus the configure error "configure: error: C compiler cannot create executables" is bogus (not to mention totally confusing). Simply removing the flag from php.spec resolves the problem nicely. By the way, on Fedora Core 4, php 5.1.2 builds without problems, since gcc is by default version 4. So my guess is that no one thought that someone would want to build/use php > 5.0.4 on Fedora 1,2 or 3. It is written for Fedora 4. And I am sure you realize that upgrading gcc on FC1,2 or 3 is impossible (unless you upgrade everything). It is disappointing you assumed so quickly my gcc is 'b0rked', instead of investigating the matter properly. And to reinforce my point, I just received this note from another php user (you should have received a cc): Timothy M. Gage [tg...@tamdesign.com] ------------------------------------------- This problem appears to stem from an unsupported CFLAGS option which has been added to the Fedora spec file. Removing -Wno-pointer-sign from the CFLAGS line in the php.spec file will allow rpmbuild to function properly. The problem is not with the PHP distribution itself, but with the fedora supplied php.spec file. Thanks in advance! Regards, Tim ------------------------------------------------- Thanks, Michael. ------------------------------------------------------------------------ [2006-02-16 16:08:14] tony2...@php.net We do not support any third-party packages. And yes, your gcc is b0rked, see config.log for details. ------------------------------------------------------------------------ [2006-02-16 15:55:13] michael at stellarent dot com Description: ------------ Downloaded the latest fedora core source rpm (php-5.1.2-4.3.src.rpm), installed using rpm -ivh, and invoked rpmbuild -bb. Build fails with message: checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. error: Bad exit status from /var/tmp/rpm-tmp.21471 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.21471 (%build) I have tried earlier versions, but same problem. The only version which builds, is 5.0.4-3. Curiously, compiling php from tar.gz distrubution works fine. Expected result: ---------------- php to build all rpms in /usr/src/redhat/RPMS/i386 Actual result: -------------- [r...@fc2 php-5.1.2]# rpmbuild -bb /usr/src/redhat/SPECS/php-5.1.2-4.3.spec Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.68654 + umask 022 + cd /usr/src/redhat/BUILD + LANG=C + export LANG + unset DISPLAY + cd /usr/src/redhat/BUILD + rm -rf php-5.1.2 + /usr/bin/gzip -dc /usr/src/redhat/SOURCES/php-5.1.2.tar.gz + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd php-5.1.2 ++ /usr/bin/id -u + '[' 0 = 0 ']' + /bin/chown -Rhf root . ++ /usr/bin/id -u + '[' 0 = 0 ']' + /bin/chgrp -Rhf root . + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + echo 'Patch #5 (php-4.3.3-install.patch):' Patch #5 (php-4.3.3-install.patch): + patch -p1 -b --suffix .install -s + echo 'Patch #6 (php-5.0.4-norpath.patch):' Patch #6 (php-5.0.4-norpath.patch): + patch -p1 -b --suffix .norpath -s + echo 'Patch #7 (php-4.3.2-libtool15.patch):' Patch #7 (php-4.3.2-libtool15.patch): + patch -p1 -b --suffix .libtool15 -s + echo 'Patch #13 (php-5.0.2-phpize64.patch):' Patch #13 (php-5.0.2-phpize64.patch): + patch -p1 -b --suffix .phpize64 -s + echo 'Patch #21 (php-4.3.1-odbc.patch):' Patch #21 (php-4.3.1-odbc.patch): + patch -p1 -b --suffix .odbc -s + echo 'Patch #22 (php-4.3.11-shutdown.patch):' Patch #22 (php-4.3.11-shutdown.patch): + patch -p1 -b --suffix .shutdown -s + echo 'Patch #30 (php-5.0.4-dlopen.patch):' Patch #30 (php-5.0.4-dlopen.patch): + patch -p1 -b --suffix .dlopen -s + echo 'Patch #31 (php-5.0.0-easter.patch):' Patch #31 (php-5.0.0-easter.patch): + patch -p1 -b --suffix .easter -s + echo 'Patch #50 (php-5.0.4-tests-dashn.patch):' Patch #50 (php-5.0.4-tests-dashn.patch): + patch -p1 -b --suffix .tests-dashn -s + echo 'Patch #51 (php-5.0.4-tests-wddx.patch):' Patch #51 (php-5.0.4-tests-wddx.patch): + patch -p1 -b --suffix .tests-wddx -s + cp Zend/LICENSE Zend/ZEND_LICENSE + cp TSRM/LICENSE TSRM_LICENSE + cp regex/COPYRIGHT regex_COPYRIGHT + cp ext/gd/libgd/README gd_README + mkdir build-cgi build-apache + rm -f ext/standard/tests/file/bug21131.phpt + rm -f ext/standard/tests/file/bug22414.phpt ext/iconv/tests/bug16069.phpt + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.21471 + umask 022 + cd /usr/src/redhat/BUILD + cd php-5.1.2 + LANG=C + export LANG + unset DISPLAY + libtoolize --force --copy ++ aclocal --print-ac-dir + cat /usr/share/aclocal/libtool.m4 + ./buildconf --force Forcing buildconf using default Zend directory buildconf: checking installation... buildconf: autoconf version 2.59 (ok) buildconf: Your version of autoconf likely contains buggy cache code. Running cvsclean for you. To avoid this, install autoconf-2.13. rebuilding aclocal.m4 rebuilding configure aclocal.m4:2054: PHP_PROG_LEX is expanded from... rebuilding main/php_config.h.in autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' autoheader: WARNING: and `config.h.top', to define templates for `config.h.in' autoheader: WARNING: is deprecated and discouraged. autoheader: autoheader: WARNING: Using the third argument of `AC_DEFINE' and autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without autoheader: WARNING: `acconfig.h': autoheader: autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1, autoheader: [Define if a function `main' is needed.]) autoheader: autoheader: WARNING: More sophisticated templates can also be produced, see the autoheader: WARNING: documentation. aclocal.m4:2054: PHP_PROG_LEX is expanded from... + CFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686 -fno-strict-aliasing -Wno-pointer-sign + export CFLAGS + EXTENSION_DIR=/usr/lib/php/modules + export EXTENSION_DIR + PEAR_INSTALLDIR=/usr/share/pear + export PEAR_INSTALLDIR + pushd build-cgi /usr/src/redhat/BUILD/php-5.1.2/build-cgi /usr/src/redhat/BUILD/php-5.1.2 + build --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=/usr --with-xmlrpc=shared --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared --with-dom-xslt=/usr --with-dom-exslt=/usr --with-pgsql=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared --enable-xmlwriter=shared --enable-fastcgi --enable-pdo=shared --with-pdo-odbc=shared,unixODBC,/usr --with-pdo-mysql=shared,/usr --with-pdo-pgsql=shared,/usr --with-pdo-sqlite=shared,/usr + mkdir Zend + cp ../Zend/zend_language_parser.c ../Zend/zend_language_parser.h ../Zend/zend_language_scanner.c ../Zend/zend_language_scanner.h ../Zend/zend_ini_parser.c ../Zend/zend_ini_parser.h ../Zend/zend_ini_scanner.c ../Zend/zend_ini_scanner.h Zend + ln -sf ../configure + CFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686 -fno-strict-aliasing -Wno-pointer-sign + export CFLAGS + CXXFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686 + export CXXFLAGS + FFLAGS=-O2 -g -pipe -march=i386 -mcpu=i686 + export FFLAGS ++ find . -name config.guess -o -name config.sub + ./configure --host=i686-redhat-linux-gnu --build=i686-redhat-linux-gnu --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-png --with-pspell --with-expat-dir=/usr --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic=/etc/httpd/conf/magic --without-sqlite --with-libxml-dir=/usr --with-xml --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbstr-enc-trans --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=/usr --with-xmlrpc=shared --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared --with-dom-xslt=/usr --with-dom-exslt=/usr --with-pgsql=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared --enable-xmlwriter=shared --enable-fastcgi --enable-pdo=shared --with-pdo-odbc=shared,unixODBC,/usr --with-pdo-mysql=shared,/usr --with-pdo-pgsql=shared,/usr --with-pdo-sqlite=shared,/usr configure: creating cache ../config.cache checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking build system type... i686-redhat-linux-gnu checking host system type... i686-redhat-linux-gnu checking target system type... i386-redhat-linux-gnu checking for i686-redhat-linux-gnu-gcc... no checking for gcc... gcc checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. error: Bad exit status from /var/tmp/rpm-tmp.21471 (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.21471 (%build) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=36419&edit=1