Closed dwgebler closed 3 years ago
Are you using the latest dependencies (check with phpsdk_deps -c
)?
@cmb69
Configuration: master-vs16-x64-staging
No updates are available.
This is fixable by exporting environment variable set LDFLAGS="/d2:-AllowCompatibleILVersions"
before running configure
, it does not appear to be an issue with this repo, rather the version of the iconv lib supplied by https://windows.php.net/downloads/php-sdk/deps/vs16/x64/
I usually build ext/sqlite as shared extension, so I didn't notice this issue so far. But indeed, when building ext/sqlite as static extension, I'm hitting C1047 as well (VS 16.8.4, libiconv-1.16-3, sqlite3-3.33.0). That error has already been very annoying several times in the past, since it required to rebuilt several packages to be able to do the snapshot builds, and those rebuilt packages didn't work with older VS versions, what caused problems for others. So constantly rebuilding libiconv doesn't appear to be a good solution.
/d2:-AllowCompatibleILVersions
Thank you! I wasn't aware of this undocumented linker option. It might make sense to add it by default for the Windows builds to mitigate this issue. For now, I have at least documented it.
/cc @Jan-E, @weltling, may be interested in this info as well. According to https://developercommunity.visualstudio.com/content/problem/316532/c1047-after-update-from-157-to-158.html, it is safe to use it.
Thanks. I never ran into C1047 AFAIK, but I have added set LDFLAGS="/d2:-AllowCompatibleILVersions"
to my VS16 build environment.
Edit O, wait. This was the error we ran into when PHP 7.4 was compiled with VS16 in the beginning.
VS 2019 installed and updated to latest, attempting to build PHP-8.1.0-dev (master) with sqlite3 support (
configure --with-sqlite3 ...
) results in following error, which can only be resolved by disabling libiconv and libxml, or by not including sqlite3.