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

using new conan2 arguments format #905

Closed
wants to merge 1 commit into from

Conversation

GitPaean
Copy link
Contributor

@GitPaean GitPaean commented Aug 3, 2023

Issue
cmake failure in Ubuntu 22.04 with conan 2:
-- Conan executing: /home/kaib/.local/bin/conan install . -s build_type=RelWithDebInfo -s compiler=gcc -s compiler.version=11 -s compiler.libcxx=libstdc++11 -s compiler.cppstd=17 -g=cmake_find_package -g=cmake --build=missing -o=catch2:with_main=True
ERROR: Error while initializing options. The usage of package names catch2:with_main in options is deprecated, use a pattern like catch2/*:with_main instead

Approach
following the message

@GitPaean
Copy link
Contributor Author

GitPaean commented Aug 3, 2023

Please note with the above modification, I still could not finish the cmake with the following message,

======== Finalizing install (deploy, generators) ========
conanfile.txt: Writing generators to /home/kaib/OPM-master-test/test_ecl/ecl/build
ERROR: Invalid generator 'cmake_find_package'. Available types: CMakeToolchain, CMakeDeps, MesonToolchain, MSBuildDeps, MSBuildToolchain, NMakeToolchain, NMakeDeps, VCVars, QbsProfile, VirtualRunEnv, VirtualBuildEnv, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps, BazelDeps, BazelToolchain, IntelCC, XcodeDeps, XcodeToolchain, PremakeDeps
CMake Error at build/conan.cmake:540 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  build/conan.cmake:882 (old_conan_cmake_install)
  CMakeLists.txt:61 (conan_cmake_run)

With the following modification further,

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,7 +75,7 @@ conan_cmake_run(
   BUILD
   missing
   GENERATORS
-  cmake_find_package)
+  CMakeToolchain CMakeDeps)

Then I ran into the following error message,

-- Conan: Automatic detection of conan settings from cmake
-- Conan: compiler.cppstd was added as an argument. Not using the autodetected one.
-- Conan: Settings= -s;build_type=RelWithDebInfo;-s;compiler=gcc;-s;compiler.version=11;-s;compiler.libcxx=libstdc++11;-s;compiler.cppstd=17
-- Conan: checking conan executable
-- Conan: Found program /home/kaib/.local/bin/conan
-- Conan: Version found Conan version 2.0.9
-- Conan executing: /home/kaib/.local/bin/conan install . -s build_type=RelWithDebInfo -s compiler=gcc -s compiler.version=11 -s compiler.libcxx=libstdc++11 -s compiler.cppstd=17 -g=CMakeToolchain -g=CMakeDeps -g=cmake --build=missing -o=catch2/*:with_main=True

======== Input profiles ========
Profile host:
[settings]
arch=x86_64
build_type=RelWithDebInfo
compiler=gcc
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
[options]
catch2/*:with_main=True

Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux


======== Computing dependency graph ========
Graph root
    conanfile.txt: /home/kaib/OPM-master-test/test_ecl/ecl/build/conanfile.txt
Requirements
    backward-cpp/1.6#c763b6fc98b9d07a776d9b9ace74648e - Cache
    catch2/2.13.9#17ac9b0b78c63353e304c5744e862a77 - Cache
    fmt/8.0.1#0fe66c9f79faedd3144364e3820cbdc0 - Cache
    libdwarf/20191104#7bbc43d7c21ec43ee35498bb54188253 - Cache
    libelf/0.8.13#4f70a3555809ae50cc8add44f0f84288 - Cache
    zlib/1.2.13#e377bee636333ae348d51ca90874e353 - Cache
Build requirements
    autoconf/2.71#ce232afdcd21d1269419c355375731e6 - Cache
    gnu-config/cci.20210814#15c3bf7dfdb743977b84d0321534ad90 - Cache
    m4/1.4.19#c1c4b1ee919e34630bb9b50046253d3c - Cache

======== Computing necessary packages ========
Requirements
    backward-cpp/1.6#c763b6fc98b9d07a776d9b9ace74648e:99fdeeb55a0b1ad1fc9b5300d0839b34ad061faf#7c90eb4a5a2e64114c131d21c2c9b4cb - Cache
    catch2/2.13.9#17ac9b0b78c63353e304c5744e862a77:0fcdc3a6060abc7448980d4c7fdd36941e56ec8f#069eea7d7a4dccb01bf481a4fb09f1f5 - Cache
    fmt/8.0.1#0fe66c9f79faedd3144364e3820cbdc0:c178e9641fbb0f7a86f888818d357d310bb0f069#ee8e008fa3736f04a1a06dbc82607ef0 - Cache
    libdwarf/20191104#7bbc43d7c21ec43ee35498bb54188253:ed66a8686ceba757c0a5c92ca1c707af9c981333#8bc6a3d32fe5dd22ee7c360c9181a670 - Cache
    libelf/0.8.13#4f70a3555809ae50cc8add44f0f84288:7141b46dc36f162c1999825c09b1ec68c17d6616#6e84be4287c523d79b089aa127f941a6 - Cache
    zlib/1.2.13#e377bee636333ae348d51ca90874e353:7141b46dc36f162c1999825c09b1ec68c17d6616#e49128563f8aa33879c1bd50ebe9eb2d - Cache
Build requirements
Skipped binaries
    autoconf/2.71, gnu-config/cci.20210814, m4/1.4.19

======== Installing packages ========
catch2/2.13.9: Already installed! (1 of 6)
fmt/8.0.1: Already installed! (2 of 6)
zlib/1.2.13: Already installed! (3 of 6)
libelf/0.8.13: Already installed! (4 of 6)
libdwarf/20191104: Already installed! (5 of 6)
backward-cpp/1.6: Already installed! (6 of 6)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated:     'cpp_info.names' used in: backward-cpp/1.6, fmt/8.0.1, catch2/2.13.9, zlib/1.2.13

======== Finalizing install (deploy, generators) ========
conanfile.txt: Writing generators to /home/kaib/OPM-master-test/test_ecl/ecl/build
conanfile.txt: Generator 'CMakeToolchain' calling 'generate()'
conanfile.txt: CMakeToolchain generated: conan_toolchain.cmake
conanfile.txt: Preset 'conan-relwithdebinfo' added to CMakePresets.json. Invoke it manually using 'cmake --preset conan-relwithdebinfo' if using CMake>=3.23
conanfile.txt: If your CMake version is not compatible with CMakePresets (<3.23) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/kaib/OPM-master-test/test_ecl/ecl/build/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=RelWithDebInfo'
conanfile.txt: CMakeToolchain generated: CMakePresets.json
ERROR: Invalid generator 'cmake'. Available types: CMakeToolchain, CMakeDeps, MesonToolchain, MSBuildDeps, MSBuildToolchain, NMakeToolchain, NMakeDeps, VCVars, QbsProfile, VirtualRunEnv, VirtualBuildEnv, AutotoolsDeps, AutotoolsToolchain, PkgConfigDeps, BazelDeps, BazelToolchain, IntelCC, XcodeDeps, XcodeToolchain, PremakeDeps
CMake Error at build/conan.cmake:540 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  build/conan.cmake:882 (old_conan_cmake_install)
  CMakeLists.txt:61 (conan_cmake_run)


-- Configuring incomplete, errors occurred!
See also "/home/kaib/OPM-master-test/test_ecl/ecl/build/CMakeFiles/CMakeOutput.log".

Not sure how the -g=cmake joined here.

@pinkwah
Copy link
Collaborator

pinkwah commented Dec 22, 2023

Hi! Sorry for the delay. We are currently waiting for conan-cmake to support Conan 2. Currently we require that Conan is version 1.

@GitPaean
Copy link
Contributor Author

GitPaean commented Jan 5, 2024

Thanks for the response. I will close the issue now.

@GitPaean GitPaean closed this Jan 5, 2024
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 this pull request may close these issues.

2 participants