php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79612 PHP failed to build with link error
Submitted: 2020-05-19 10:46 UTC Modified: 2020-05-25 08:22 UTC
From: 1998zhangyi at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: *Compile Issues
PHP Version: 7.4.6 OS: windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: 1998zhangyi at gmail dot com
New email:
PHP Version: OS:

 

 [2020-05-19 10:46 UTC] 1998zhangyi at gmail dot com
Description:
------------
Environment: Windiows Server 2016 + VS2019 latest version

I tried to build PHP with master branch latest revision on Windows.It failed to build due to link error LNK2001: unresolved external symbol zip_register_progress_callback_with_state. This issue can be reproduced form master branch revision 33b5c02(https://github.com/php/php-src/commit/33b5c026aa0b3f4a88a1be599463138cb79ebb5d).

error:

nmake

Microsoft (R) Program Maintenance Utility Version 14.27.28909.96
Copyright (C) Microsoft Corporation.  All rights reserved.

Recreating build dirs
Recreating build dirs
libiconv_a.lib(iconv1.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
   Creating library F:\gitP\php\phpdev\vc14\x64\src\x64\Release_TS\php8ts.lib and object F:\gitP\php\phpdev\vc14\x64\src\x64\Release_TS\php8ts.exp
php_zip.obj : error LNK2001: unresolved external symbol zip_register_progress_callback_with_state
php_zip.obj : error LNK2001: unresolved external symbol zip_libzip_version
F:\gitP\php\phpdev\vc14\x64\src\x64\Release_TS\php8ts.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64\link.exe"' : return code '0x460'
Stop.

Expected result:
----------------
PHP should build successfully.

Actual result:
--------------
PHP failed to build

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-19 11:55 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-05-19 11:55 UTC] cmb@php.net
I think you just need to update the dependencies:

  phpsdk_deps -u
 [2020-05-25 08:01 UTC] 1998zhangyi at gmail dot com
Thank you very much, I try the latest build steps, now PHP run successfully on MSVC.
 [2020-05-25 08:22 UTC] cmb@php.net
-Status: Feedback +Status: Not a bug
 [2020-05-25 08:22 UTC] cmb@php.net
Great! :)
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 09:01:34 2025 UTC