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

boost: be more strict about boost libraries #3999

Merged
merged 9 commits into from
Jan 2, 2021

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Dec 26, 2020

Specify library name and version: boost/all

After this pr, the libraries are added more stricter.
Before, it allowed missing libraries.
Now we/I better understand how boost builds libraries (or does not), it is possible to be more explicit/strict about adding libraries.
Most importantly, this will result in clearer error messages.


The situation this pr hopes to fix is the following:
Because Boost.Build silently doesn't build boost libraries when some precondition fails, some boost component/module could become unavailable and some conan dependencies not used.
This results in unclear error messages, see #3992


Also, added numa option for boost_fiber_numa library.


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@conan-center-bot
Copy link
Collaborator

Some configurations of 'boost/1.69.0' failed in build 1 (d55f01fa62e0f6542f2417b3e87e4147487d5cca):

@conan-center-bot
Copy link
Collaborator

Some configurations of 'boost/1.69.0' failed in build 2 (aa40beb726b3af6f20caed5ffa8d98f4da9b2267):

@conan-center-bot
Copy link
Collaborator

Some configurations of 'boost/1.69.0' failed in build 3 (6a358efca602f45aeb87233f470adccf59b642e1):

@conan-center-bot
Copy link
Collaborator

All green in build 4 (e00ca36dbd4e615af84660472c855636e2aebe42)! 😊

prince-chrismc
prince-chrismc previously approved these changes Dec 27, 2020
Comment on lines +265 to +266
if self.settings.compiler == "Visual Studio" and self.options.shared and self.options.numa:
raise ConanInvalidConfiguration("Cannot build a shared boost with numa support on Visual Studio")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prince-chrismc
The limitation to shared is intentional.
dll's don't allow missing symbols, static libraries allow it.
This means a static numa library can be built, but not a shared library.

I said: it can be built. I didn't say that it will work 😄

@conan-center-bot
Copy link
Collaborator

Some configurations of 'boost/1.69.0' failed in build 5 (d3d719c77092d27529732af613df1c5ef742e1e0):

@conan-center-bot
Copy link
Collaborator

Some configurations of 'boost/1.69.0' failed in build 6 (2aaa63aeb1233fbbcb04c82bfd15f9ac31991008):

@conan-center-bot
Copy link
Collaborator

All green in build 7 (cc2b8b41cc203accbd6791136edc414e7544efde)! 😊

Co-authored-by: Uilian Ries <uilianries@gmail.com>
@conan-center-bot
Copy link
Collaborator

An unexpected error happened and has been reported. Help is on its way! 🏇

@conan-center-bot
Copy link
Collaborator

All green in build 9 (840b7ce4de04ef9b164fe6b3f8cd707deb35fcac)! 😊

@conan-center-bot conan-center-bot merged commit 552189c into conan-io:master Jan 2, 2021
@madebr madebr deleted the boost_strict branch January 2, 2021 08:48
@garethsb
Copy link
Contributor

garethsb commented Jan 5, 2021

After this PR, when GitHub Actions are building on macOS, I see a new failure:

2021-01-05T11:19:55.3633560Z boost/1.72.0: WARN: Boost component 'fiber' is missing libraries. Try building boost with '-o boost:without_fiber'.
2021-01-05T11:19:55.3634940Z boost/1.72.0: WARN: Boost component 'fiber_numa' is missing libraries. Try building boost with '-o boost:without_fiber_numa'.
2021-01-05T11:19:55.3635970Z ERROR: boost/1.72.0: Error in package_info() method, line 1331
2021-01-05T11:19:55.3636810Z 	raise ConanException("These libraries were expected to be built, but were not built: {}".format(non_built))
2021-01-05T11:19:55.3638230Z 	ConanException: These libraries were expected to be built, but were not built: {'boost_fiber_numa', 'boost_fiber'}

Previously, as the description of this PR says, the recipe allowed missing libraries, understanding that Boost.Build would do the right thing for the platform.

I understand the rationale for being "explicit/strict about adding libraries", but this PR means that in order to build at all I have to exclude Boost.Fiber with:

[options]
boost:without_fiber=True

and that means a custom build always, not just a download, on all platforms.

The custom build would at least be efficient if I could easily specify just with_ options for the three or four Boost libraries I actually need, but the recipe only provides the without_ variants defaulting to False.

Any ideas?

@prince-chrismc
Copy link
Contributor

Can you share the link to the action run? Might be an issue with the profile you are running.

Are you referring to this? https://github.com/sony/nmos-cpp/runs/1649513648?check_suite_focus=true#step:20:137

In your logs it's wants boost/1.72.0:94cf772abbc62fdba36047acf49db3d6d9235ddb - Build but that package ID does not exist in CCI

https://c3i.jfrog.io/artifactory/misc/logs/pr/3999/9/boost/1.72.0/94cf772abbc62fdba36047acf49db3d6d9235ddb-build.txt shows the library being built

But this failed to build according to the logs! 😖 //cc @jgsogo @danimtb I think there are missing packages here

I do not see this revision added for boost/1.75.0 (at least there's no numa option available) on the website


Running a search I get the following Package_ID: d8e8e6181ea3a679ea2441e9703270817233cdf4 (full output attached) which matches your profile but the wrong recipe revision.

You might want to consider using recipe revisions, #3890 (comment) to avoid these kind of issues

conan-boost-macos-packages.txt

@madebr
Copy link
Contributor Author

madebr commented Jan 5, 2021

@garethsb-sony
The Macos aspect is kind of a black spot for me (I only have Linux+Windows).
There is #3977 trying to find the correct settings/configuration for Macos.

@garethsb
Copy link
Contributor

garethsb commented Jan 6, 2021

Can you share the link to the action run? Might be an issue with the profile you are running.

Are you referring to this? https://github.com/sony/nmos-cpp/runs/1649513648?check_suite_focus=true#step:20:137

I was referring to that run; the build error I mentioned is a way down, here:

https://github.com/sony/nmos-cpp/runs/1649513648?check_suite_focus=true#step:20:16982

You might want to consider using recipe revisions, #3890 (comment) to avoid these kind of issues

Thanks, @prince-chrismc, that does look helpful... more stuff to learn!

@garethsb
Copy link
Contributor

garethsb commented Jan 6, 2021

How about this:

The custom build would at least be efficient if I could easily specify just with_ options for the three or four Boost libraries I actually need, but the recipe only provides the without_ variants defaulting to False.

Have I missed a way of specifying only the components I need inclusively rather than specifying the ones I don't need?

@prince-chrismc
Copy link
Contributor

Issue was also reported #4097

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.

6 participants