|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67209 ./configure: line 5388: test: too many arguments
Submitted: 2014-05-05 13:04 UTC Modified: 2021-11-07 04:22 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:2 (100.0%)
From: spam2 at rhsoft dot net Assigned: cmb (profile)
Status: No Feedback Package: Compile Warning
PHP Version: 5.5.12 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: spam2 at rhsoft dot net
New email:
PHP Version: OS:


 [2014-05-05 13:04 UTC] spam2 at rhsoft dot net
./configure: line 5388: test: too many arguments

5388: if test $GCC_MAJOR_VERSION -ge 4; then

what about set $GCC_MAJOR_VERSION in quotes like
if test "$GCC_MAJOR_VERSION" -ge 4; then

everytime configure PHP segfaults are happening
[219319.997892] conftest[31878]: segfault at 1 ip 00007f7c98d4e445 sp 00007fff7118e0a0 error 4 in[7f7c98d0b000+109000]


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-05 19:05 UTC]
-Status: Open +Status: Feedback
 [2014-05-05 19:05 UTC]
We'll probably need more detail here:

1. What distribution (and version) are you running?
2. Is there anything unusual about your build environment, or is it the standard set of packages for whatever distro you're using?
3. How did you get the PHP source code: via the 5.5.12 tarball, or via git?
 [2014-05-05 19:09 UTC] spam2 at rhsoft dot net
-Status: Feedback +Status: Open
 [2014-05-05 19:09 UTC] spam2 at rhsoft dot net
official tarball, derivated fedora build with minimzed dependencies

[builduser@buildserver64:/rpmbuild/SPECS]$ cat php.spec
%global            runselftest      0
%global            apiver           20121113
%global            zendver          20121212
%global            pdover           20080721
%global            isasuffix        -%{__isa}
%global            debug_package    %{nil}

%{!?_httpd_apxs:   %{expand: %%global _httpd_apxs   %%{_sbindir}/apxs}}
%{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}}

Summary:           PHP scripting language for creating dynamic web sites
Name:              php 
Version:           5.5.12
Release:           7%{?dist}
License:           PHP/Zend/BSD
Group:             Development/Languages
Source0: {version}.tar.bz2
Source1:           macros.php
Source2:           opcache-zendoptimizer.php
Patch1:            php-dlopen.patch
Patch2:            php-phpinfo.patch
BuildRequires:     aspell-devel
BuildRequires:     bzip2
BuildRequires:     bzip2-devel
BuildRequires:     curl-devel
BuildRequires:     cyrus-sasl-devel
BuildRequires:     enchant-devel
BuildRequires:     freetype-devel
BuildRequires:     gcc-c++
BuildRequires:     gmp-devel
BuildRequires:     httpd-devel
BuildRequires:     krb5-devel
BuildRequires:     libc-client-devel
BuildRequires:     libedit-devel
BuildRequires:     libicu-devel
BuildRequires:     libjpeg-turbo-devel                                                                                          
BuildRequires:     libmcrypt-devel                                                                                              
BuildRequires:     libpng-devel                                                                                                 
BuildRequires:     libstdc++-devel                                                                                              
BuildRequires:     libtidy-devel                                                                                                
BuildRequires:     libtool                                                                                                      
BuildRequires:     libtool-ltdl-devel                                                                                           
BuildRequires:     libxml2-devel                                                                                                
BuildRequires:     libxslt-devel
BuildRequires:     openssl-devel
BuildRequires:     pam-devel
BuildRequires:     pcre-devel
BuildRequires:     perl
BuildRequires:     postgresql-devel
BuildRequires:     smtpdaemon
BuildRequires:     sqlite-devel
BuildRequires:     unixODBC-devel
BuildRequires:     zlib-devel
Provides:          mod_php = %{version}-%{release}
Requires:          php-common%{?_isa} = %{version}-%{release}
Requires:          php-cli%{?_isa} = %{version}-%{release}
Requires(pre):     httpd

%{?filter_provides_in: %filter_provides_in %{_libdir}/php/modules/.*\.so$}
%{?filter_provides_in: %filter_provides_in %{_httpd_moddir}/.*\.so$}

PHP is an HTML-embedded scripting language

%package           cli
Summary:           Command-line interface for PHP
Requires:          php-common%{?_isa} = %{version}-%{release}       
Provides:          php-cgi = %{version}-%{release}, php-cgi%{?_isa} = %{version}-%{release}, php-readline, php-readline%{?_isa}
%description       cli

