vcpkg
vcpkg copied to clipboard
[dav1d] [python3] build failure on Windows7 (probably an issue in vcpkg_configure_meson?)
Host Environment
- OS: Windows 7 x64
- Compiler: MSVC 2019 x64
To Reproduce
vcpkg install dav1d --triplet x64-windows
Failure logs
Computing installation plan...
The following packages will be built and installed:
dav1d[core]:x64-windows -> 0.8.1
Detecting compiler hash for triplet x64-windows...
Could not locate cached archive: C:\Users\Dmitry\AppData\Local\vcpkg\archives\c7\c7596d9bfe3d3e5051ade9933fbf4fe1534f58df.zip
Starting package 1/1: dav1d:x64-windows
Building package dav1d[core]:x64-windows...
-- Using cached D:/projects/git.vcpkg.sail/downloads/videolan-dav1d-0.8.1.tar.gz
-- Cleaning sources at D:/projects/git.vcpkg.sail/buildtrees/dav1d/src/0.8.1-22dbfa23ef.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source D:/projects/git.vcpkg.sail/downloads/videolan-dav1d-0.8.1.tar.gz
-- Applying patch patch_underscore_prefix.patch
-- Using source at D:/projects/git.vcpkg.sail/buildtrees/dav1d/src/0.8.1-22dbfa23ef.clean
-- Found external ninja('1.10.2').
-- Configuring x64-windows
-- Using msys root at D:/projects/git.vcpkg.sail/downloads/tools/msys2/50864d9fae363d6e
-- Configuring x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:105 (message):
Command failed: D:/projects/git.vcpkg.sail/downloads/tools/python/python-3.9.2-x64/python.exe D:/projects/git.vcpkg.sail/downloads/tools/meson/meson-f5871f434a5b768ad9fcafa797a6db0286421842/meson.py --default-library=shared -Denable_tests=false -Denable_tools=false --buildtype plain --backend ninja --wrap-mode nodownload --native D:/projects/git.vcpkg.sail/buildtrees/dav1d/meson-nativ-x64-windows.log --default-library shared --libdir lib --native D:/projects/git.vcpkg.sail/buildtrees/dav1d/meson-nativ-x64-windows-debug.log -Ddebug=true --prefix D:/projects/git.vcpkg.sail/packages/dav1d_x64-windows/debug --includedir ../include -Dcmake_prefix_path=['D:/projects/git.vcpkg.sail/installed/x64-windows/debug','D:/projects/git.vcpkg.sail/installed/x64-windows','D:/projects/git.vcpkg.sail/installed/x64-windows/share'] D:/projects/git.vcpkg.sail/buildtrees/dav1d/src/0.8.1-22dbfa23ef.clean
Working Directory: D:/projects/git.vcpkg.sail/buildtrees/dav1d/x64-windows-dbg
Error code: Exit code 0xc0000135
See logs for more information:
Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_meson.cmake:482 (vcpkg_execute_required_process)
ports/dav1d/portfile.cmake:22 (vcpkg_configure_meson)
scripts/ports.cmake:142 (include)
Error: Building package dav1d:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: dav1d:x64-windows
Vcpkg version: 2021-01-13-d67989bce1043b98092ac45996a8230a059a2d7e
Additionally, attach any relevant sections from the log files above.
Additional context 0xc0000135 error code = "DLL not found" error. Looks like it fails to find some required DLL.
CC @atkawa7
Can you cd to D:/projects/git.vcpkg.sail/buildtrees/dav1d/x64-windows-dbg and manuanlly run command:
D:/projects/git.vcpkg.sail/downloads/tools/python/python-3.9.2-x64/python.exe D:/projects/git.vcpkg.sail/downloads/tools/meson/meson-f5871f434a5b768ad9fcafa797a6db0286421842/meson.py --default-library=shared -Denable_tests=false -Denable_tools=false --buildtype plain --backend ninja --wrap-mode nodownload --native D:/projects/git.vcpkg.sail/buildtrees/dav1d/meson-nativ-x64-windows.log --default-library shared --libdir lib --native D:/projects/git.vcpkg.sail/buildtrees/dav1d/meson-nativ-x64-windows-debug.log -Ddebug=true --prefix D:/projects/git.vcpkg.sail/packages/dav1d_x64-windows/debug --includedir ../include -Dcmake_prefix_path=['D:/projects/git.vcpkg.sail/installed/x64-windows/debug','D:/projects/git.vcpkg.sail/installed/x64-windows','D:/projects/git.vcpkg.sail/installed/x64-windows/share'] D:/projects/git.vcpkg.sail/buildtrees/dav1d/src/0.8.1-22dbfa23ef.clean
Thanks.
Shell: Git Bash.
It outputs
D:/projects/git.vcpkg.sail/downloads/tools/python/python-3.9.2-x64/python.exe:
error while loading shared libraries: python39.dll: cannot open shared object file: No such file or directory
As per the docs https://www.python.org/downloads/windows/, Python 3.9.2 cannot be used on Windows 7. I believe that's why python.exe fails. What about downloading Python 3.8 (which is supported until 2024) on Windows 7?
I found some dots in your vcpkg path, can you clone vcpkg again and try again in a path that only contains English or numbers?
Thanks.
The path is D:/projects/git.vcpkg.sail
with only English letters. I tried a fresh install as well with no luck.
I think the root cause is the Python version that is installed by vcpkg_configure_meson
. 3.9.2 doesn't support Windows 7.
cc @Neumann-A
@JackBoosY not a meson problem. It is a general problem of vcpkg_find_acquire_program(PYTHON3)
.
Unfortunately, Python 3.9 has dropped support for Windows 7. Additionally, Windows 7 is now EOL. Therefore, any port that requires Python 3 to build will not build under Windows 7.
A possible fix would be installing Python 3.8 on Windows 7 and 3.9+ on Windows 10.
Unfortunately, vcpkg_find_acquire_program(PYTHON3)
must always install the same version as the Python 3 port. Otherwise, ports that build python bindings and request the Python 3 executable will be broken.
We have to admit that vcpkg is partially broken on Windows 7 then.
I see two possible ways:
- explicitly state in the readme that any ports requiring python3 will fail on Windows 7. Not cool anyways.
- drop Windows 7 support? Thousands of people will hate you then 😂
Or the meson helpers could download Python 3.8 for meson to use.
That would be cool.
@sfhacker I don't download or install Python explicitly. It happens in background in vcpkg install dav1d --triplet x64-windows
.
It fails because Python 3.9 doesn't support Windows 7.
@sfhacker Not sure why it works on your setup. https://www.python.org/downloads/windows/ explicitly states Note that Python 3.9.2 cannot be used on Windows 7 or earlier.
I cannot zip it as I have no Python installed on my system.
Just for testing purposes, I downloaded https://www.python.org/ftp/python/3.9.2/python-3.9.2-embed-amd64.zip . After unpacking and running python.exe -V
, it fails with missing api-ms-win-core-path-l1-1-0.dll
.
I also downloaded https://www.python.org/ftp/python/3.8.8/python-3.8.8-embed-amd64.zip. After unpacking and running python.exe -V
, it works fine.
@strega-nil Can you please take a look?
Thanks.
Since python dropped support with Windows7, I think I can add a new port named python-win7
but it breaks our policy.
We already have python3[deprecated-win7-support], which builds Python 3.9 with support for Windows 7.
@smoked-herring So can you please install python using python3[deprecated-win7-support]
?
Unfortunately, that won't fix the issue because vcpkg_configure_meson is using the python executable from vcpkg_find_aqcuire_program(PYTHON3) instead of the one built by the port. We'd need to change the meson scripts to have a host dependency on python3[deprecated-win7-support]
well ,I use win7 too. I copy python3.8 files to the python3.11.8 dir and it is able to build some of package(I have not meet a package cant to bulid because of python now)you can have a try too