Bug #81337 [Com]: "fatal error C1900: Il mismatch between 'P1' version '202110113' and 'P2 versio
| From: | mike_itguy at yahoo dot co dot uk | Date: | Fri, 06 Aug 2021 11:58:12 +0000 |
| Subject: | Bug #81337 [Com]: "fatal error C1900: Il mismatch between 'P1' version '202110113' and 'P2 versio | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235643@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81337&edit=1
ID: 81337
Comment by: mike_itguy at yahoo dot co dot uk
Reported by: mike_itguy at yahoo dot co dot uk
Summary: "fatal error C1900: Il mismatch between 'P1' version
'202110113' and 'P2 versio
Status: Feedback
Type: Bug
Package: Compile Failure
Operating System: Win10-pro_20H2
PHP Version: 8.0.9
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
thank you. I will update the VisualStudio2019 to 16.10.4 current and retry.
Previous Comments:
------------------------------------------------------------------------
[2021-08-06 11:55:04] cmb@php.net
> 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>
------------------------------------------------------------------------
[2021-08-06 11:43:42] mike_itguy at Yahoo dot co dot uk
Visual Studio 2019 community edition, version 16.7.2
in the phpsdk starter script the msvc version reported ist 14.27.29111
------------------------------------------------------------------------
[2021-08-06 11:32:19] cmb@php.net
What's the exact version of your VS 2019 (should be something like
16.10.3)?
------------------------------------------------------------------------
[2021-08-06 11:27:02] 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'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81337&edit=1