%package           common
Summary:           Common files for PHP
Provides:          php-api = %{apiver}, php(api) = %{apiver}
Provides:          php-zend-abi = %{zendver}, php(zend-abi) = %{zendver}
Provides:          php(language) = %{version}, php(language)%{?_isa} = %{version}
Provides:          php-core = %{version}, php-core%{?_isa} = %{version}
Provides:          php-standard = %{version}, php-standard%{?_isa} = %{version}
Provides:          php-bz2, php-bz2%{?_isa}
Provides:          php-calendar, php-calendar%{?_isa} 
Provides:          php-ctype, php-ctype%{?_isa}
Provides:          php-curl, php-curl%{?_isa}
Provides:          php-date, php-date%{?_isa}
Provides:          php-ereg, php-ereg%{?_isa}
Provides:          php-exif, php-exif%{?_isa}
Provides:          php-fileinfo, php-fileinfo%{?_isa}
Provides:          php-filter, php-filter%{?_isa}
Provides:          php-ftp, php-ftp%{?_isa}
Provides:          php-gettext, php-gettext%{?_isa}
Provides:          php-gmp, php-gmp%{?_isa}
Provides:          php-hash, php-hash%{?_isa}
Provides:          php-iconv, php-iconv%{?_isa}
Provides:          php-json, php-json%{?_isa}
Provides:          php-jsonphp-json, php-jsonphp-json%{?_isa}          
Provides:          php-libxml, php-libxml%{?_isa}
Provides:          php-mhash, php-mhash%{?_isa}
Provides:          php-openssl, php-openssl%{?_isa}
Provides:          php-pcre, php-pcre%{?_isa}
Provides:          php-pecl-Fileinfo, php-pecl-Fileinfo%{?_isa}
Provides:          php-pecl(Fileinfo), php-pecl(Fileinfo)%{?_isa}
Provides:          php-pecl-json, php-pecl-json%{?_isa}
Provides:          php-pecl(json), php-pecl(json)%{?_isa}
Provides:          php-pecl-phar, php-pecl-phar%{?_isa}
Provides:          php-pecl(phar), php-pecl(phar)%{?_isa}     
Provides:          php-pecl-zip, php-pecl-zip%{?_isa}
Provides:          php-pecl(zip), php-pecl(zip)%{?_isa}
Provides:          php-phar, php-phar%{?_isa}
Provides:          php-reflection, php-reflection%{?_isa}
Provides:          php-session, php-session%{?_isa}
Provides:          php-simplexml, php-simplexml%{?_isa}
Provides:          php-sockets, php-sockets%{?_isa}
Provides:          php-spl, php-spl%{?_isa}
Provides:          php-tokenizer, php-tokenizer%{?_isa}
Provides:          php-zip, php-zip%{?_isa}
Provides:          php-zlib, php-zlib%{?_isa}
Obsoletes:         php-json
Obsoletes:         php-openssl
Obsoletes:         php-pecl-Fileinfo
Obsoletes:         php-pecl-json
Obsoletes:         php-pecl-phar
Obsoletes:         php-pecl-zip
# begin lounge-hacks (we distribute pear outside the php-tree)
Obsoletes:         php-interbase
Obsoletes:         php-pear
Obsoletes:         php-pear-Auth-SASL
Obsoletes:         php-pear-Mail-Mime
Obsoletes:         php-pear-Mail-mimeDecode
Obsoletes:         php-pear-Net-IDNA2
Obsoletes:         php-pear-Net-SMTP
Obsoletes:         php-pear-Net-Socket
Obsoletes:         php-php-gettext
Obsoletes:         php-snmp
Provides:          %{_bindir}/pear
Provides:          %{_bindir}/pecl
Provides:          php-pear
Provides:          php-pear-Auth-SASL
Provides:          php-pear-Mail-Mime
Provides:          php-pear-Mail-mimeDecode
Provides:          php-pear-Net-IDNA2
Provides:          php-pear-Net-SMTP
Provides:          php-pear-Net-Socket
Provides:          php-php-gettext
# end lounge-hacks (we distribute pear outside the php-tree)
%description       common

%package           devel
Summary:           Files needed for building PHP extensions
Requires:          php-cli%{?_isa} = %{version}-%{release}
Requires:          autoconf
Requires:          automake
Requires:          pcre-devel%{?_isa}
Obsoletes:         php-pecl-pdo-devel
%description       devel

