microsoft / vcpkg

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

[fontconfig] Build error on x64-windows #41740

Open AdamJue opened 4 hours ago

AdamJue commented 4 hours ago

[CMake] CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message): 1> [CMake] Command failed: E:/package/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe -I D:/work/XXXXX/out/build/Debug/vcpkg_installed/x64-windows/tools/meson/meson.py -Ddoc=disabled -Dcache-build=disabled -Dtests=disabled --backend ninja --wrap-mode nodownload -Dbuildtype=plain --libdir lib --native E:/package/vcpkg/buildtrees/fontconfig/meson-x64-windows-dbg.log -Ddebug=true --prefix E:/package/vcpkg/packages/fontconfig_x64-windows/debug --includedir ../include -Dcmake_prefix_path=['D:/work/XXXXXXX/out/build/Debug/vcpkg_installed/x64-windows/debug','D:/work/XXXXXXX/out/build/Debug/vcpkg_installed/x64-windows','D:/work/XXXXXXX/out/build/Debug/vcpkg_installed/x64-windows/share'] E:/package/vcpkg/buildtrees/fontconfig/src/2.14.2-7f52ee670b.clean 1> [CMake] Working Directory: E:/package/vcpkg/buildtrees/fontconfig/x64-windows-dbg 1> [CMake] Error code: 1 1> [CMake] See logs for more information: 1> [CMake] E:\package\vcpkg\buildtrees\fontconfig\config-x64-windows-dbg-meson-log.txt.log 1> [CMake] E:\package\vcpkg\buildtrees\fontconfig\config-x64-windows-dbg-out.log

the config-x64-windows-dbg-out.log

..\src\2.14.2-7f52ee670b.clean\meson.build:47:0: ERROR: <PythonExternalProgram 'python' -> ['E:/package/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe']> is not a valid python or it is missing distutils

A full log can be found at E:\package\vcpkg\buildtrees\fontconfig\x64-windows-dbg\meson-logs\meson-log.txt

Unusable script 'E:/package/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe' Could not introspect Python (['E:/package/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe', 'C:\Users\XXXX~1\AppData\Local\Temp\tmpyj1y644f.py']): exit code 1 Program stdout:

Program stderr:

Traceback (most recent call last): File "C:\Users\YUNTIA~1\AppData\Local\Temp\tmpyj1y644f.py", line 5, in import distutils.command.install ModuleNotFoundError: No module named 'distutils'

..\src\2.14.2-7f52ee670b.clean\meson.build:47:0: ERROR: <PythonExternalProgram 'python' -> ['E:/package/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe']> is not a valid python or it is missing distutils

AdamJue commented 4 hours ago

This issue occurred when I updated to E:\package\vcpkg>vcpkg.exe --version vcpkg package management program version 2024-10-18-e392d7347fe72dff56e7857f7571c22301237ae6

AdamJue commented 4 hours ago

I found a temporary solution. In the previous version of python-3.11.8-x64, I copied the DLLs Lib Scripts three folders to python-3.12.7-x64, and now it can run normally

MonicaLiu0311 commented 3 minutes ago
PS E:\vcpkg> ./vcpkg version
vcpkg package management program version 2024-10-18-e392d7347fe72dff56e7857f7571c22301237ae6

See LICENSE.txt for license information.

Sorry I didn't repro your issue.

PS E:\vcpkg> ./vcpkg install fontconfig --binarysource=clear
Computing installation plan...
The following packages will be built and installed:
    fontconfig:x64-windows@2.15.0#1
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe
Installing 1/1 fontconfig:x64-windows@2.15.0#1...
Building fontconfig:x64-windows@2.15.0#1...
-- Downloading https://www.python.org/ftp/python/3.12.7/python-3.12.7-embed-amd64.zip -> python-3.12.7-embed-amd64.zip...
-- Found Python version '3.12.7 at E:/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe'
-- Using meson: E:/vcpkg/downloads/tools/meson-1.5.1-81f7e3/meson.py
-- Using cached fontconfig-fontconfig-2.15.0.tar.gz.
-- Cleaning sources at E:/vcpkg/buildtrees/fontconfig/src/2.15.0-0e63e07859.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source E:/vcpkg/downloads/fontconfig-fontconfig-2.15.0.tar.gz
-- Applying patch no-etc-symlinks.patch
-- Applying patch libgetopt.patch
-- Applying patch fix-wasm-shared-memory-atomics.patch
-- Using source at E:/vcpkg/buildtrees/fontconfig/src/2.15.0-0e63e07859.clean
-- Found external ninja('1.11.0').
-- Using cached msys2-mingw-w64-x86_64-pkgconf-1~2.2.0-1-any.pkg.tar.zst.
-- Using cached msys2-msys2-runtime-3.5.3-3-x86_64.pkg.tar.zst.
-- Using msys root at E:/vcpkg/downloads/tools/msys2/1e74ca60daa10104
-- Configuring x64-windows-dbg
-- Getting CMake variables for x64-windows
-- 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: E:/vcpkg/packages/fontconfig_x64-windows/lib/pkgconfig/fontconfig.pc
-- Fixing pkgconfig file: E:/vcpkg/packages/fontconfig_x64-windows/debug/lib/pkgconfig/fontconfig.pc
-- Installing: E:/vcpkg/packages/fontconfig_x64-windows/share/fontconfig/usage
-- Installing: E:/vcpkg/packages/fontconfig_x64-windows/share/fontconfig/copyright
-- Performing post-build validation
Elapsed time to handle fontconfig:x64-windows: 47 s
fontconfig:x64-windows package ABI: a1c5d99f289377f23a2a5b956239f5b0af7820b1b78d62295310f438ee8036b6
Total install time: 47 s
fontconfig is compatible with built-in CMake targets:

    find_package(Fontconfig REQUIRED) # since CMake 3.14
    target_link_libraries(main PRIVATE Fontconfig::Fontconfig)