|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2021-08-06 11:27 UTC] mike_itguy at yahoo dot co dot uk
Description: ------------ I try to build the ibm_db2 pecl extension v2.1.3 with PHP 8.0.9 on Windows10-x64 with Visual-Studio-2019 Community Edition. But the build of php itself fails before reaching the ibm_db2.c compilation. I follow the steps at this page: https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2 I show the steps I took, in separate section below. nmake fails with a linker error: "fatal error C1900: Il mismatch between 'P1' version '202110113' and 'P2 version '20190715' The nmake log file has this at the end: rc /nologo /fo D:\php-sdk\phpdev\vs16\x64\phpdev\vs16\x64\phpdev\vs16\x64\php-src-php-8.0.9\x64\Release_TS\php8ts.dll.res /d FILE_DESCRIPTION="\"PHP Script Interpreter\"" /d FILE_NAME="\"php8ts.dll\"" /d PRODUCT_NAME="\"PHP Script Interpreter\"" /ID:\php-sdk\phpdev\vs16\x64\phpdev\vs16\x64\phpdev\vs16\x64\php-src-php-8.0.9\x64\Release_TS /d MC_INCLUDE="\"D:\php-sdk\phpdev\vs16\x64\phpdev\vs16\x64\phpdev\vs16\x64\php-src-php-8.0.9\x64\Release_TS\wsyslog.rc\"" win32\build\template.rc 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 fatal error C1900: Il mismatch between 'P1' version '20210113' and 'P2' version '20190715' LINK : fatal error LNK1257: code generation failed NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX64\x64\link.exe"' : return code '0x4e9' Stop. Test script: --------------- d: mkdir d:\tmp rd /s /q d:\php-sdk git clone https://github.com/Microsoft/php-sdk-binary-tools.git d:\php-sdk cd /d d:\php-sdk git checkout php-sdk-2.2.0 phpsdk-vs16-x64.bat phpsdk_buildtree phpdev unzip -q %userprofile%\downloads\php-src-php-8.0.9.zip mkdir pecl copy %userprofile%\downloads\pecl-database-ibm_db2-RELEASE_2_1_3.tar.gz .\pecl cd pecl gzip -d * tar -xf *.tar edit the config.w32 to replace db2cli.lib by db2cli64.lib for clidriver edit the ibm_db2.c to replace " ulong " by " unsigned long " on 3 lines (bugfix) cd ..\php-src-php-8.0.9 phpsdk_deps -u --verify %LIB% includes e:\db2\lib --verify %INCLUDE% includes e:db2\include --verify PATH includes e:\db2\bin buildconf configure --help | find /i "ibm" configure --enable-cli --with-ibm_db2=shared,e:\db2 1>\tmp\configure.log 2>&1 nmake 1>\tmp\nmake1.log 2>&1 Expected result: ---------------- Was expecting a successful build for v8.0.9 (the build of 7.4.22 on a different hostname was successful). Actual result: -------------- 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 fatal error C1900: Il mismatch between 'P1' version '20210113' and 'P2' version '20190715' PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 17:00:02 2025 UTC |
> Visual Studio 2019 community edition, version 16.7.2 You need to update to latest (16.10.4), or rebuild some dependecy libraries. I suggest you do the former. If there are C1047 errors during build, you can work around by set LDFLAGS=/d2:-AllowCompatibleILVersions and running buildconf etc. again. Also note that replacing `ulong` with `unsigned long` is not wrong, but the improved solution of the PR[1] is preferable. [1] <https://github.com/php/pecl-database-ibm_db2/pull/13>