Bug #74495 [Com]: PHP failed to build due to link error LNK2001

From: Date: Wed, 26 Apr 2017 06:52:22 +0000
Subject: Bug #74495 [Com]: PHP failed to build due to link error LNK2001
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208801@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74495&edit=1 ID: 74495 Comment by: seaheart_2006 at 126 dot com Reported by: seaheart_2006 at 126 dot com Summary: PHP failed to build due to link error LNK2001 Status: Feedback Type: Bug Package: Compile Failure Operating System: Windows Server 2012 R2 PHP Version: master-Git-2017-04-25 (Git) Block user comment: N Private report: N New Comment: Hi, ab@php.net Thanks for your reply. It seems the problem should be that: 1. In file ext\zlib\php_zlib.def, it exports function "inflateValidate". 2. In file ext\zlib\php_zlib.h, there is no definition for function "inflateValidate", I think this is the root cause for the link error LNK2001. Any thought please let me know. Thank you so much! Previous Comments: ------------------------------------------------------------------------ [2017-04-25 11:16:58] ab@php.net Thanks for the report. Please update the deps. Also, with master, please use vc15, and do a clean rebuild of at least ext/zlib, but better full. Thanks. ------------------------------------------------------------------------ [2017-04-25 06:25:06] seaheart_2006 at 126 dot com Description: ------------ Environment: Windiows Server 2012 R2 + VS2015 Update 3 I tried to build PHP with master branch latest revision on Windows.It failed to build due to link error LNK2001: unresolved external symbol inflateValidate. This issue can be reproduced form master branch revision 347b880 (https://github.com/php/php-src/commit/347b880ee4081140f488916a40ff6f2765a69e43). It failed when execute the following link command. Could you please take a look at this? Thanks! link.exe @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\PHP_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\BCMATH_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\CALENDAR_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\COM_DOTNET_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\CTYPE_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\DATE_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\FILTER_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\HASH_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\ICONV_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\JSON_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\MYSQLND_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\PCRE_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\READLINE_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\REFLECTION_GLOBAL_OBJS.txt" ! @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\SESSION_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\SPL_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\STANDARD_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\TOKENIZER_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\ZIP_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\ZLIB_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\LIBXML_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\DOM_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\PHAR_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\SIMPLEXML_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\XML_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\WDDX_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\XMLREADER_GLOBAL_OBJS.txt" @"D:\PHP7\phpdev\vc14\x86\src\Release_TS\resp\XMLWRITER_GLOBAL_OBJS.txt" OleAut32.! Lib libiconv_a.lib WS2_32.Lib edit_a.lib zlib_a.li! b libxml2_a_dll.lib libiconv_a.lib kernel32.lib ole32.lib user32.lib advapi32.lib shell32.lib ws2_32.lib Dnsapi.lib psapi.lib bcrypt.lib D:\PHP7\phpdev\vc14\x86\src\Release_TS\php7ts.dll.res /out:D:\PHP7\phpdev\vc14\x86\src\Release_TS\php7ts.dll /dll /nodefaultlib:libcmt /def:D:\PHP7\phpdev\vc14\x86\src\Release_TS\php7ts.dll.def /nologo /GUARD:CF /libpath:"D:\PHP7\phpdev\vc14\x86\deps\lib" /NXCOMPAT /DYNAMICBASE /LTCG:INCREMENTAL /libpath:"..\deps\lib" /libpath:"..\deps\lib" /libpath:"..\deps\lib" /libpath:"..\deps\lib" /libpath:"..\deps\lib" Expected result: ---------------- link sccessfully Actual result: -------------- link failed with the following error: php7ts.dll.def : error LNK2001: unresolved external symbol inflateValidate .\php7ts.lib : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe"' : return code '0x460' ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74495&edit=1

« previous php.bugs (#208801) next »