microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.25k stars 6.41k forks source link

[pkgconf] Build error on x64-windows #38864

Closed kwsp closed 5 months ago

kwsp commented 5 months ago

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 logs

-- Found Python version '3.11.5 at C:/Users/tnie/AppData/Local/vcpkg/downloads/tools/python/python-3.11.5-x64/python.exe'
-- Using meson: C:/Users/tnie/AppData/Local/vcpkg/downloads/tools/meson-1.3.2-d646d3/meson.py
-- Using cached pkgconf-pkgconf-pkgconf-2.2.0.tar.gz.
-- Extracting source C:/Users/tnie/AppData/Local/vcpkg/downloads/pkgconf-pkgconf-pkgconf-2.2.0.tar.gz
-- Using source at C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/blds/pkgconf/src/conf-2.2.0-ffd1d0b3e6.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Configuring x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: C:/Users/tnie/AppData/Local/vcpkg/downloads/tools/python/python-3.11.5-x64/python.exe C:/Users/tnie/AppData/Local/vcpkg/downloads/tools/meson-1.3.2-d646d3/meson.py -Dtests=disabled --backend ninja --wrap-mode nodownload -Dbuildtype=plain -Doptimization=plain --libdir lib --native C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/blds/pkgconf/meson-x64-windows-dbg.log -Ddebug=true --prefix C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/pkgs/pkgconf_x64-windows/debug --includedir ../include -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'] C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/blds/pkgconf/src/conf-2.2.0-ffd1d0b3e6.clean
    Working Directory: C:/src/ArpamGui/build/win64/vcpkg_installed/vcpkg/blds/pkgconf/x64-windows-dbg
    Error code: 2
    See logs for more information:
      C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\config-x64-windows-dbg-meson-log.txt.log
      C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\config-x64-windows-dbg-out.log
      C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\config-x64-windows-dbg-err.log

Call Stack (most recent call first):
  C:/src/ArpamGui/build/win64/vcpkg_installed/x64-windows/share/vcpkg-tool-meson/vcpkg_configure_meson.cmake:436 (vcpkg_execute_required_process)
  C:/Users/tnie/AppData/Local/vcpkg/registries/git-trees/cacd18e2bc70298fcf4665ff6f14238b6071013e/portfile.cmake:9 (vcpkg_configure_meson)
  scripts/ports.cmake:170 (include)
