microsoft / vcpkg

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

[qtbase] build failure #40663

Closed gauvindigital closed 5 days ago

gauvindigital commented 2 weeks ago

Operating system

Windows 11 Pro 64bit 23H2

Compiler

Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe

Steps to reproduce the behavior

The building of qtbase breaks when attempting to install vtk[qt] for x64-windows in manifest mode. Even after updating VCPKG to the latest: vcpkg package management program version 2024-08-01-fd884a0d390d12783076341bd43d77c3a6a15658

Here's my vcpkg.json :

{
  "dependencies": [
    "boost",
    "eigen3",
    "opencv4",
    "opengl",
    "pcl",
    {
        "name": "vtk",
        "features": ["qt"]
    }
  ]
}

Failure logs

error: building qtbase:x64-windows failed with: BUILD_FAILED

I have the following error in the file config-x64-windows-out.log:

ERROR: Feature "libresolv": Forcing to "ON" breaks its condition:
    WrapResolv_FOUND
Condition values dump:
    WrapResolv_FOUND = "FALSE"

Additional context

The discussion started in the issuee #40188. Sorry, I cannot find the issue_body.md as shown in the submit instructions video.

dg0yt commented 2 weeks ago

Builds in vpckg CI.

Show more console output. In particular versions.

gauvindigital commented 2 weeks ago

Here's the output of the command vcpkg install in the same directory as vcpkg.json:

Loading dependency information for 196 packages...
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe
The following packages will be built and installed:
  * qtbase[brotli,concurrent,core,dbus,default-features,dnslookup,doubleconversion,freetype,gui,harfbuzz,icu,jpeg,network,opengl,openssl,pcre2,png,sql,sql-psql,sql-sqlite,testlib,thread,widgets,zstd]:x64-windows@6.7.2#1 -- C:\Users\Algo\AppData\Local\vcpkg\registries\git-trees\b8c493a18ed293e1418f464515c9f9ddf3dc1bfe
  * qtdeclarative:x64-windows@6.7.2 -- C:\Users\Algo\AppData\Local\vcpkg\registries\git-trees\d18ad15012eece55713ca8368a507e8b23aca23a
  * qtlanguageserver:x64-windows@6.7.2 -- C:\Users\Algo\AppData\Local\vcpkg\registries\git-trees\73d80827ea2556ac83097f97ace0d10a35281ca8
  * qtshadertools:x64-windows@6.7.2 -- C:\Users\Algo\AppData\Local\vcpkg\registries\git-trees\c058f515defa5ab7c5e80973b38573e52d855d81
  * qtsvg:x64-windows@6.7.2 -- C:\Users\Algo\AppData\Local\vcpkg\registries\git-trees\9b25930a5f904d3dbb1fa4cbdb339c1be3641c51
    vtk[core,qt]:x64-windows@9.3.0-pv5.12.1#3 -- C:\Users\Algo\AppData\Local\vcpkg\registries\git-trees\dbdb5ecd3e43e28d167883d384b471f65eb59012
Additional packages (*) will be modified to complete this operation.
Restored 0 package(s) from C:\Users\Algo\AppData\Local\vcpkg\archives in 186 us. Use --debug to see more details.
Installing 1/6 qtbase[brotli,concurrent,core,dbus,default-features,dnslookup,doubleconversion,freetype,gui,harfbuzz,icu,jpeg,network,opengl,openssl,pcre2,png,sql,sql-psql,sql-sqlite,testlib,thread,widgets,zstd]:x64-windows@6.7.2#1...
Building qtbase[brotli,concurrent,core,dbus,default-features,dnslookup,doubleconversion,freetype,gui,harfbuzz,icu,jpeg,network,opengl,openssl,pcre2,png,sql,sql-psql,sql-sqlite,testlib,thread,widgets,zstd]:x64-windows@6.7.2#1...
C:\Users\Algo\AppData\Local\vcpkg\registries\git-trees\b8c493a18ed293e1418f464515c9f9ddf3dc1bfe: info: installing overlay port from here
-- Using cached qtbase-everywhere-src-6.7.2.tar.xz.
-- Cleaning sources at C:/Users/Algo/vcpkg/buildtrees/qtbase/src/here-src-6-f39f712233.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/Algo/vcpkg/downloads/qtbase-everywhere-src-6.7.2.tar.xz
-- Applying patch allow_outside_prefix.patch
-- Applying patch config_install.patch
-- Applying patch fix_cmake_build.patch
-- Applying patch harfbuzz.patch
-- Applying patch fix_egl.patch
-- Applying patch fix_egl_2.patch
-- Applying patch installed_dir.patch
-- Applying patch GLIB2-static.patch
-- Applying patch clang-cl_source_location.patch
-- Applying patch clang-cl_QGADGET_fix.diff
-- Applying patch fix-host-aliasing.patch
-- Applying patch fix_deploy_windows.patch
-- Applying patch env.patch
-- Applying patch dont_force_cmakecache_latest.patch
-- Using source at C:/Users/Algo/vcpkg/buildtrees/qtbase/src/here-src-6-f39f712233.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: "C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v
    Working Directory: C:/Users/Algo/vcpkg/buildtrees/qtbase/x64-windows-rel/vcpkg-parallel-configure
    Error code: 1
    See logs for more information:
      C:\Users\Algo\vcpkg\buildtrees\qtbase\config-x64-windows-dbg-CMakeCache.txt.log
      C:\Users\Algo\vcpkg\buildtrees\qtbase\config-x64-windows-rel-CMakeCache.txt.log
      C:\Users\Algo\vcpkg\buildtrees\qtbase\config-x64-windows-dbg-CMakeConfigureLog.yaml.log
      C:\Users\Algo\vcpkg\buildtrees\qtbase\config-x64-windows-rel-CMakeConfigureLog.yaml.log
      C:\Users\Algo\vcpkg\buildtrees\qtbase\config-x64-windows-out.log

Call Stack (most recent call first):
  C:/Users/Algo/dev/Aemulus/aemulator/vcpkg_installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_configure.cmake:269 (vcpkg_execute_required_process)
  C:/Users/Algo/AppData/Local/vcpkg/registries/git-trees/b8c493a18ed293e1418f464515c9f9ddf3dc1bfe/cmake/qt_install_submodule.cmake:147 (vcpkg_cmake_configure)
  C:/Users/Algo/AppData/Local/vcpkg/registries/git-trees/b8c493a18ed293e1418f464515c9f9ddf3dc1bfe/cmake/qt_install_submodule.cmake:341 (qt_cmake_configure)
  C:/Users/Algo/AppData/Local/vcpkg/registries/git-trees/b8c493a18ed293e1418f464515c9f9ddf3dc1bfe/portfile.cmake:307 (qt_install_submodule)
  scripts/ports.cmake:192 (include)

error: building qtbase:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle qtbase:x64-windows: 1.1 min
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+qtbase
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[qtbase]+Build+error+on+x64-windows&body=Copy+issue+body+from+C%3A%2FUsers%2FAlgo%2Fdev%2FAemulus%2Faemulator%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md
JonLiu1993 commented 2 weeks ago

@gauvindigital, I cannot reproduce your error using the vcpkg.json file you provided locally, could you delete your cache and try again? Or can you make sure your repository has applied the fix from PR https://github.com/microsoft/vcpkg/pull/40189/files.


The OpenGL SDK is highly platform dependent and is usually an OS component. It's not realistic to build from source for every platform.

    WINDOWS: is part of the Windows SDK which this package installs.
    LINUX: the SDK may be installed from your distro's repo or from 3rd parties manually. There are too many to count.
    APPLE: consult your distribution vendor on the state of OpenGL support: https://support.apple.com/en-us/HT202823

The package pcl provides CMake targets:

    find_package(PCL CONFIG REQUIRED)
    target_link_libraries(main PRIVATE ${PCL_LIBRARIES})

The package vtk provides CMake targets:

    find_package(VTK REQUIRED)
    target_link_libraries(main PRIVATE ${VTK_LIBRARIES})
12udi commented 2 weeks ago

I can reproduce the issue on Linux host when trying to build for x64-android triplet

ERROR: Feature "libresolv": Forcing to "ON" breaks its condition: WrapResolv_FOUND Condition values dump: WrapResolv_FOUND = "FALSE"

config-x64-android-out.log

gauvindigital commented 2 weeks ago

I solved my problem.

I am still new to VCPKG. I was not aware of my vcpkg-configuration.json file, wich contained the baseline parameter specifying an old version of vcpkg, freezing my packages to before this issue was fixed.

Sorry for the false alarm, but it might have been useful to flag a problem with Android... @12udi, how is it going on your side?

12udi commented 1 week ago

So far i could not achieve any progress. I will try to clean my cache and raise a ticket otherwise. Thanks for the feedback @gauvindigital

Update: tried with clean cache and updated baseline. Therefore I opened another issue request for android https://github.com/microsoft/vcpkg/issues/40762