Skip to content

Comments

Add support for modular build structure.#401

Merged
HDembinski merged 38 commits intoboostorg:developfrom
grafikrobot:modular
Jun 5, 2025
Merged

Add support for modular build structure.#401
HDembinski merged 38 commits intoboostorg:developfrom
grafikrobot:modular

Conversation

@grafikrobot
Copy link
Member

@grafikrobot grafikrobot commented Jul 20, 2024

This is part of the effort to make the Boost libraries "modular" for build and consumption. See https://lists.boost.org/Archives/boost/2024/01/255704.php and https://github.com/grafikrobot/boost-b2-modular/blob/b2-modular/README.adoc for more information.

This PR depends on the following other PRs being merged to both develop and master branches of the respective repos:

This PR will be changed to ready for review, i.e. not draft, when the above are merged. Do not merge this one until that time.

@grafikrobot grafikrobot marked this pull request as ready for review August 18, 2024 15:27
@grafikrobot
Copy link
Member Author

Please review and merge this PR at your earliest convenience.

@grafikrobot grafikrobot closed this Apr 6, 2025
@grafikrobot grafikrobot reopened this Apr 6, 2025
@HDembinski
Copy link
Collaborator

HDembinski commented Apr 18, 2025

I didn't see this, because I am not getting notifications when a PR is opened unless someone mentions me with @HDembinski. I changed something in the options of this repo, putting my email address in explicitly under email notifications. Perhaps that is what was missing.

@grafikrobot Thank you for the changes to the build. There seems to be an issue with boost.random in the slow tests, a linker error. Do you have an idea how to fix this? You also remove some extra warning flags cxxflags=-Wno-unused-parameter cxxflags=-Wno-uninitialized, why?

@grafikrobot
Copy link
Member Author

You also remove some extra warning flags cxxflags=-Wno-unused-parameter cxxflags=-Wno-uninitialized, why?

Those are for avoiding warnings in Math (IIRC) that cause errors because of the warnings-as-errors option.

@grafikrobot grafikrobot marked this pull request as draft April 29, 2025 14:03
@grafikrobot
Copy link
Member Author

@HDembinski

There seems to be an issue with boost.random in the slow tests, a linker error. Do you have an idea how to fix this?

Have those slow tests ever passed? Asking as I don't see them in previous commits.

@grafikrobot grafikrobot reopened this Apr 30, 2025
@HDembinski
Copy link
Collaborator

@HDembinski

There seems to be an issue with boost.random in the slow tests, a linker error. Do you have an idea how to fix this?

Have those slow tests ever passed? Asking as I don't see them in previous commits.

Yes, they used to pass. I only run them on PRs, but not on pushes, that's why they don't show up in the list of commits.

@HDembinski
Copy link
Collaborator

@grafikrobot Thank you for the work, I will look into this on the weekend. The problem for me also is that I am not developing on a Mac anymore, I have a Windows machine now (urgh). I think I can fix all these three issues.

@HDembinski
Copy link
Collaborator

HDembinski commented May 17, 2025

So, I finally had a closer look.

* The coverage fails after doing the building. I'm not familiar with the coverage it's doing to decipher why the lcov file is missing.

It looks like ../../b2 $B2_OPTS toolset=gcc-${GCC_VERSION} cxxstd=latest coverage=on test//all doesn't compile anything. No tests are run and no coverage data is created. Any idea why? The alias test//all should run all tests.

If I remember correctly, lcov only works with a matching version of gcc. If you know a better way to measure coverage in C++, I'd love to switch to another tool. You upgraded from gcc-11 to gcc-15, I will probably need to upgrade lcov as well.

* The slow clang build detects ODR violations.

That's because of boost-serialization if you look closely, which you added as a constant dependency to this build. boost-serialization causes lots of issues, that's why I keep it as an optional dependency that is only compiled for some tests that are not as strict. I run harder tests on boost-histogram itself.

* The slow gcc test detects dangling temp reference error/warning in the main test.

That's a newly discovered bug - it seems.

@HDembinski
Copy link
Collaborator

@grafikrobot Progress.

The coverage test still fails, because it doesn't compile anything. test//all works in other circumstances. Weird.

The gcc slow test still fails because of that "possibly dangling pointer". As far as I understand, the pointer shouldn't be dangling because of NRVO. The issue is not detected by another other compiler and not caught by the UBSAN / ASAN tests, so perhaps a false positive. As a workaround, we could turn off that warning for gcc for that line.

@grafikrobot
Copy link
Member Author

The coverage test still fails, because it doesn't compile anything. test//all works in other circumstances. Weird.

I can't repro that locally, with the same compiler. So definitely strange why in CI it would not build the tests in this case.

@grafikrobot
Copy link
Member Author

@HDembinski FYI.. I'm now thinking there's a bug in B2 parsing the CLI arguments in this particular instance. As it's behaving as if the test//all, or test//quick, argument isn't there.

@HDembinski
Copy link
Collaborator

Bizarr. I haven't tried to reproduce locally, but the same issue should show up then if I use the same args. Will try this.

@HDembinski HDembinski marked this pull request as ready for review June 5, 2025 12:19
@HDembinski
Copy link
Collaborator

@grafikrobot Everything fixed now. I will do some finishing touches, then merge.

@HDembinski HDembinski merged commit b5cce28 into boostorg:develop Jun 5, 2025
7 checks passed
@grafikrobot
Copy link
Member Author

@HDembinski many, many, thanks for figuring out the build problems to get this merged!

@HDembinski
Copy link
Collaborator

Thanks for all the help!

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.

2 participants