Edit report at https://bugs.php.net/bug.php?id=65113&edit=1
ID: 65113 User updated by: mi+php at aldan dot algebra dot com Reported by: mi+php at aldan dot algebra dot com Summary: configure fails to "determine sizeof long int" when using SunStudio compilers Status: Open Type: Bug Package: *Configuration Issues Operating System: SunOS 5.10 PHP Version: 5.4.16 Block user comment: N Private report: N New Comment: The patch I just added solves the problem here, but I doubt, it is suitable for general case. I uploaded it more for illustration than anything... Previous Comments: ------------------------------------------------------------------------ [2013-06-24 18:51:56] mi+php at aldan dot algebra dot com Description: ------------ For some reason, configure invokes $CC with -lstdc++ (among other libraries), which causes a problem with Sun's C-compiler -- the library should only be used with a C++ compiler... I guess, GNU C just finds it anyway, but that should not be relied upon... configure:117875: checking for long int configure:117905: cc -c -I/opt/csw/include -xstrconst -xO3 -xarch=sparcfmaf -fma=fused -m32 -xmemalign=8s -D_POSIX_PTHREAD_SEMANTICS conftest.c >&5 configure:117911: $? = 0 configure:117926: result: yes configure:117933: checking size of long int configure:118235: cc -o conftest -I/opt/csw/include -xstrconst -xO3 -xarch=sparcfmaf -fma=fused -m32 -xmemalign=8s -D_POSIX_PTHREAD_ SEMANTICS -L/opt/csw/lib -L/usr/ucblib -L/opt/csw/lib -L/usr/sfw/lib conftest.c -lreadline -lncurses -laspell -lpspell -lstdc++ -lgm p -lintl -lcurl -lbz2 -lz -lrt -lm -lnsl -lsocket -lxml2 -lz -lm -lsocket -lnsl -lssl -lcrypto -lsocket -lnsl -ldl -lcurl -lidn -lss l -lcrypto -llber -lldap -lsocket -lnsl -lz -lssl -lcrypto -lsocket -lnsl -ldl -lm -licui18n -licuuc -licudata -lm -licuio -lxml2 -lz -lm -lsocket -lnsl >&5 "conftest.c", line 540: warning: statement not reached configure:118238: $? = 0 configure:118244: ./conftest ld.so.1: conftest: fatal: libstdc++.so.6: open failed: No such file or directory ./configure: line 118245: 5239 Killed ./conftest$ac_exeext configure:118247: $? = 137 configure: program exited with status 137 Why does it bother with libstdc++ at all? Test script: --------------- + CC=cc + CXX=CC + CFLAGS='-xstrconst -xO3' + CFLAGS='-xstrconst -xO3 -xarch=sparcfmaf -fma=fused -m32' + CURL_DIR=/opt/csw + export CURL_DIR + IMAP_DIR=/opt/csw + export IMAP_DIR + IMAP_INC_DIR=/opt/csw/include/imap + export IMAP_INC_DIR + export CC + export CXX + export CFLAGS + CFLAGS='-xstrconst -xO3 -xarch=sparcfmaf -fma=fused -m32' + export CFLAGS + CXXFLAGS=%cxx_optflags + export CXXFLAGS + FFLAGS='-O2 -g -pipe' + export FFLAGS + ./configure --host=sparc-sun-solaris2.10 --build=sparc-sun-solaris2.10 --target=sparc-sun-solaris2.10 --program-prefix= --prefix=/data/timeinc/packages/ti_php54 --exec-prefix=/data/timeinc/packages/ti_php54 --bindir=/data/timeinc/packages/ti_php54/bin --sbindir=/data/timeinc/packages/ti_php54/sbin --sysconfdir=/data/timeinc/packages/ti_php54/etc --datadir=/data/timeinc/packages/ti_php54/share --includedir=/data/timeinc/packages/ti_php54/include --libdir=/data/timeinc/packages/ti_php54/lib --libexecdir=/data/timeinc/packages/ti_php54/libexec --localstatedir=/data/timeinc/packages/ti_php54/var --sharedstatedir=/data/timeinc/packages/ti_php54/com --mandir=/data/timeinc/packages/ti_php54/share/man --infodir=/data/timeinc/packages/ti_php54/share/info --prefix=/data/timeinc/packages/ti_php54 --cache-file=../config.cache --with-libdir=lib --mandir=/data/timeinc/man/ --with-config-file-path=/data/timeinc/packages/ti_php54/etc --with-config_file-scan-dir=/data/timeinc/packages/ti_php54/php.d --disable-debug --with-pic --disable-rpath --with-pear=/data/timeinc/packages/ti_php54/pear --with-bz2 --with-curl --enable-gd-native-ttf --with-jpeg-dir=/usr --with-xpm-dir=/usr --without-gdbm --with-gettext --with-gmp --with-mhash --with-iconv --with-openssl --with-kerberos --with-pspell --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --enable-ucd-snmp-hack --with-unixODBC=shared --enable-shmop --enable-calendar --with-tidy=shared --with-mcrypt=shared --with-sqlite3=shared --enable-intl --sysconfdir=/data/timeinc/packages/ti_php54/etc --disable-ipv6 --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl --with-mysql=shared,/opt/csw --with-mysqli=shared,/opt/csw/bin/mysql_config --with-pdo-mysql=shared,/opt/csw --enable-dom=shared --with-pgsql=shared --with-sybase-ct=shared,/data/timeinc/packages/ti_sybase_ocs/OCS-15_0 --with-snmp=shared --enable-soap=shared --with-xsl=shared --enable-xmlreader=shared --enable-xmlwriter=shared --enable-pdo=shared --with-pdo-odbc=shared,unixODBC --with-pdo-pgsql=shared --with-pdo-sqlite=shared --enable-json=shared --enable-zip=shared --disable-ipv6 --with-readline configure: creating cache ../config.cache checking for grep that handles long lines and -e... /usr/sfw/bin/ggrep ... checking for Sybase-CT support... yes, shared checking for long int... yes checking size of long int... configure: error: cannot compute sizeof (long int) See `config.log' for more details. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65113&edit=1