[bug] conan create throws compiler.cppstd 14 vs 17 compatibility error
Describe the bug
Task is to generate static libraries out of the SDKs we currently have for various OSs.
I have generated the artifacts for my project, use it to run a conan install and cmake in the build_release folder.
I was able to generate a single lib (I changed all the settings to false where it says SHARED - so instead of .lib, .dll and some other file, it generated .lib only).
but when I run conan create ., it complains
poco/1.13.3#00..... Invalid
ERROR: There are invalid packages:
poco/1.13.3: Invalid: Current cppstd (14) is lower than the required C++ standard (17).
having 14 vs 17 CMAKE_CXX_STANDARD issue. I made sure CMakeLists file sets this parameter to 17.
even ran the command with 17 explicitly mentioned:
conan install . -o xf_iam_client/*:shared=False --output-folder=build_release --build=missing --profile build_profiles\win_x86_64_msvc_17_193_Release -s compiler.cppstd=17 -v trace
Need help with this error. thanks.
other things I did:
-
Installed MSVC 2019 first, then downloaded 2022.
-
cleared cache, cleaned the builds, rebuild the file structure, build_release folder is deleted and started over the process using
cmake --build . --config Release
-
explicitly ran this in the command: "-s:b compiler.cppstd=17" with no luck. Still face the same issue.
How to reproduce it
No response
Hi @raja777m
Thanks for your question.
Can you please provide the full output of your command:
conan install . -o xf_iam_client/*:shared=False --output-folder=build_release --build=missing --profile build_profiles\win_x86_64_msvc_17_193_Release -s compiler.cppstd=17 -v trace
It is the same error you are seeing with your conan create command?
libmysqlclient/8.1.0...:... Found compatible package '0053d9bef44c62d19f375345e9e8cafab3a93f01'...:... compiler.cppstd=17, compiler.version=193 xf_iam_client/1.5.0...:... Forced build from source Requirements bzip2/1.0.8#d00dac990f0...:...dcd92f747316b#e4be58625c9 - Cache expat/2.6.3#39b80d3109f...:...e3bc6c2b7aa94#3d20caa0e25 - Cache libmysqlclient/8.1.0#ecca1993f7ce...:...cafab3a93f01#7a8e8d3d5fc - Download (conan) libpq/15.4#a3354d5562...:...d863f4ee516906#516a713c21a - Download (conan) lz4/1.9.4#652b313a044...:...ddedaa7480a0f#344a14a16a8 - Download (conan) openssl/3.3.2#9f9f130d58e7c1...:...c013b3b876#10e07e23cb5 - Cache pcre2/10.42#ac2227071f79a06...:...3285f711c#083959701fd - Cache poco/1.13.3#007642154974b1f...:...b60d38882 - Invalid sqlite3/3.45.0#3a7911478ffd14e7ac...:...af2f1c#1679ee42ecd31 - Download (conan) xf_iam_client/1.5.0#b306d6a55335e...:...1587e01c3a1 - Build zlib/1.3.1#f52e03ae3d251de...:...aa7480a0f#20d106bc7415a - Cache zstd/1.5.5#1f239731dc45147...:...6dcb636f7#6fa72401b4d28 - Download (conan) Build requirements Skipped binaries nasm/2.16.01, strawberryperl/5.32.1.1 ERROR...:... There are invalid packages...:... poco/1.13.3...:... Invalid...:... Current cppstd (14) is lower than the required C++ standard (17).
The above is what I get for:
conan create .
I get this happy message: Install finished successfully
when I run:
conan install . -o xf_iam_client/*:shared=False --output-folder=build_release --build=missing --profile build_profiles\win_x86_64_msvc_17_193_Release -s:b compiler.cppstd=17 -v trace
You need to pass the same arguments to the conan create, specially the compiler.cppstd=17, so something like:
conan create . <other args, profile, etc> -s compiler.cppstd=17
Hi @raja777m
Did you try that conan create? Thanks for the feedback.
Hi @raja777m
Any further question or issue? Thanks!
I am closing this ticket as resolved, but please don't hesitate to create new tickets for any further question or issue. Thanks for your feedback.