-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Systematically add -DCMAKE_VERBOSE_MAKEFILE=ON
in ci.yml
#4398
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
Conversation
…nd lines related to `-Wodr`
The ODR warnings (link in PR description) seem to originate from eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h, which was brought in via PR #4201. @lalaland have you seen those before? A quick Google search for "Eigen TensorStorage.h Wodr" doesn't pull up anything: Another thing I don't understand: I see I created this PR to find out what's going on. |
My initial guess is that it's due to our weird unit tests (where we have eigen with and without std::array). Some of those symbols must be accidentally being made public, causing odr violations. Easiest test would be to disable one of the two (disable the no std::array) test |
Oh, of course, I believe it immediately! (I'm intrigued now btw that some compilers/linkers discover that. Before I implemented the
Everything linked together into pybind11_tests.so has mutual visibility. The only mechanism for hiding symbols from each other inside the same .so is to put them into different namespaces, incl. the unnamed namespace. (Or maybe also C-style
Another option is to put test_eigen_tensor_avoid_stl_array into a separate extension, then the hiding will work. The only problem is that tests/CMakeLists.txt will become a little more complicated, but there are already similar cases:
Luckily PR #3590 by @iwanders has made this pretty easy, thanks again! @lalaland is there a chance you could help with this? I think the end-result will be a double win:
|
Yeah, I introduced the bug, so I should probably introduce a fix. I'll be able to work on it this weekend. |
Thanks Aaron! |
Instead of changing every single invocation and making an already long file longer, why not just set |
Oh, nice! I didn't know. I'll try that out. |
…ll command lines related to `-Wodr` (pybind#4398)" This reverts commit ff42f52.
Description
@henryiii @Skylion007 I didn't really expect the added
-DCMAKE_VERBOSE_MAKEFILE=ON
to work everywhere, but it does!The size difference in logs_*.zip is:
I'm thinking, relative to all the binaries getting generated, that's probably a tiny increase, but it makes the difference between day a night for questions like we want to answer here. E.g. I see that
-Wodr
isn't actually specified explicitly on any command line, and I can now systematically mine the logs for clues what linker options (-O3
,-flto
?) trigger the ODR warnings.I.e. I think it'll be great to merge this PR.
To obtain full command lines related to
-Wodr
.#4395 (comment)
https://github.com/pybind/pybind11/actions/runs/3659994679/jobs/6186623695
Suggested changelog entry: