Closed diphdawuqi closed 5 months ago
Please use Developer Command Prompt for VS 2022
and try again.
Please use
Developer Command Prompt for VS 2022
and try again.
I tested it and got the same result, but I did not use the vcpkg that comes with VS2022. Instead, I obtained one from GitHub. Does this matter?
I have got the warning:
warning: The vcpkg D:\dev\vcpkg\vcpkg.exe is using detected vcpkg root D:\dev\vcpkg and ignoring mismatched VCPKG_ROOT environment value d:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg. To suppress this message, unset the environment variable or use the --vcpkg-root command line switch.
The local build passed of command vcpkg install gdal:x64-windows
, please run bootstrap-vcpkg.bat
to update vcpkg.exe
and try again.
The local build passed of command
vcpkg install gdal:x64-windows
, please runbootstrap-vcpkg.bat
to updatevcpkg.exe
and try again.
I deleted the entire vcpkg and the local msys2, reinstalled vcpkg, and it seems to be working now, although I still don't understand what the issue was.
Package: libpq[core,lz4,openssl,zlib]:x64-windows -> 16.2#1
Host Environment
To Reproduce
vcpkg install gdal:x64-windows
Failure logsD:\dev\vcpkg\buildtrees\libpq\config-x64-windows-dbg-err.log
``` configure: WARNING: unrecognized options: --without-nls, --without-xml, --without-xslt, --disable-silent-rules, --enable-shared, --disable-static configure: error: C compiler "compile cl.exe" does not support C99 ```D:\dev\vcpkg\buildtrees\libpq\config-x64-windows-dbg-out.log
``` checking build system type... x86_64-pc-mingw32 checking host system type... x86_64-pc-mingw32 checking which template to use... win32 checking whether NLS is wanted... no checking for default port number... 5432 checking for block size... 8kB checking for segment size... 1GB checking for WAL block size... 8kB checking whether the C compiler works... yes checking for C compiler default output file name... conftest.exe checking for suffix of executables... .exe checking whether we are cross compiling... yes checking for suffix of object files... obj checking whether the compiler supports GNU C... no checking whether compile cl.exe accepts -g... yes checking for compile cl.exe option to enable C11 features... unsupported checking for compile cl.exe option to enable C99 features... unsupported checking for compile cl.exe option to enable C89 features... unsupported ```D:\dev\vcpkg\buildtrees\libpq\config-x64-windows-dbg-config.log
``` This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by PostgreSQL configure 16.2, which was generated by GNU Autoconf 2.71. Invocation command line was $ ././configure --build=x86_64-pc-mingw32 --without-icu --with-lz4 --without-nls --with-openssl --without-readline --without-xml --without-xslt --with-zlib --without-zstd ac_cv_prog_ac_ct_STRIP=: gl_cv_double_slash_root=yes ac_cv_func_memmove=yes --disable-silent-rules --verbose --enable-shared --disable-static --enable-debug --prefix=/D/dev/vcpkg/installed/x64-windows/debug '--bindir=${prefix}/../tools/libpq/debug/bin' '--sbindir=${prefix}/../tools/libpq/debug/sbin' '--libdir=${prefix}/lib' '--includedir=${prefix}/../include' '--datarootdir=${prefix}/share/libpq' ## Platform. ## ## --------- ## hostname = LAPTOP-N8C9HH01 uname -m = x86_64 uname -r = 3.4.10.x86_64 uname -s = MSYS_NT-10.0-19045 uname -v = 2023-12-22 10:06 UTC /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = x86_64 /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/ PATH: /d/dev/vcpkg/downloads/tools/win_bison/2.5.25/ PATH: /d/dev/vcpkg/downloads/tools/perl/5.38.0.1/perl/bin/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/HostX64/x64/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/VC/VCPackages/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/bin/Roslyn/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Team Tools/Performance Tools/x64/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Team Tools/Performance Tools/ PATH: /d/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/x64/ PATH: /d/Program Files (x86)/Microsoft Visual Studio/Shared/Common/VSPerfCollectionTools/vs2019/ PATH: /c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/FSharp/Tools/ PATH: /d/Windows Kits/10/bin/10.0.22000.0/x64/ PATH: /d/Windows Kits/10/bin/x64/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/ PATH: /c/Windows/Microsoft.NET/Framework64/v4.0.30319/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/Tools/ PATH: /d/dev/vcpkg/downloads/tools/powershell-core-7.2.16-windows/ PATH: /d/dev/vcpkg/scripts/buildsystems/make_wrapper/ PATH: /usr/share/automake-1.16/ PATH: /usr/bin/ PATH: /c/Windows/system32/ PATH: /c/Windows/ PATH: /c/Windows/system32/Wbem/ PATH: /c/Windows/system32/WindowsPowerShell/v1.0/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/Llvm/x64/bin/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/VC/Linux/bin/ConnectionManagerExe/ PATH: /d/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/ PATH: /d/dev/vcpkg/downloads/tools/ninja/1.10.2-windows/ PATH: /d/dev/vcpkg/downloads/tools/msys2/d33df895d441a36d/mingw64/bin/ ## Core tests. ## configure:3299: looking for aux files: install-sh config.guess config.sub configure:3312: trying ./config/ configure:3323: ./config/install-sh found configure:3341: ./config/config.guess found configure:3341: ./config/config.sub found configure:3512: checking build system type configure:3527: result: x86_64-pc-mingw32 configure:3547: checking host system type configure:3561: result: x86_64-pc-mingw32 configure:3583: checking which template to use configure:3651: result: win32 configure:3783: checking whether NLS is wanted configure:3816: result: no configure:3824: checking for default port number configure:3850: result: 5432 configure:4351: checking for block size configure:4386: result: 8kB configure:4453: checking for segment size configure:4460: result: 1GB configure:4475: checking for WAL block size configure:4511: result: 8kB configure:4684: checking for C compiler version configure:4693: compile cl.exe --version >&5 cl : Command line warning D9002 : ignoring unknown option '--version' configure:4693: compile cl.exe -v >&5 cl : Command line warning D9002 : ignoring unknown option '-v' configure:4693: compile cl.exe -V >&5 cl : Command line error D8004 : '/V' requires an argument configure:4693: compile cl.exe -qversion >&5 cl : Command line warning D9002 : ignoring unknown option '-qversion' configure:4693: compile cl.exe -version >&5 Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32534 for x64 Copyright (C) Microsoft Corporation. All rights reserved. cl : Command line warning D9002 : ignoring unknown option '-version' cl : Command line error D8003 : missing source filename configure:4704: $? = 2 configure:4724: checking whether the C compiler works configure:4746: compile cl.exe -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS -D_DEBUG -Xlinker -Xlinker -Xlinker -LIBPATH:D:/dev/vcpkg/installed/x64-windows/debug/lib -Xlinker -Xlinker -Xlinker -LIBPATH:D:/dev/vcpkg/installed/x64-windows/debug/lib/manual-link -Xlinker -Xlinker -Xlinker -machine:x64 -Xlinker -Xlinker -Xlinker -nologo -Xlinker -Xlinker -Xlinker -debug -Xlinker -Xlinker -Xlinker -INCREMENTAL conftest.c -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 >&5 LINK : warning LNK4044: unrecognized option '/Xlinker'; ignored configure:4750: $? = 0 configure:4800: result: yes configure:4803: checking for C compiler default output file name configure:4805: result: conftest.exe configure:4811: checking for suffix of executables configure:4818: compile cl.exe -o conftest.exe -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS -D_DEBUG -Xlinker -Xlinker -Xlinker -LIBPATH:D:/dev/vcpkg/installed/x64-windows/debug/lib -Xlinker -Xlinker -Xlinker -LIBPATH:D:/dev/vcpkg/installed/x64-windows/debug/lib/manual-link -Xlinker -Xlinker -Xlinker -machine:x64 -Xlinker -Xlinker -Xlinker -nologo -Xlinker -Xlinker -Xlinker -debug -Xlinker -Xlinker -Xlinker -INCREMENTAL conftest.c -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32 >&5 Skipped 2814 lines ... configure:5196: compile cl.exe -qlanglvl=ansi -c -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS -D_DEBUG conftest.c >&5 cl : Command line warning D9002 : ignoring unknown option '-qlanglvl=ansi' configure:5196: compile cl.exe -std -c -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS -D_DEBUG conftest.c >&5 cl : Command line warning D9002 : ignoring unknown option '-std' configure:5196: compile cl.exe -Ae -c -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS -D_DEBUG conftest.c >&5 cl : Command line warning D9002 : ignoring unknown option '-Ae' configure:5196: compile cl.exe -Aa -D_HPUX_SOURCE -c -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS -D_DEBUG conftest.c >&5 cl : Command line warning D9002 : ignoring unknown option '-Aa' configure:5196: compile cl.exe -Xc -D__EXTENSIONS__ -c -Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS -D_DEBUG conftest.c >&5 conftest.c conftest.c(24): fatal error C1189: #error: "Compiler does not advertise C89 conformance" cl : Command line warning D9002 : ignoring unknown option '-Xc' cl : Command line warning D9002 : ignoring unknown option '-Xcompiler' configure:5196: $? = 2 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "PostgreSQL" | #define PACKAGE_TARNAME "postgresql" | #define PACKAGE_VERSION "16.2" | #define PACKAGE_STRING "PostgreSQL 16.2" | #define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org" | #define PACKAGE_URL "https://www.postgresql.org/" | #define CONFIGURE_ARGS " '--build=x86_64-pc-mingw32' '--without-icu' '--with-lz4' '--without-nls' '--with-openssl' '--without-readline' '--without-xml' '--without-xslt' '--with-zlib' '--without-zstd' 'ac_cv_prog_ac_ct_STRIP=:' 'gl_cv_double_slash_root=yes' 'ac_cv_func_memmove=yes' '--disable-silent-rules' '--verbose' '--enable-shared' '--disable-static' '--enable-debug' '--prefix=/D/dev/vcpkg/installed/x64-windows/debug' '--bindir=${prefix}/../tools/libpq/debug/bin' '--sbindir=${prefix}/../tools/libpq/debug/sbin' '--libdir=${prefix}/lib' '--includedir=${prefix}/../include' '--datarootdir=${prefix}/share/libpq' 'build_alias=x86_64-pc-mingw32' 'CC=compile cl.exe' 'CFLAGS=-Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1' 'LDFLAGS=-Xlinker -Xlinker -Xlinker -LIBPATH:D:/dev/vcpkg/installed/x64-windows/debug/lib -Xlinker -Xlinker -Xlinker -LIBPATH:D:/dev/vcpkg/installed/x64-windows/debug/lib/manual-link -Xlinker -Xlinker -Xlinker -machine:x64 -Xlinker -Xlinker -Xlinker -nologo -Xlinker -Xlinker -Xlinker -debug -Xlinker -Xlinker -Xlinker -INCREMENTAL' 'LIBS=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32' 'CPPFLAGS=-DWIN32 -D_WINDOWS -D_DEBUG' 'CXX=compile cl.exe' 'CXXFLAGS=-Xcompiler -nologo -Xcompiler -W3 -Xcompiler -utf-8 -Xcompiler -GR -Xcompiler -EHsc -Xcompiler -MP -Xcompiler -MDd -Xcompiler -Z7 -Xcompiler -Ob0 -Xcompiler -Od -Xcompiler -RTC1' 'CPP=compile cl.exe -E' 'PKG_CONFIG=D:/dev/vcpkg/downloads/tools/msys2/d33df895d441a36d/mingw64/bin/pkg-config.exe' 'PKG_CONFIG_PATH=D:/dev/vcpkg/packages/libpq_x64-windows/debug/lib/pkgconfig;D:/dev/vcpkg/packages/libpq_x64-windows/share/pkgconfig;D:/dev/vcpkg/installed/x64-windows/debug/lib/pkgconfig;D:/dev/vcpkg/installed/x64-windows/share/pkgconfig'" | #define PG_MAJORVERSION "16" | #define PG_MAJORVERSION_NUM 16 | #define PG_MINORVERSION_NUM 2 | #define PG_VERSION "16.2" | #define DEF_PGPORT 5432 | #define DEF_PGPORT_STR "5432" | #define BLCKSZ 8192 | #define RELSEG_SIZE 131072 | #define XLOG_BLCKSZ 8192 | /* end confdefs.h. */ | /* Does the compiler advertise C89 conformance? | Do not test the value of __STDC__, because some compilers set it to 0 | while being otherwise adequately conformant. */ | #if !defined __STDC__ | # error "Compiler does not advertise C89 conformance" | #endif | #include