Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt 6.5.0 install issue with Conan 1.60.1 on Windows 10 #18141

Open
silicode17 opened this issue Jun 29, 2023 · 5 comments
Open

Qt 6.5.0 install issue with Conan 1.60.1 on Windows 10 #18141

silicode17 opened this issue Jun 29, 2023 · 5 comments

Comments

@silicode17
Copy link

I am having the following issue when trying to do a conan install of Qt 6.5.0.
This issue also happens with Qt 6.4.*, but not with Qt 6.3.1 for some reason:

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.6.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
-- Using vcpkg from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg
-- CMAKE_TOOLCHAIN_FILE is: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake
-- VCPKG_CHAINLOAD_TOOLCHAIN_FILE is: C:/.conan/feba50/1/build/generators/conan_toolchain.cmake
-- Using Conan toolchain: C:/.conan/feba50/1/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting BUILD_SHARED_LIBS = ON
-- The CXX compiler identification is MSVC 19.36.32535.0
-- The C compiler identification is MSVC 19.36.32535.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe
-- Detecting CXX compiler ABI info
CMake Error at C:/.conan/feba50/1/build/generators/conan_toolchain.cmake:30 (message):
  The CMake policy CMP0091 must be NEW, but is ''
Call Stack (most recent call first):
  C:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:208 (include)
  C:/.conan/feba50/1/build/CMakeFiles/3.25.3/CMakeSystem.cmake:6 (include)
  C:/.conan/feba50/1/build/CMakeFiles/CMakeScratch/TryCompile-yvnavs/CMakeLists.txt:6 (project)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error at C:/Users/joe/.conan/data/cmake/3.25.3/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/share/cmake-3.25/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  C:/Users/joe/.conan/data/cmake/3.25.3/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/share/cmake-3.25/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:17 (project)


-- Configuring incomplete, errors occurred!
See also "C:/.conan/feba50/1/build/CMakeFiles/CMakeOutput.log".
See also "C:/.conan/feba50/1/build/CMakeFiles/CMakeError.log".
qt/6.5.0:
qt/6.5.0: ERROR: Package '53de4d8442b43e5beb4afdecca6a06399110f269' build failed
qt/6.5.0: WARN: Build folder C:\.conan\feba50\1\build
ERROR: qt/6.5.0: Error in build() method, line 733
        cmake.configure()
        ConanException: Error 1 while executing cmake -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="C:/.conan/feba50/1/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/.conan/1faa80/1" -DCMAKE_TRY_COMPILE_CONFIGURATION="Release" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "C:\.conan\eeefcc\1\src"

The command I am using is:

conan install .. --build=missing

Here is my conan.txt file:

[requires]
qt/6.5.0

[generators]
cmake_paths
cmake_find_package

[options]
qt:shared=True
qt:qtmultimedia=True
qt:disabled_features=gstreamer

[imports]
bin, *.dll -> ./bin
lib, *.dylib* -> ./bin
plugins, platforms/* -> ./bin
plugins, mediaservice/* -> ./bin

@evgeniy-russkih
Copy link

Problem appears when VS 2022 is selected. Switching to VS 2019 might help

@JakobWeissOP
Copy link

Did anyone have any further insights on this?

I'm seeing the same issue here when trying to locally compile Qt 6.5.2. Originally I had the exact same versions as the OP (VS 17.4.6 MSVC 19.36.32535.0, cmake 3.25.3).
I also tried updating MSVC to the latest version (VS 17.7.3) and also attempted to modify the recipe to update the required cmake to use an updated one, but I still get the same errors:

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.7.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
-- Using vcpkg from C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\vcpkg
-- Using vcpkg triplet x64-windows
-- CMAKE_TOOLCHAIN_FILE is: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/vcpkg/scripts/buildsystems/vcpkg.cmake
-- VCPKG_CHAINLOAD_TOOLCHAIN_FILE is: C:/.conan/0e1332/1/build/generators/conan_toolchain.cmake
-- Using Conan toolchain: C:/.conan/0e1332/1/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting BUILD_SHARED_LIBS = ON
-- The CXX compiler identification is MSVC 19.37.32822.0
-- The C compiler identification is MSVC 19.37.32822.0
-- The ASM compiler identification is MSVC
-- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
-- Detecting CXX compiler ABI info
CMake Error at C:/.conan/0e1332/1/build/generators/conan_toolchain.cmake:30 (message):
  The CMake policy CMP0091 must be NEW, but is ''
Call Stack (most recent call first):
  C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:209 (include)
  C:/.conan/0e1332/1/build/CMakeFiles/3.27.4/CMakeSystem.cmake:6 (include)
  C:/.conan/0e1332/1/build/CMakeFiles/CMakeScratch/TryCompile-41z8n1/CMakeLists.txt:6 (project)


CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error at C:/Users/JakobWeiss/.conan/data/cmake/3.27.4/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/share/cmake-3.27/Modules/CMakeDetermineCompilerABI.cmake:57 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  C:/Users/JakobWeiss/.conan/data/cmake/3.27.4/_/_/package/ca33edce272a279b24f87dc0d4cf5bbdcffbc187/share/cmake-3.27/Modules/CMakeTestCXXCompiler.cmake:26 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:17 (project)

@paulharris
Copy link
Contributor

Hey peoples, I have a solution for you. I hit this myself on a new Windows computer.
The clue is this line in your log:
-- Using vcpkg from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg

QT's CMake files feature a "helpful" vcpkg autodetection routine that injects vcpkg's toolchain file into the build.

I uninstalled vcpkg and was able to build without further problems.

ericLemanissier added a commit to ericLemanissier/conan-center-index that referenced this issue Sep 22, 2023
@ericLemanissier
Copy link
Contributor

This is fixed by #20186

@paulharris
Copy link
Contributor

@VicKov1975 is it working for you now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants