-
Notifications
You must be signed in to change notification settings - Fork 782
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
Update Spectra to v1.1.0 to fix C++20 compatibility issues on GCC/Clang #1871
Conversation
38ad415
to
5368ad7
Compare
69cac22
to
dcb4e98
Compare
@valgur sorry for the delay in reviewing. Partly the reason is it seems such a big change. Is there compelling reason to change the location of the headers? Or: can you make this PR much smaller/reviewable by using the old location? Note I have not tried to figure out the answer myself. PS FWIW at Verdant we compiled with C++20 without any issue - so slightly confused about that - but I think upgrading Spectra is a good thing nonetheless. |
a440f0e
to
e383b0e
Compare
Sorry, I should have indeed included my reasoning behind this. The official Spectra package uses a That being said, it's not something that is strictly required and I can revert the move. The necessary patching is limited to just a single line anyway. The PR will still be quite large regardless, since the update touches more than 50 files.
The change is motivated by a GTSAM build failure on GCC 14 (if I recall correctly) with C++20 enabled, which was reported on ConanCenter Slack a couple of months ago. I also now noticed that Spectra v1.1.0 was released just last week after a 2.5 year hiatus. 🙂 I applied the update to the PR. |
OK, let me take a deeper look. I think it'll be ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !!!
I have a slight preference if the files were in the same place as before, but if this is easier for you I don't really care that much. I have some question about the mapping that I'd like to know the answer to before merging, but otherwise looks great!
e383b0e
to
8583185
Compare
Ok, I moved the headers back to their original location. |
Awesome! Many thanks for contributing! |
GTSAM currently unfortunately fails to build with C++20 or newer on GCC and Clang with the following errors in ShonanAveraging.cpp:
This PR updates the vendored Spectra from v0.9.0 to the latest v1.0.1 as a simple fix for these C++20 compatibility issues. I also moved the Spectra headers under a
Spectra/...
prefix to match the installed header paths since v0.7.0.Change log: https://github.com/yixuan/spectra/blob/master/CHANGELOG.md
Since this is a major version bump, there are some breaking changes in the Spectra API, which are listed in the migration guide: https://spectralib.org/upgrade
Corresponding changes to ShonanAveraging.cpp:
To be honest, I would personally be hesitant to merge such an unwieldy PR, so you might want to commit these changes yourself or at least diff them against the official Spectra sources.