php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75165 libzip package on windows.php.net doesn't include DLLs
Submitted: 2017-09-06 18:55 UTC Modified: 2017-09-07 10:54 UTC
From: dktapps at pmmp dot io Assigned: ab (profile)
Status: Closed Package: Compile Failure
PHP Version: 7.2.0RC1 OS: Windows 10
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dktapps at pmmp dot io
New email:
PHP Version: OS:

 

 [2017-09-06 18:55 UTC] dktapps at pmmp dot io
Description:
------------
This libzip package http://windows.php.net/downloads/php-sdk/deps/vc15/x64/libzip-1.3.0-v15-x64.zip does not include the DLLs required to build PHP with the zip extension, resulting in a compile failure.

Reverting to the archived 1.2.0 package here http://windows.php.net/downloads/php-sdk/deps/archives/vc15/x64/libzip-1.2.0-v15-x64.zip resolved the problem.

Expected result:
----------------
Successful compilation with prebuilt libzip 1.3.0

Actual result:
--------------
The following compile error:

libzip_a.lib(zip_algorithm_bzip2.obj) : error LNK2019: unresolved external symbol BZ2_bzCompressInit referenced in function start
libzip_a.lib(zip_algorithm_bzip2.obj) : error LNK2019: unresolved external symbol BZ2_bzCompress referenced in function process
libzip_a.lib(zip_algorithm_bzip2.obj) : error LNK2019: unresolved external symbol BZ2_bzCompressEnd referenced in function end
libzip_a.lib(zip_algorithm_bzip2.obj) : error LNK2019: unresolved external symbol BZ2_bzDecompressInit referenced in function start
libzip_a.lib(zip_algorithm_bzip2.obj) : error LNK2019: unresolved external symbol BZ2_bzDecompress referenced in function process
libzip_a.lib(zip_algorithm_bzip2.obj) : error LNK2019: unresolved external symbol BZ2_bzDecompressEnd referenced in function end

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-07 10:24 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2017-09-07 10:24 UTC] ab@php.net
Thanks for the report. What is your configure command?

The reason for no DLLs is because the 1.3.0's cmake scripts now produce projects for static build only. I'm not sure about the reasons and as ext/zip is compiled statically for the standard build, seemed ok for me. Lets check further.

Thanks.
 [2017-09-07 10:25 UTC] ab@php.net
I see you link libzip_a.lib, so in that case please check you've rerun buildconf, too.

Thanks.
 [2017-09-07 10:37 UTC] dktapps at pmmp dot io
-Status: Feedback +Status: Open
 [2017-09-07 10:37 UTC] dktapps at pmmp dot io
My build system deletes and recreates the environment for every build, so buildconf is always run and the dependencies are always freshly downloaded.

buildconf has been run immediately after installing dependencies using the Windows SDK.

My configure command is: `configure --disable-all --enable-cli --enable-zip`
 [2017-09-07 10:48 UTC] dktapps at pmmp dot io
I missed `--enable-zlib` from the configure in the last comment.

It compiles correctly with `configure --disable-all --enable-cli --enable-zip --enable-zlib --with-bz2`, however `--with-bz2` was not previously necessary.
 [2017-09-07 10:51 UTC] ab@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ab
 [2017-09-07 10:51 UTC] ab@php.net
Thanks for the additional info. I see what went wrong now. Of course RC1 is not prepared for libzip-1.3.0 but it was marked stable. I've just reverted the stable series to use libzip-1.2.0, so with that it should be fine. Alternatively you can use http://git.php.net/?p=php-src.git;a=commitdiff;h=b9710873540f98bff8be25ac240d106c15d6b784 to be able to build RC1 with the upgraded libzip. There might be still an issue when building shared, but that should be another matter for another ticket. For now the fix is in place, libzip-1.3.0 will be marked stable after the RC2.

Thanks.
 [2017-09-07 10:54 UTC] ab@php.net
Yeah, usually you can omit this if using --enable-snapshot-build as the default configuration will find the correct options. ext/bz2 is shared by default, not sure you'd want to have it static.

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 15:01:30 2024 UTC