%package           opcache
Summary:           The Zend OPcache provides faster PHP execution through opcode caching and optimization
Provides:          php-pecl-zendopcache, php-pecl-zendopcache%{?_isa}, php-pecl(opcache), php-pecl(opcache)%{?_isa}
%description       opcache

%package           pdo
Summary:           A database access abstraction module for PHP applications
Provides:          php-pdo-abi, php(pdo-abi)
%description       pdo

%package           mysqlnd
Summary:           A native module for PHP applications that use MySQL databases
Requires:          php-pdo%{?_isa} = %{version}-%{release}
Provides:          php_database
Provides:          php-mysql = %{version}-%{release}, php-mysql%{?_isa} = %{version}-%{release}
Provides:          php-mysqli = %{version}-%{release}, php-mysqli%{?_isa} = %{version}-%{release}
Provides:          php-pdo_mysql, php-pdo_mysql%{?_isa}
Obsoletes:         php-mysql
%description       mysqlnd

%package           sqlite
Summary:           A sqlite database module for PHP
Provides:          php-sqlite3, php-sqlite3%{?_isa}, php-pdo_sqlite, php-pdo_sqlite%{?_isa}
%description       sqlite

%package           pgsql
Summary:           A PostgreSQL database module for PHP
Requires:          php-pdo%{?_isa} = %{version}-%{release}, php-pdo_pgsql, php-pdo_pgsql%{?_isa}
%description       pgsql

%package           process
Summary:           Modules for PHP script using system process interfaces
Provides:          php-pcntl, php-pcntl%{?_isa}
Provides:          php-posix, php-posix%{?_isa}
Provides:          php-shmop, php-shmop%{?_isa}
Provides:          php-sysvmsg, php-sysvmsg%{?_isa}
Provides:          php-sysvsem, php-sysvsem%{?_isa}
Provides:          php-sysvshm, php-sysvshm%{?_isa}
%description       process

%package           odbc
Summary:           A module for PHP applications that use ODBC databases
Provides:          php_database
Provides:          php-pdo_odbc, php-pdo_odbc%{?_isa}
%description       odbc

%package           xml
Summary:           A module for PHP applications which use XML
Obsoletes:         php-domxml, php-dom
Provides:          php-dom, php-dom%{?_isa}
Provides:          php-domxml, php-domxml%{?_isa}
Provides:          php-wddx, php-wddx%{?_isa}
Provides:          php-xmlreader, php-xmlreader%{?_isa}
Provides:          php-xmlwriter, php-xmlwriter%{?_isa}
Provides:          php-xsl, php-xsl%{?_isa}
%description       xml

%package           imap
Summary:           A module for PHP applications that use IMAP
%description       imap

%package           soap
Summary:           A module for PHP applications that use the SOAP protocol
%description       soap

%package           xmlrpc
Summary:           A module for PHP applications which use the XML-RPC protocol
%description       xmlrpc

%package           mbstring
Summary:           A module for PHP applications which need multi-byte string handling
%description       mbstring

%package           gd
Summary:           A module for PHP applications for using the gd graphics library
%description       gd

%package           bcmath
Summary:           A module for PHP applications for using the bcmath library
%description       bcmath

%package           mcrypt
Summary:           Standard PHP module provides mcrypt library support
%description       mcrypt

%package           tidy
Summary:           Standard PHP module provides tidy library support
%description       tidy

%package           pspell
Summary:           A module for PHP applications for using pspell interfaces
%description       pspell

%package           intl
Summary:           Internationalization extension for PHP applications
%description       intl

%package           enchant
Summary:           Human Language and Character Encoding Support
%description       enchant

%setup -q -n php-%{version}
%patch1 -p1
%patch2 -p1

# multiple builds for multiple SAPIs
mkdir build-apache

# drop some windows specific and not needed headers to avoid installation
rm -f TSRM/tsrm_win32.h TSRM/tsrm_config.w32.h Zend/zend_config.w32.h ext/mysqlnd/config-win.h ext/standard/winver.h main/win32_internal_function_disabled.h main/win95nt.h

# fix some bogus permissions
find . -name \*.[ch] -exec chmod 644 {} \;

# aclocal workaround - to be improved
cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 >> aclocal.m4

# force use of system libtool
libtoolize --force --copy
cat `aclocal --print-ac-dir`/{libtool,ltoptions,ltsugar,ltversion,lt~obsolete}.m4 > build/libtool.m4

# regenerate configure scripts (patches change config.m4's)
./buildconf --force

