microsoft / vcpkg

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

[libpq] Build error on x64-windows #40113

Open Hurrieam opened 1 month ago

Hurrieam commented 1 month ago

Package: libpq[core,lz4,openssl,zlib]:x64-windows@16.2#1

Host Environment

To Reproduce

vcpkg install qt

Failure logs

-- Using cached postgresql-16.2.tar.bz2.
-- Cleaning sources at C:/Users/hurri/.vcpkg-clion/vcpkg/buildtrees/libpq/src/tgresql-16-b00fbb6ff2.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/hurri/.vcpkg-clion/vcpkg/downloads/postgresql-16.2.tar.bz2
-- Applying patch unix/installdirs.patch
-- Applying patch unix/fix-configure.patch
-- Applying patch unix/single-linkage.patch
-- Applying patch unix/no-server-tools.patch
-- Applying patch unix/mingw-install.patch
-- Applying patch unix/python.patch
-- Applying patch windows/macro-def.patch
-- Applying patch windows/win_bison_flex.patch
-- Applying patch windows/msbuild.patch
-- Applying patch windows/spin_delay.patch
-- Applying patch android/unversioned_so.patch
-- Using source at C:/Users/hurri/.vcpkg-clion/vcpkg/buildtrees/libpq/src/tgresql-16-b00fbb6ff2.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Building x64-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: C:/Users/hurri/.vcpkg-clion/vcpkg/downloads/tools/perl/5.38.0.1/perl/bin/perl.exe build.pl DEBUG libpq
    Working Directory: C:/Users/hurri/.vcpkg-clion/vcpkg/buildtrees/libpq/x64-windows-dbg/src/tools/msvc
    Error code: 255
    See logs for more information:
      C:\Users\hurri\.vcpkg-clion\vcpkg\buildtrees\libpq\build-libpq-x64-windows-dbg-err.log

Call Stack (most recent call first):
  ports/libpq/build-msvc.cmake:67 (vcpkg_execute_required_process)
  ports/libpq/portfile.cmake:74 (build_msvc)
  scripts/ports.cmake:192 (include)
C:\Users\hurri\.vcpkg-clion\vcpkg\buildtrees\libpq\build-libpq-x64-windows-dbg-err.log ``` Unable to determine Visual Studio version: The nmake version could not be determined. at C:/Users/hurri/.vcpkg-clion/vcpkg/buildtrees/libpq/x64-windows-dbg/src/tools/msvc/Mkvcbuild.pm line 97. ```
github-actions[bot] commented 4 weeks ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

LilyWangLL commented 3 weeks ago

This issue can't repro on the latest vcpkg.

Installing 10/10 libpq[core,lz4,openssl,zlib]:x64-windows@16.4...
Building libpq[core,lz4,openssl,zlib]:x64-windows@16.4...
-- Downloading https://ftp.postgresql.org/pub/source/v16.4/postgresql-16.4.tar.bz2;https://www.mirrorservice.org/sites/ftp.postgresql.org/source/v16.4/postgresql-16.4.tar.bz2 -> postgresql-16.4.tar.bz2...
-- Extracting source F:/Users/.vcpkg-clion/vcpkg/downloads/postgresql-16.4.tar.bz2
-- Applying patch unix/installdirs.patch
-- Applying patch unix/fix-configure.patch
-- Applying patch unix/single-linkage.patch
-- Applying patch unix/no-server-tools.patch
-- Applying patch unix/mingw-install.patch
-- Applying patch unix/python.patch
-- Applying patch windows/macro-def.patch
-- Applying patch windows/win_bison_flex.patch
-- Applying patch windows/msbuild.patch
-- Applying patch windows/spin_delay.patch
-- Applying patch android/unversioned_so.patch
-- Using source at F:/Users/.vcpkg-clion/vcpkg/buildtrees/libpq/src/tgresql-16-0b2040c781.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Downloading https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip -> win_flex_bison-2.5.25.zip...
-- Building x64-windows-dbg
-- Installing x64-windows-dbg
-- Building x64-windows-rel
-- Installing x64-windows-rel
-- 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 F:/Users/.vcpkg-clion/vcpkg/downloads/tools/msys2/1e74ca60daa10104
-- Installing: F:/Users/.vcpkg-clion/vcpkg/packages/libpq_x64-windows/share/libpq/usage
-- Installing: F:/Users/.vcpkg-clion/vcpkg/packages/libpq_x64-windows/share/libpq/copyright
-- Performing post-build validation
Elapsed time to handle libpq:x64-windows: 7.9 min
libpq:x64-windows package ABI: 6039ae8e516859b8f0b2eb4852db0fba9c12cc65a4d148cf1bf2c4be288be963
Total install time: 26 min
The package libpq provides CMake integration:

    find_package(PostgreSQL REQUIRED)
    target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL)

PS F:\Users\.vcpkg-clion\vcpkg> .\vcpkg.exe --version
vcpkg package management program version 2024-08-01-fd884a0d390d12783076341bd43d77c3a6a15658