Closed kwsp closed 5 months ago
PS G:\vcpkg> ./vcpkg version
vcpkg package management program version 2024-04-23-d6945642ee5c3076addd1a42c331bbf4cfc97457
See LICENSE.txt for license information.
Sorry I can't repro your issue.
PS G:\vcpkg> ./vcpkg install pkgconf
Computing installation plan...
The following packages will be built and installed:
pkgconf:x64-windows@2.2.0
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe
Restored 0 package(s) from C:\Users\monica\AppData\Local\vcpkg\archives in 225 us. Use --debug to see more details.
Installing 1/1 pkgconf:x64-windows@2.2.0...
Building pkgconf:x64-windows@2.2.0...
-- Using cached pkgconf-pkgconf-pkgconf-2.2.0.tar.gz.
-- Extracting source G:/vcpkg/downloads/pkgconf-pkgconf-pkgconf-2.2.0.tar.gz
-- Using source at G:/vcpkg/buildtrees/pkgconf/src/conf-2.2.0-ffd1d0b3e6.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Configuring x64-windows-dbg
-- Configuring x64-windows-dbg done
-- Configuring x64-windows-rel
-- Configuring x64-windows-rel done
-- Package x64-windows-dbg
-- Package x64-windows-rel
-- Fixing pkgconfig file: G:/vcpkg/packages/pkgconf_x64-windows/lib/pkgconfig/libpkgconf.pc
-- Fixing pkgconfig file: G:/vcpkg/packages/pkgconf_x64-windows/debug/lib/pkgconfig/libpkgconf.pc
-- Installing: G:/vcpkg/packages/pkgconf_x64-windows/share/pkgconf/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 381 ms.
Elapsed time to handle pkgconf:x64-windows: 53 s
pkgconf:x64-windows package ABI: 8e0a471eb58f001c4326ec0e5aa990a389a57b0a7476f83351c531281971a9a7
Total install time: 53 s
pkgconf provides pkg-config modules:
# a library for accessing and manipulating development framework configuration
libpkgconf
File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\utils\universal.py", line 737, in windows_detect_native_arch import ctypes File "ctypes\__init__.py", line 8, in <module> ImportError: DLL load failed while importing _ctypes: The specified module could not be found.
Broken python?
Interesting I also cannot repro this anymore. I'll close for now.
I have to re open this as this is blocking the build of a big project. The error trace should be the same as the above. When I run ./vcpkg.exe install pkgconf
(install globally), it works file, but this bug specifically happens when I build in manifest mode.
File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\utils\universal.py", line 737, in windows_detect_native_arch import ctypes File "ctypes\__init__.py", line 8, in <module> ImportError: DLL load failed while importing _ctypes: The specified module could not be found.
Broken python?
It looks like the ctypes
python built-in package is broken when the Python vcpkg downloaded is invoked from anywhere but the directory where the executable is.
PS C:\src\ArpamGui> C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\python\python-3.11.5-x64\python.exe -c "import ctypes"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "ctypes\__init__.py", line 8, in <module>
ImportError: DLL load failed while importing _ctypes: The specified module could not be found
No exception:
PS C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\python\python-3.11.5-x64> .\python.exe -c "import ctypes"
Its interesting this is only happening on one of my Win11 machines, while the same repo builds fine on mac and another Win11 machine.
I just did a clean rebuild with all vcpkg cache removed (from AppData/Local/vcpkg) and the issue persists
um.. all of the above happened when I used VSCode CMake Tools to build my project. When I used Visual Studio 2022 directly, it built fine. So it's working for me now. I'm still not sure why Python throws those errors when I try to build with VSCode CMake Tools.
Thanks for writing down the observations.
Copy issue body from C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/issue_body.md
Package: pkgconf:x64-windows@2.2.0
Host Environment
To Reproduce
vcpkg install
Failure logsC:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\config-x64-windows-dbg-out.log
``` WARNING: Recommend using either -Dbuildtype or -Doptimization + -Ddebug. Using both is redundant since they override each other. See: https://mesonbuild.com/Builtin-options.html#build-type-options The Meson build system Version: 1.3.2 Source dir: C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\src\conf-2.2.0-ffd1d0b3e6.clean Build dir: C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\x64-windows-dbg Build type: native build Project name: pkgconf Project version: 2.2.0 C compiler for the host machine: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 (msvc 19.39.33523 "Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64") C linker for the host machine: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/link.exe link 14.39.33523.0 ..\src\conf-2.2.0-ffd1d0b3e6.clean\meson.build:1:0: ERROR: Unhandled python exception This is a Meson bug and should be reported! WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated. ```C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\config-x64-windows-dbg-err.log
``` Traceback (most recent call last): File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\mesonmain.py", line 194, in run return options.run_func(options) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\msetup.py", line 358, in run app.generate() File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\msetup.py", line 181, in generate return self._generate(env, capture, vslite_ctx) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\msetup.py", line 203, in _generate intr = interpreter.Interpreter(b, user_defined_options=user_defined_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreter\interpreter.py", line 331, in __init__ self.parse_project() File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreterbase\interpreterbase.py", line 132, in parse_project self.evaluate_codeblock(self.ast, end=1) File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreterbase\interpreterbase.py", line 198, in evaluate_codeblock raise e File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreterbase\interpreterbase.py", line 190, in evaluate_codeblock self.evaluate_statement(cur) File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreterbase\interpreterbase.py", line 204, in evaluate_statement return self.function_call(cur) ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreterbase\interpreterbase.py", line 530, in function_call res = func(node, func_args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreterbase\decorators.py", line 260, in wrapper return f(*nargs, **wrapped_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreterbase\decorators.py", line 579, in wrapper return f(*wrapped_args, **wrapped_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreter\interpreter.py", line 1308, in func_project self.add_languages(proj_langs, True, MachineChoice.HOST) File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreter\interpreter.py", line 1479, in add_languages self._redetect_machines() File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\interpreter\interpreter.py", line 342, in _redetect_machines machines.build = environment.detect_machine_info(self.coredata.compilers.build) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\environment.py", line 468, in detect_machine_info detect_cpu_family(compilers) if compilers is not None else None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\environment.py", line 305, in detect_cpu_family trial = detect_windows_arch(compilers) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\environment.py", line 271, in detect_windows_arch os_arch = mesonlib.windows_detect_native_arch() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\meson-1.3.2-d646d3\mesonbuild\utils\universal.py", line 737, in windows_detect_native_arch import ctypes File "ctypes\__init__.py", line 8, inC:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\config-x64-windows-dbg-meson-log.txt.log
``` Build started at 2024-05-22T03:26:05.551910 Main binary: C:\Users\tnie\AppData\Local\vcpkg\downloads\tools\python\python-3.11.5-x64\python.exe Build Options: -Dtests=disabled -Dbuildtype=plain -Doptimization=plain -Ddebug=true '-Dcmake_prefix_path=['"'"'C:/src/ArpamGui/build/win64/vcpkg_installed/x64-windows/debug'"'"','"'"'C:/src/ArpamGui/build/win64/vcpkg_installed/x64-windows'"'"','"'"'C:/src/ArpamGui/build/win64/vcpkg_installed/x64-windows/share'"'"']' -Dprefix=C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/pkgs/pkgconf_x64-windows/debug -Dincludedir=../include -Dlibdir=lib -Dbackend=ninja -Dwrap_mode=nodownload --native-file=C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/blds/pkgconf/meson-x64-windows-dbg.log Python system: Windows The Meson build system Version: 1.3.2 Source dir: C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\src\conf-2.2.0-ffd1d0b3e6.clean Build dir: C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\x64-windows-dbg Build type: native build Project name: pkgconf Project version: 2.2.0 ----------- Detecting compiler via: `"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe" -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 /?` -> 0 stdout: C/C++ COMPILER OPTIONS -OPTIMIZATION- /O1 maximum optimizations (favor space) /O2 maximum optimizations (favor speed) /ObAdditional context
vcpkg.json
``` { "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", "name": "arpam-gui", "version": "0.1", "dependencies": [ "qtbase", "rapidjson", "glslang", "glfw3", "armadillo", "fftconv", "openblas", { "name": "opencv4", "features": [ "contrib", "dnn", "png", "vulkan", "tbb", "png", "world" ] }, { "name": "fftw3", "platform": "x64", "features": [ "avx2", "threads" ] }, { "name": "fftw3", "platform": "!x64", "features": [ "threads" ] }, { "name": "cuda", "platform": "x64" }, { "name": "itk", "platform": "x64", "features": [ "cuda", "cufftw", "opencv", "tbb" ] }, { "name": "itk", "platform": "!x64", "features": [ "opencv", "tbb" ] }, "gtest", "cli11", "indicators" ], "builtin-baseline": "5fa0f075ea51f305b627ecd5e050a363707353ff" } ```