# compiler and linker flags
export CFLAGS="%{optflags} -fPIC -fPIE -fno-strict-aliasing -Wno-pointer-sign"
export CXXFLAGS="%{optflags} -fPIC -fPIE -fno-strict-aliasing -Wno-pointer-sign"
export LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z,noexecstack -pie %{optflags} -fno-strict-aliasing -Wno-pointer-sign"
export SH_LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z,noexecstack -pie %{optflags} -fno-strict-aliasing -Wno-pointer-sign"

# define directory for extensions
EXTENSION_DIR=%{_libdir}/php/modules; export EXTENSION_DIR

# configure and build a PHP tree
pushd build-apache
mkdir Zend && cp ../Zend/zend_{language,ini}_{parser,scanner}.[ch] Zend
ln -sf ../configure
%configure \
 --cache-file=../config.cache \
 --disable-cgi \
 --disable-dba \
 --disable-debug \
 --disable-flatfile \
 --disable-gd-jis-conv \
 --disable-inifile \
 --disable-ipv6 \
 --disable-rpath \
 --without-cdb \
 --without-db1 \
 --without-db2 \
 --without-db3 \
 --without-db4 \
 --without-dbm \
 --without-gdbm \
 --without-interbase \
 --without-ldap \
 --without-ldap-sasl \
 --without-mssql \
 --without-mysql \
 --without-ndbm \
 --without-pdo-dblib \
 --without-pdo-firebird \
 --without-pear \
 --without-qdbm \
 --without-readline \
 --without-recode \
 --without-snmp \
 --without-tcadb \
 --without-vpx-dir \
 --without-xpm-dir \
 --without-t1lib \
 --enable-calendar \
 --enable-cli \
 --enable-exif \
 --enable-gd-native-ttf \
 --enable-pie \
 --enable-xml \
 --with-bz2 \
 --with-config-file-path=%{_sysconfdir} \
 --with-config-file-scan-dir=%{_sysconfdir}/php.lounge.d \
 --with-freetype-dir=%{_prefix} \
 --with-jpeg-dir=%{_prefix} \
 --with-kerberos \
 --with-layout=GNU \
 --with-libdir=%{_lib} \
 --with-libxml-dir=%{_prefix} \
 --with-mhash \
 --with-openssl \
 --with-pcre-regex=%{_prefix} \
 --with-pic \
 --with-png-dir=%{_prefix} \
 --with-zlib \
 --with-apxs2=%{_httpd_apxs} \
 --enable-bcmath=shared \
 --enable-dom=shared \
 --enable-fileinfo=shared \
 --enable-ftp=shared \
 --enable-intl=shared \
 --enable-json=shared \
 --enable-mbregex \
 --enable-mbstring=shared \
 --enable-opcache=shared \
 --enable-pcntl=shared \
 --enable-pdo=shared \
 --enable-phar=shared \
 --enable-posix=shared \
 --enable-shmop=shared \
 --enable-soap=shared \
 --enable-sockets=shared \
 --enable-sysvmsg=shared \
 --enable-sysvsem=shared \
 --enable-sysvshm=shared \
 --enable-wddx=shared \
 --enable-xmlreader=shared \
 --enable-xmlwriter=shared \
 --enable-zip=shared \
 --libdir=%{_libdir}/php \
 --with-curl=shared,%{_prefix} \
 --with-enchant=shared,%{_prefix} \
 --with-gd=shared \
 --with-gettext=shared \
 --with-gmp=shared \
 --with-iconv=shared \
 --with-icu-dir=%{_prefix} \
 --with-imap=shared \
 --with-imap-ssl \
 --with-libedit \
 --with-mcrypt=shared,%{_prefix} \
 --with-mysqli=shared,mysqlnd \
 --with-mysql-sock=%{_sharedstatedir}/mysql/mysql.sock \
 --with-pdo-mysql=shared,mysqlnd \
 --with-pdo-odbc=shared,unixODBC,%{_prefix} \
 --with-pdo-pgsql=shared,%{_prefix} \
 --with-pdo-sqlite=shared,%{_prefix} \
 --with-pgsql=shared \
 --with-pspell=shared \
 --with-sqlite3=shared,%{_prefix} \
 --with-tidy=shared,%{_prefix} \
 --with-unixODBC=shared,%{_prefix} \
 --with-xmlrpc=shared \
if test $? != 0; then
 tail -500 config.log
 : configure failed
 exit 1
%{__make} %{?_smp_mflags}

