Edit report at https://bugs.php.net/bug.php?id=68302&edit=1
ID: 68302
Comment by: showerheadsuk at hotmail dot com
Reported by: 0kaba0 at gmail dot com
Summary: impossible to compile php with zip support
Status: Open
Type: Bug
Package: Compile Failure
Operating System: Centos 6.5
PHP Version: 5.6.2
Block user comment: N
Private report: N
New Comment:
I had the same problem when trying to compile PHP 5.6.5. Eventually I managed to track it down to
using tidy-nu ( https://github.com/geoffmcl/tidy-fork/tree/geoffmcl-restart
) rather than tidy
Previous Comments:
------------------------------------------------------------------------
[2014-12-21 18:19:24] avarsanov at yahoo dot com
I had the same error, while compiling PHP (5.6.4, but that does not matter, because I tried als PHP
5.6.3 and was reproducable) on Debian GNU/Linux. I saw that problem when I forgot to set
LD_LIBRARY_PATH environment variable.
So doing it like that solved my problem:
$ export LD_LIBRARY_PATH=/usr/local/mysql/lib
$ ./configure --enable-fpm --with-mcrypt --with-zlib --with-curl --disable-debug --disable-rpath
--enable-inline-optimization --with-bz2 --enable-sockets --enable-zip --with-fpm-user=www-data
--with-fpm-group=www-data --with-mysql=/usr/local/mysql/
$ make
$ make test
# export LD_LIBRARY_PATH=/usr/local/mysql/lib
# make install
------------------------------------------------------------------------
[2014-10-24 19:38:15] 0kaba0 at gmail dot com
# uname -i
x86_64
# rpm -qa | grep gcc
libgcc-4.4.7-4.el6.x86_64
gcc-c++-4.4.7-4.el6.x86_64
gcc-4.4.7-4.el6.x86_64
I tried to compile PHP 5.6 with following keys:
#./configure --enable-zip --with-libzip
and this is not generate any errors.
But if I use the following keys:
#./configure --enable-zip --with-libzip --with-xsl=/opt/xslt
then I receive the following error:
checking for libzip... from pkgconfig: version 0.11.2 found in /usr/lib64
checking for zip_open in -lzip... no
configure: error: could not find usable libzip
If I use the following keys:
#./configure --enable-zip --with-xsl=/opt/xslt
then its done without errors, but compilation is stopped with first error.
Compiling a different version of PHP (5.3, 5.4 or 5.5) with this xslt library does not cause such
problem.
Any ideas ?
------------------------------------------------------------------------
[2014-10-24 17:05:47] aharvey@php.net
PHP 5.6.2 with --enable-zip builds OK for me on a stock CentOS 6.5 x86-64 VM (and passes the test
suite). What architecture and compiler are you running on?
Beyond that, the best thing to do is probably to attempt to isolate what combination of configure
options causes the build to fail: start with ./configure --enable-zip, and then gradually
reintroduce each --with and --enable option until the build fails. My suspicion is that one of the
custom library builds that is being used is somehow stomping on the SIZEOF_OFF_T #define.
------------------------------------------------------------------------
[2014-10-24 16:43:23] 0kaba0 at gmail dot com
Description:
------------
Compilation fails with the error:
/bin/sh /usr/local/src/php-5.6.2/libtool --silent --preserve-dup-deps --mode=compile cc -Iext/zip/
-I/usr/local/src/php-5.6.2/ext/zip/ -DPHP_ATOM_INC -I/usr/local/src/php-5.6.2/include
-I/usr/local/src/php-5.6.2/main -I/usr/local/src/php-5.6.2 -I/usr/local/src/php-5.6.2/ext/date/lib
-I/usr/local/src/php-5.6.2/ext/ereg/regex -I/opt/xml2/include/libxml2 -I/opt/pcre/include
-I/opt/curlssl//include -I/usr/X11 -I/usr/include/freetype2 -I/opt/php_with_imap_client//include
-I/usr/local/src/php-5.6.2/ext/mbstring/oniguruma -I/usr/local/src/php-5.6.2/ext/mbstring/libmbfl
-I/usr/local/src/php-5.6.2/ext/mbstring/libmbfl/mbfl -I/opt/libmcrypt//include -I/usr/include/mysql
-I/opt/tidy//include -I/opt/xslt/include -I/opt/xslt//include -I/usr/local/src/php-5.6.2/ext/zip/lib
-I/usr/local/src/php-5.6.2/TSRM -I/usr/local/src/php-5.6.2/Zend -I/usr/include -g -O2
-fvisibility=hidden -prefer-pic -c /usr/local/src/php-5.6.2/ext/zip/lib/zip_add.c -o
ext/zip/lib/zip_add.lo
In file included from /usr/local/src/php-5.6.2/ext/zip/lib/zip_add.c:37:
/usr/local/src/php-5.6.2/ext/zip/lib/zipint.h:118:2: error: #error unsupported size of off_t
make: *** [ext/zip/lib/zip_add.lo] Error 1
Test script:
---------------
./configure \
--prefix=/usr/local/php/5.6 \
--exec-prefix=/usr/local/php/5.6 \
--with-config-file-path=/usr/local/php/5.6 \
--disable-fileinfo \
--enable-bcmath \
--enable-calendar \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-libxml \
--enable-mbstring \
--enable-soap \
--enable-sockets \
--enable-wddx \
--with-bz2 \
--enable-zip \
--with-curl=/opt/curlssl/ \
--with-freetype-dir=/usr \
--with-gd \
--with-gettext \
--with-imap=/opt/php_with_imap_client/ \
--with-imap-ssl=/usr \
--with-jpeg-dir=/usr \
--with-kerberos \
--with-libdir=lib64 \
--with-libexpat-dir=/usr \
--with-libxml-dir=/opt/xml2 \
--with-libxml-dir=/opt/xml2/ \
--with-mcrypt=/opt/libmcrypt/ \
--with-mysql=/usr \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-mysqli=/usr/bin/mysql_config \
--with-openssl=/usr \
--with-openssl-dir=/usr \
--with-pcre-regex=/opt/pcre \
--with-sqlite3=shared \
--enable-pdo=shared \
--with-pdo-mysql=shared \
--with-pdo-sqlite=shared,/usr \
--with-pdo-pgsql=shared \
--with-pgsql=/usr \
--with-pic \
--with-png-dir=/usr \
--with-tidy=/opt/tidy/ \
--with-xmlrpc \
--with-xpm-dir=/usr \
--with-xsl=/opt/xslt/ \
--with-zlib \
--with-zlib-dir=/usr \
--with-iconv \
--enable-cli
Expected result:
----------------
compile without error
Actual result:
--------------
error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68302&edit=1