Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cant create boost conan package from conan-center-index - "conanfile didn't specify version"

Tags:

conan

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(

like image 841
hdnn Avatar asked Aug 31 '20 12:08

hdnn


People also ask

What is the most recent version of Conan boost?

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.

What version of boost do I need for bincrafters?

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.

What is the latest version of boost for CCI?

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.


1 Answers

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.

like image 85
uilianries Avatar answered Sep 18 '22 16:09

uilianries