Bug #81613 [NEW]: impossible to compile php with zip support
From: mtbox74 at gmail dot com
Operating system: Xubuntu 18.04
PHP version: 7.4.25
Package: Compile Failure
Bug Type: Bug
Bug description:impossible to compile php with zip support
Description:
------------
I'm getting this error when combining --with-zlib --with-zip
--with-pdo-pgsql. It says:
ext/zip/.libs/php_zip.o: In function `c_ziparchive_setEncryptionName':
/trusty/Downloads/php-7.4.25/ext/zip/php_zip.c:2254: undefined reference
to `zip_file_set_encryption'
ext/zip/.libs/php_zip.o: In function `c_ziparchive_setEncryptionIndex':
/trusty/Downloads/php-7.4.25/ext/zip/php_zip.c:2278: undefined reference
to `zip_file_set_encryption'
ext/zip/.libs/php_zip.o: In function `zm_startup_zip':
/trusty/Downloads/php-7.4.25/ext/zip/php_zip.c:3199: undefined reference
to `zip_libzip_version'
ext/zip/.libs/php_zip.o: In function `zm_info_zip':
/trusty/Downloads/php-7.4.25/ext/zip/php_zip.c:3233: undefined reference
to `zip_libzip_version'
collect2: error: ld returned 1 exit status
Makefile:293: recipe for target 'sapi/cli/php' failed
make: *** [sapi/cli/php] Error 1
If I remove --with-pdo-pgsql no errors appears.
I've installed manually zlib 1.5.2 to use encryptions methods provided
by zip.
I can compile with pdo-mysql but not with pdo-pgsql :(
I got the same error compiling against latest version of php7.3 &
PHP8.0
The workaround I found is to compile zip as a dynamic extension.
Full Trace:
https://gist.github.com/nordin74/e56b02c12ca2f1483bee988ea6f73bf5
Test script:
---------------
./configure \
--prefix=/home/will/php_7.4_fpm \
--with-curl \
--with-xsl \
--with-pdo-mysql \
--enable-soap \
--enable-mbstring \
--enable-bcmath \
--enable-sockets \
--enable-calendar \
--enable-exif \
--enable-ftp \
--with-openssl \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--with-bz2=/usr \
--with-gettext \
--enable-gd \
--with-freetype \
--with-mysqli \
--with-readline \
--with-zlib \
--with-zip \
--enable-fpm \
--enable-opcache \
--with-jpeg \
--enable-intl \
--enable-pcntl \
--enable-maintainer-zts \
--with-pdo-pgsql
Expected result:
----------------
compile without error
Actual result:
--------------
error
--
Edit bug report at https://bugs.php.net/bug.php?id=81613&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81613&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81613&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81613&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81613&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81613&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81613&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81613&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81613&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81613&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81613&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81613&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81613&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81613&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81613&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81613&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81613&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81613&r=mysqlcfg
Thread (5 messages)
- mtbox74 at gmail dot com