C:\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, in ImportError: DLL load failed while importing _ctypes: The specified module could not be found. ```
C:\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) /Ob inline expansion (default n=0) /Od disable optimizations (default) /Og enable global optimization /Oi[-] enable intrinsic functions /Os favor code space /Ot favor code speed /Ox optimizations (favor speed) /favor: select processor to optimize for, one of: blend - a combination of optimizations for several different x64 processors AMD64 - 64-bit AMD processors INTEL64 - Intel(R)64 architecture processors ATOM - Intel(R) Atom(TM) processors -CODE GENERATION- /Gu[-] ensure distinct functions have distinct addresses /Gw[-] separate global variables for linker /GF enable read-only string pooling /Gm[-] enable minimal rebuild /Gy[-] separate functions for linker /GS[-] enable security checks /GR[-] enable C++ RTTI /GX[-] enable C++ EH (same as /EHsc) /guard:cf[-] enable CFG (control flow guard) /guard:ehcont[-] enable EH continuation metadata (CET) /EHs enable C++ EH (no SEH exceptions) /EHa enable C++ EH (w/ SEH exceptions) /EHc extern "C" defaults to nothrow /EHr always generate noexcept runtime termination checks /fp: choose floating-point model: contract - consider floating-point contractions when generating code except[-] - consider floating-point exceptions when generating code fast - "fast" floating-point model; results are less predictable precise - "precise" floating-point model; results are predictable strict - "strict" floating-point model (implies /fp:except) /Qfast_transcendentals generate inline FP intrinsics even with /fp:except /Qspectre[-] enable mitigations for CVE 2017-5753 /Qpar[-] enable parallel code generation /Qpar-report:1 auto-parallelizer diagnostic; indicate parallelized loops /Qpar-report:2 auto-parallelizer diagnostic; indicate loops not parallelized /Qvec-report:1 auto-vectorizer diagnostic; indicate vectorized loops /Qvec-report:2 auto-vectorizer diagnostic; indicate loops not vectorized /GL[-] enable link-time code generation /volatile: choose volatile model: iso - Acquire/release semantics not guaranteed on volatile accesses ms - Acquire/release semantics guaranteed on volatile accesses /GA optimize for Windows Application /Ge force stack checking for all funcs /Gs[num] control stack checking calls /Gh enable _penter function call /GH enable _pexit function call /GT generate fiber-safe TLS accesses /RTC1 Enable fast checks (/RTCsu) /RTCc Convert to smaller type checks /RTCs Stack Frame runtime checking /RTCu Uninitialized local usage checks /clr[:option] compile for common language runtime, where option is: pure : produce IL-only output file (no native executable code) safe : produce IL-only verifiable output file netcore : produce assemblies targeting .NET Core runtime noAssembly : do not produce an assembly nostdlib : ignore the system .NET framework directory when searching for assemblies nostdimport : do not import any required assemblies implicitly initialAppDomain : enable initial AppDomain behavior of Visual C++ 2002 implicitKeepAlive- : turn off implicit emission of System::GC::KeepAlive(this) /fsanitize=address Enable address sanitizer codegen /homeparams Force parameters passed in registers to be written to the stack /GZ Enable stack checks (/RTCs) /Gv __vectorcall calling convention /arch: minimum CPU architecture requirements, one of: AVX - enable use of instructions available with AVX-enabled CPUs AVX2 - enable use of instructions available with AVX2-enabled CPUs AVX512 - enable use of instructions available with AVX-512-enabled CPUs /QIntel-jcc-erratum enable mitigations for Intel JCC erratum /Qspectre-load Enable spectre mitigations for all instructions which load memory /Qspectre-load-cf Enable spectre mitigations for all control-flow instructions which load memory /Qspectre-jmp[-] Enable spectre mitigations for unconditional jump instructions /fpcvt: FP to unsigned integer conversion compatibility IA - results compatible with VCVTTSD2USI instruction BC - results compatible with VS2017 and earlier compiler /jumptablerdata Place jump tables for switch case statements in .rdata section -OUTPUT FILES- /Fa[file] name assembly listing file /FA[scu] configure assembly listing /Fd[file] name .PDB file /Fe name executable file /Fm[file] name map file /Fo name object file /Fp name precompiled header file /Fr[file] name source browser file /FR[file] name extended .SBR file /Fi[file] name preprocessed file /Fd: name .PDB file /Fe: name executable file /Fm: name map file /Fo: name object file /Fp: name .PCH file /FR: name extended .SBR file /Fi: name preprocessed file /Ft location of the header files generated for #import /doc[file] process XML documentation comments and optionally name the .xdc file -PREPROCESSOR- /AI add to assembly search path /FU import .NET assembly/module /FU:asFriend import .NET assembly/module as friend /C don't strip comments /D{=|#} define macro /E preprocess to stdout /EP preprocess to stdout, no #line /P preprocess to file /Fx merge injected code to file /FI name forced include file /U remove predefined macro /u remove all predefined macros /I add to include search path /X ignore "standard places" /PH generate #pragma file_hash when preprocessing /PD print all macro definitions -LANGUAGE- /std: C++ standard version c++14 - ISO/IEC 14882:2014 (default) c++17 - ISO/IEC 14882:2017 c++20 - ISO/IEC 14882:2020 c++latest - latest draft standard (feature set subject to change) /std: C standard version c11 - ISO/IEC 9899:2011 c17 - ISO/IEC 9899:2018 clatest - latest draft standard (feature set subject to change) /permissive[-] enable some nonconforming code to compile (feature set subject to change) (off by default in C++20 and later) /Ze (deprecated) enable extensions (default) /Za disable extensions (not recommended for C++) /ZW enable WinRT language extensions /Zs syntax check only /await enable resumable functions extension /await:strict enable standard C++20 coroutine support with earlier language versions /constexpr:depth recursion depth limit for constexpr evaluation (default: 512) /constexpr:backtrace show N constexpr evaluations in diagnostics (default: 10) /constexpr:steps terminate constexpr evaluation after N steps (default: 1048576) /Zi enable debugging information /Z7 enable old-style debug info /Zo[-] generate richer debugging information for optimized code (on by default) /ZH:[MD5|SHA1|SHA_256] hash algorithm for calculation of file checksum in debug info (default: SHA_256) /Zp[n] pack structs on n-byte boundary /Zl omit default library name in .OBJ /vd{0|1|2} disable/enable vtordisp /vm type of pointers to members /Zc:arg1[,arg2] language conformance, where arguments can be: forScope[-] enforce Standard C++ for scoping rules wchar_t[-] wchar_t is the native type, not a typedef auto[-] enforce the new Standard C++ meaning for auto trigraphs[-] enable trigraphs (off by default) rvalueCast[-] enforce Standard C++ explicit type conversion rules (on by default in C++20 or later, implied by /permissive-) strictStrings[-] disable string-literal to [char|wchar_t]* conversion (on by default in C++20 or later, implied by /permissive-) implicitNoexcept[-] enable implicit noexcept on required functions threadSafeInit[-] enable thread-safe local static initialization inline[-] remove unreferenced function or data if it is COMDAT or has internal linkage only (off by default) sizedDealloc[-] enable C++14 global sized deallocation functions (on by default) throwingNew[-] assume operator new throws on failure (off by default) referenceBinding[-] a temporary will not bind to a non-const lvalue reference (on by default in C++20 or later, implied by /permissive-) twoPhase- disable two-phase name lookup ternary[-] enforce C++11 rules for conditional operator (on by default in C++20 or later, implied by /permissive-) noexceptTypes[-] enforce C++17 noexcept rules (on by default in C++17 or later) alignedNew[-] enable C++17 alignment of dynamically allocated objects (on by default) hiddenFriend[-] enforce Standard C++ hidden friend rules (on by default in C++20 or later, implied by /permissive-) externC[-] enforce Standard C++ rules for 'extern "C"' functions (on by default in C++20 or later, implied by /permissive-) lambda[-] better lambda support by using the newer lambda processor (on by default in C++20 or later, implied by /permissive-) tlsGuards[-] generate runtime checks for TLS variable initialization (on by default) zeroSizeArrayNew[-] call member new/delete for 0-size arrays of objects (on by default) static_assert[-] strict handling of 'static_assert' (on by default in C++20 or later, implied by /permissive-) gotoScope[-] cannot jump past the initialization of a variable (implied by /permissive-) templateScope[-] enforce Standard C++ template parameter shadowing rules enumTypes[-] enable Standard C++ underlying enum types (off by default) checkGwOdr[-] enforce Standard C++ one definition rule violations when /Gw has been enabled (off by default) nrvo[-] enable optional copy and move elision (on by default in C++20 or later, implied by /permissive- or /O2) __STDC__ define __STDC__ to 1 in C __cplusplus[-] __cplusplus macro reports the supported C++ standard (off by default) char8_t[-] enable C++20 native `u8` literal support as `const char8_t` (on by default in C++20 or later) externConstexpr[-] enable external linkage for constexpr variables in C++ (on by default in C++20 or later, implied by /permissive-) preprocessor[-] enable standard conforming preprocessor in C/C++ (on by default in C11 or later) /ZI enable Edit and Continue debug info /openmp enable OpenMP 2.0 language extensions /openmp:experimental enable OpenMP 2.0 language extensions plus select OpenMP 3.0+ language extensions /openmp:llvm OpenMP language extensions using LLVM runtime -MISCELLANEOUS- @ options response file /?, /help print this help message /bigobj generate extended object format /c compile only, no link /errorReport:option deprecated. Report internal compiler errors to Microsoft none - do not send report prompt - prompt to immediately send report queue - at next admin logon, prompt to send report (default) send - send report automatically /FC use full pathnames in diagnostics /H max external name length /J default char type is unsigned /MP[n] use up to 'n' processes for compilation /nologo suppress copyright message /showIncludes show include file names /Tc compile file as .c /Tp compile file as .cpp /TC compile all files as .c /TP compile all files as .cpp /V set version string /Yc[file] create .PCH file /Yd put debug info in every .OBJ /Yl[sym] inject .PCH ref for debug lib /Yu[file] use .PCH file /Y- disable all PCH options /Zm max memory alloc (% of default) /FS force to use MSPDBSRV.EXE /source-charset:|.nnnn set source character set /execution-charset:|.nnnn set execution character set /utf-8 set source and execution character set to UTF-8 /validate-charset[-] validate UTF-8 files for only legal characters /fastfail[-] enable fast-fail mode /JMC[-] enable native just my code /presetPadding[-] zero initialize padding for stack based class types /volatileMetadata[-] generate metadata on volatile memory accesses /sourcelink [file] file containing source link information -LINKING- /LD Create .DLL /LDd Create .DLL debug library /LN Create a .netmodule /F set stack size /link [linker options and libraries] /MD link with MSVCRT.LIB /MT link with LIBCMT.LIB /MDd link with MSVCRTD.LIB debug lib /MTd link with LIBCMTD.LIB debug lib -CODE ANALYSIS- /analyze[-] Enable native analysis /analyze:quiet[-] No warning to console /analyze:log Warnings to file /analyze:autolog Log to *.pftlog /analyze:autolog:ext Log to *./analyze:autolog- No log file /analyze:WX- Warnings not fatal /analyze:stacksize Max stack frame /analyze:max_paths Max paths /analyze:only Analyze, no code gen -DIAGNOSTICS- /diagnostics: controls the format of diagnostic messages: classic - retains prior format column[-] - prints column information caret[-] - prints column and the indicated line of source /Wall enable all warnings /w disable all warnings /W set warning level (default n=1) /Wv:xx[.yy[.zzzzz]] disable warnings introduced after version xx.yy.zzzzz /WX treat warnings as errors /WL enable one line diagnostics /wd disable warning n /we treat warning n as an error /wo issue warning n once /w set warning level 1-4 for n /external:I - location of external headers /external:env: - environment variable with locations of external headers /external:anglebrackets - treat all headers included via <> as external /external:W - warning level for external headers /external:templates[-] - evaluate warning level across template instantiation chain /sdl enable additional security features and warnings /options:strict unrecognized compiler options are an error ----------- stderr: Microsoft (R) C/C++ Optimizing Compiler Version 19.39.33523 for x64 Copyright (C) Microsoft Corporation. All rights reserved. ----------- Sanity testing C compiler: "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 Is cross compiler: False. Sanity check compiler command line: "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 sanitycheckc.c /Fesanitycheckc.exe /MDd -nologo -DWIN32 -D_WINDOWS -W3 -utf-8 -MP -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1 -IC:/src/ArpamGui/build/win64/vcpkg_installed/x64-windows/include /nologo /showIncludes /utf-8 /link -machine:x64 -debug -INCREMENTAL /LIBPATH:C:/src/ArpamGui/build/win64/vcpkg_installed/x64-windows/debug/lib Sanity check compile stdout: sanitycheckc.c ----- Sanity check compile stderr: ----- Running test binary command: C:\src\ArpamGui\build\win64\vcpkg_installed\vcpkg\blds\pkgconf\x64-windows-dbg\meson-private\sanitycheckc.exe 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 ----------- Detecting archiver via: `"C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/lib.exe" -machine:x64 -nologo /?` -> 1100 stdout: usage: LIB [options] [files] options: /DEF[:filename] /ERRORREPORT:{NONE|PROMPT|QUEUE|SEND} /EXPORT:symbol /EXTRACT:membername /INCLUDE:symbol /LIBPATH:dir /LINKREPRO:dir /LINKREPROTARGET:filename /LIST[:filename] /LTCG /MACHINE:{ARM|ARM64|ARM64X|EBC|X64|X86} /NAME:filename /NODEFAULTLIB[:library] /NOLOGO /OUT:filename /REMOVE:membername /SUBSYSTEM:{BOOT_APPLICATION|CONSOLE|EFI_APPLICATION| EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER| NATIVE|POSIX|WINDOWS|WINDOWSCE}[,#[.##]] /VERBOSE /WX[:NO] /WX[:nnnn[,nnnn...]] ----------- ..\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. ```

Additional 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" } ```
MonicaLiu0311 commented 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
dg0yt commented 5 months ago

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?

kwsp commented 5 months ago

Interesting I also cannot repro this anymore. I'll close for now.

kwsp commented 5 months ago

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.

kwsp commented 5 months ago
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"
kwsp commented 5 months ago

Its interesting this is only happening on one of my Win11 machines, while the same repo builds fine on mac and another Win11 machine.

kwsp commented 5 months ago

I just did a clean rebuild with all vcpkg cache removed (from AppData/Local/vcpkg) and the issue persists

kwsp commented 5 months ago

Related https://github.com/microsoft/vcpkg/issues/38905

kwsp commented 5 months ago

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.

dg0yt commented 5 months ago

Thanks for writing down the observations.