I try to create conan
package of boost
library.
I got the recipe from https://github.com/conan-io/conan-center-index/tree/master/recipes/boost
When I execute command:
conan create . conan/stable
next error will appeared:
ERROR: conanfile didn't specify version
I see, that in recipe no version
member, but I don't understand how to specify it manually in that case. And no any hint from official docs on conan create
page(
You are looking for Boost 1.73.0 from Conan Center Index, which is the more recent version available in CCI. However, the idea will be using Components instead of creating a new recipe for each module.
Thus, the main idea will consuming boost/1.73.0, just like you have, but requiring only what you need: Currently, there is a Pull Request under development to provide Components in Boost. From Bincrafters side, the modular Boost update is stopped due the Conan Center Index's advantage.
You are looking for Boost 1.73.0 from Conan Center Index, which is the more recent version available in CCI. However, the idea will be using Components instead of creating a new recipe for each module. Why? We learned from Bincrafters that's hard to maintain, some fixes can affect all modules and replicating will require more effort.
Indeed the version is not listed in the recipe, but why? Because the same recipe is re-used for any version, so Conan Center Index don't need to replicate the same recipe for each new version.
All versions supported by Boost are listed in conandata.yml, which is a file with the download link and the checksum, according the version.
Thus, to build the desired version, you have to pass it with the command like. For instance, to build Boost 1.73:
cd recipes/boost/all
conan create . 1.73.0@
Note that I only passed the version, not the namespace (username/channel), because it's an official recipe from Conan Center Index, any other recipe should contain the namespace to avoid any conflict. In this case, you can use your namespace too, if you want:
cd recipes/boost/all
conan create . 1.73.0@hdnn/stable
The version in recipe is not mandatory, even without conandata.yml. When any mandatory attribute is missing (name or version), you can pass them by command line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With