%if %runselftest
 ulimit -s 32712
 cd build-apache
 export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2 MYSQL_TEST_HOST="localhost" MYSQL_TEST_PORT="3306" MYSQL_TEST_USER="php_autotest" MYSQL_TEST_PASSWD="*************" MYSQL_TEST_DB="php_autotest" PDO_MYSQL_TEST_HOST="localhost" PDO_MYSQL_TEST_SOCKET="%{_sharedstatedir}/mysql/mysql.sock" PDO_MYSQL_TEST_USER="php_autotest" PDO_MYSQL_TEST_PASS="php_autotest" PDO_MYSQL_TEST_DB="php_autotest" PDO_MYSQL_TEST_ENGINE="MyISAM"
 if ! make test; then
  set +x
  for f in `find .. -name \*.diff -type f -print`; do
   echo "TEST FAILURE: $f --"
   cat "$f"
   echo "-- $f result ends."
  set -x

make -C build-apache install-cli install-modules install-headers INSTALL_ROOT=%{buildroot}
install -m 755 -d %{buildroot}%{_sysconfdir}/
install -m 755 -d %{buildroot}%{_datadir}/php
install -m 755 -d %{buildroot}%{_httpd_moddir}
install -m 755 build-apache/libs/ %{buildroot}%{_httpd_moddir}
install -m 755 build-apache/sapi/cli/php %{buildroot}%{_bindir}
install -m 755 build-apache/scripts/php-config %{buildroot}%{_bindir}
install -m 755 build-apache/scripts/phpize %{buildroot}%{_bindir}
install -m 755 build-apache/ext/phar/phar.phar %{buildroot}%{_bindir}
install -m 755 -d %{buildroot}%{_libdir}/php/build/
install build/* %{buildroot}%{_libdir}/php/build/
install scripts/Makefile.frag %{buildroot}%{_libdir}/php/build/
install scripts/ %{buildroot}%{_libdir}/php/build/
install scripts/ %{buildroot}%{_libdir}/php/build/
install scripts/phpize.m4 %{buildroot}%{_libdir}/php/build/
install acinclude.m4 %{buildroot}%{_libdir}/php/build/
install %{buildroot}%{_libdir}/php/build/
install config.sub %{buildroot}%{_libdir}/php/build/
install config.guess %{buildroot}%{_libdir}/php/build/
install %{buildroot}%{_libdir}/php/build/
install run-tests*.php %{buildroot}%{_libdir}/php/build/
rm -rf %{buildroot}%{_mandir}
(cd %{buildroot}%{_bindir}; ln -sfn phar.phar phar)

# install the macros file and opcache-statistics script
install -d %{buildroot}%{_sysconfdir}/rpm
sed -e "s/@PHP_APIVER@/%{apiver}%{isasuffix}/" -e "s/@PHP_ZENDVER@/%{zendver}%{isasuffix}/" -e "s/@PHP_PDOVER@/%{pdover}%{isasuffix}/" -e "s/@PHP_VERSION@/%{version}/" < %{SOURCE1} > macros.php
install -m 644 -c macros.php %{buildroot}%{_sysconfdir}/rpm/macros.php 
install -m 0644 %{SOURCE2} %{buildroot}%{_datarootdir}/php/zendoptimizer.php 

# remove unpackaged files and strip debuginfos
rm -rf %{buildroot}%{_libdir}/php/modules/*.a %{buildroot}%{_bindir}/{phptar} %{buildroot}%{_datadir}/pear %{buildroot}%{_libdir}/
strip -s %{buildroot}%{_httpd_moddir}/ %{buildroot}%{_libdir}/php/modules/*.so %{buildroot}%{_bindir}/php

%attr(755,root,root) %{_httpd_moddir}/

%files common
%dir %{_datadir}/php
%dir %{_libdir}/php
%dir %{_libdir}/php/modules

%files opcache

%files pgsql

%files odbc

%files imap

%files xml

%files xmlrpc

%files mbstring

%files gd

%files soap

%files bcmath

%files pdo

%files sqlite

%files mcrypt

%files tidy

%files pspell

%files intl

%files process

%files enchant

%files mysqlnd

%files cli

%files devel
%config %{_sysconfdir}/rpm/macros.php

 [2021-10-26 11:16 UTC]
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-10-26 11:16 UTC]
Does still still happen to you with any of the actively supported
PHP versions[1]?

[1] <>
 [2021-11-07 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Dec 07 19:05:52 2022 UTC