php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76564 ext/zip link issues
Submitted: 2018-07-02 18:40 UTC Modified: 2018-07-03 18:24 UTC
From: dktapps at pmmp dot io Assigned:
Status: Closed Package: Compile Failure
PHP Version: 7.3.0alpha2 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:

 

 [2018-07-02 18:40 UTC] dktapps at pmmp dot io
Description:
------------
zip extension has issues linking on 7.3.0alpha2 in both debug and release mode. This was also reproducible on the master branch, but not on 7.2.



Test script:
---------------
config.nice.bat

@echo off
cscript /nologo configure.js  "--disable-all" "--enable-cli" "--enable-zts" "--enable-zip" "--enable-debug-pack" %*


Expected result:
----------------
successful compilation

Actual result:
--------------
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_add referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_add_dir referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_file_comment referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_num_files referenced in function zif_zip_open@@16
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_rename referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_file_comment referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_close referenced in function php_zip_object_free_storage
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_close
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_delete referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_discard referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_error referenced in function php_zip_status
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_clear referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_code_zip referenced in function php_zip_status
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_code_system referenced in function php_zip_status_sys
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_fini referenced in function php_zip_status
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_error_fini
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_strerror referenced in function php_zip_free_entry
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_error_strerror
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fclose referenced in function php_zip_free_entry
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_fclose
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_add referenced in function php_zip_add_file
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_get_external_attributes referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_set_encryption referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_set_external_attributes referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fopen referenced in function php_zip_extract_file
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_fopen
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fopen_index referenced in function zif_zip_read@@16
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fread referenced in function zif_zip_entry_read@@16
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_fread
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_archive_comment referenced in function php_zipobj_get_zip_comment
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_name referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_name_locate referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_open referenced in function zif_zip_open@@16
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_open
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_archive_comment referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_default_password referenced in function php_zip_free_entry
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_set_default_password
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_file_compression referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_source_buffer referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_source_file referenced in function php_zip_add_file
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_source_free referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_stat referenced in function php_zip_free_entry
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_stat
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_stat_index referenced in function zif_zip_read@@16
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_strerror referenced in function php_zip_object_free_storage
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_unchange referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_unchange_all referenced in function php_zip_free_entry
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_unchange_archive referenced in function php_zip_free_entry
zip_stream.obj : error LNK2019: unresolved external symbol __imp_zip_file_get_error referenced in function php_stream_zip_open
C:\php-sdk\php\vc15\x64\php-src\x64\Release_TS\php7ts.dll : fatal error LNK1120: 40 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.exe"' : return code '0x460'
Stop.

shared/static and release/debug all have similar results

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-02 19:16 UTC] dktapps at pmmp dot io
further testing reveals only the following in release mode (fixable by linking zlib static lib)

libzip_a.lib(zip_error_strerror.obj) : error LNK2019: unresolved external symbol zError referenced in function zip_error_strerror
libzip_a.lib(zip_source_crc.obj) : error LNK2019: unresolved external symbol crc32 referenced in function crc_read
libzip_a.lib(zip_string.obj) : error LNK2001: unresolved external symbol crc32
libzip_a.lib(zip_source_pkware.obj) : error LNK2001: unresolved external symbol crc32
libzip_a.lib(zip_algorithm_deflate.obj) : error LNK2019: unresolved external symbol deflate referenced in function process
libzip_a.lib(zip_algorithm_deflate.obj) : error LNK2019: unresolved external symbol deflateEnd referenced in function end
libzip_a.lib(zip_algorithm_deflate.obj) : error LNK2019: unresolved external symbol inflate referenced in function process
libzip_a.lib(zip_algorithm_deflate.obj) : error LNK2019: unresolved external symbol inflateEnd referenced in function end
libzip_a.lib(zip_algorithm_deflate.obj) : error LNK2019: unresolved external symbol deflateInit2_ referenced in function start
libzip_a.lib(zip_algorithm_deflate.obj) : error LNK2019: unresolved external symbol inflateInit2_ referenced in function start
C:\pocketmine-php-sdk\php-src\x64\Release_TS\php7ts.dll : fatal error LNK1120: 8 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.exe"' : return code '0x460'
Stop.
 [2018-07-02 22:16 UTC] cmb@php.net
Adding `--enable-zlib` to the configure line appears to solve the
build failure.
 [2018-07-03 13:47 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e5ef7cbe8749554ed6ce67a1bd734f3c4cb3eb25
Log: Fixed bug #76564 ext/zip link issues
 [2018-07-03 13:47 UTC] ab@php.net
-Status: Open +Status: Closed
 [2018-07-03 18:24 UTC] dktapps at pmmp dot io
@ab thanks, that fixes the release build - just tested on latest master.

Unfortunately debug is still having issues that I noted in the original comment which are not fixed by linking zlib.

---
   Creating library C:\php-sdk\php\vc15\x64\php-src\x64\Debug_TS\php7ts_debug.lib and object C:\php-sdk\php\vc15\x64\php-src\x64\Debug_TS\php7ts_debug.exp
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_add referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_add_dir referenced in function php_zip_entry_get_info
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_file_comment referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_num_files referenced in function php_zip_fetch_object
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_rename referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_file_comment referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_close referenced in function php_zip_object_free_storage
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_close
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_delete referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_discard referenced in function php_zip_entry_get_info
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_error referenced in function php_zip_status
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_clear referenced in function php_zip_add_file
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_code_zip referenced in function php_zip_status
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_code_system referenced in function php_zip_status_sys
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_fini referenced in function php_zip_status
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_error_fini
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_error_strerror referenced in function php_zip_entry_get_info
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_error_strerror
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fclose referenced in function php_zip_extract_file
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_fclose
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_add referenced in function php_zip_add_file
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_get_external_attributes referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_set_encryption referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_file_set_external_attributes referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fopen referenced in function php_zip_extract_file
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_fopen
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fopen_index referenced in function php_zip_fetch_object
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_fread referenced in function php_zip_fetch_object
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_fread
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_archive_comment referenced in function php_zipobj_get_zip_comment
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_get_name referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_name_locate referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_open referenced in function php_zip_fetch_object
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_open
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_archive_comment referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_default_password referenced in function php_zip_entry_get_info
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_set_default_password
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_set_file_compression referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_source_buffer referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_source_file referenced in function php_zip_add_file
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_source_free referenced in function php_zip_add_file
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_stat referenced in function php_zip_extract_file
zip_stream.obj : error LNK2001: unresolved external symbol __imp_zip_stat
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_stat_index referenced in function php_zip_fetch_object
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_strerror referenced in function php_zip_object_free_storage
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_unchange referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_unchange_all referenced in function php_zip_add_from_pattern
php_zip.obj : error LNK2019: unresolved external symbol __imp_zip_unchange_archive referenced in function php_zip_add_from_pattern
zip_stream.obj : error LNK2019: unresolved external symbol __imp_zip_file_get_error referenced in function php_stream_zip_open
C:\php-sdk\php\vc15\x64\php-src\x64\Debug_TS\php7ts_debug.dll : fatal error LNK1120: 40 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\link.exe"' : return code '0x460'
Stop.
---
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC