conan-center-index: [package] conan-boost: cant install the boost::mpi library

I dont know if this is a bug per say, but it is at least a problem which makes a part of the boost library uninstallable, and is easilly fixable. I would create a pull request if I knew how to, sorry…

When boost is installing, the boost::mpi library along with assosiated components in various other boost libraries are only istalled if the following line is added to the user-config.cam:

using mpi ;

This file is being autogenerated by the conanfile.py, so it is not possible to just add this line manually. An easy fix would be to add the following code on line 748 of the conanfile.py:

        if self.options.custom_userconfig:
            contents += '\n' + self.options.custom_userconfig

And we could thus in our conanfile.txt specify,

[options]
boost::custom_userconfig="using mpi ;"

or similar, I dont quite understand how string literalts work in conan.txt files

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

@oleurodecision something like that could work, yes. however, that needs an error handling for the following case:

  1. user specifies without_mpi=False, he wants to build with MPI support
  2. there is no valid MPI installation on the machine
  3. boost silently turns MPI off, build successfully, but without MPI libraries
  4. as result users gets package with incorrect package id - it’s labeled as built with MPI support, but actually it wasn’t

this needs to be tested if there is an error handling to be added to prevent such incorrect builds. if you can confirm that it’s not needed (e.g. you tested it, and boost refuses to build instead off silently turning MPI support off), then I think we’re good to go for the first iteration. feel free to submit PR in such a case.

what we can do is to add some options to specify mpi implementation, then conan will include that during the generation of user-config.yml.

Yes yes absolutely, in order to compile it! Of cause it would be nice if conan could also handle this part, but for most places where this library would be used (clusters, supercomputers) the system admins have already installed (multiple) MPI implementations. I think most users of boost.mpi would be well aware that this is something they would have to install themselves externally to conan (like the rest of the compiler).

The point is just that without this change, I dont know that i can use conan to install boost at all, since it it just missing this one build flag which i cant add.