-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Crashes on Ubuntu 24 when using minimum C++17 and expecting Eigen to not require explicit alignment anymore #6126
Comments
Its because you want to use apt installed PCL, which I assume is build with c++14, in a c++17 project, that you encounter the error? |
Yes, I use an apt-installed PCL. |
One thing you can try is making use of
Out of interest, how many classes would this be? Are these classes that use Eigen, but are unrelated to PCL?
The PCL apt packages for a specific Ubuntu release will very likely not receive any update, at least this was, to my knowledge, never the case in the past. So on Ubuntu 24.04, you will e.g. not get PCL 1.15 (which is not yet released anyway), as a Ubuntu release keeps the software versions fixed, and only applies important security fixes for some packages (as far as I know).
Not sure what you mean? What kind of plugin?
I am willing to discuss such a change, but since you will not get a different PCL version via apt on Ubuntu 24.04, this would be irrelevant for you. |
From now on, PCL will be compiled as C++17 by default. This applies to the master branch and any future releases (so starting with PCL 1.15.0). However, as I explained above, I assume that apt packages in already released Ubuntu versions will not be updated to a newer PCL release. For any questions about the apt packages, please contact the maintainers of those packages. |
Context
Since C++17 Eigen does not require custom alignment handling anymore.
Since ROS 2 Humble, C++17 has been the default, and at this time, support can be expected for new software.
Expected behavior
To be able to use Eigen without using the macros to create custom alignment for structs such as
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
.Current Behavior
This will crash because #5793 disabled the automatic Eigen check to disable the need for custom-aligned allocation.
This results in the destructors of classes/structs containing Eigen members but not the
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
macro (which is not needed for >=C++17) crashing when trying to free the memory.E.g. with a
This is especially annoying since fixing this on the user side would require adding the macro in every class that directly or by inheritance contains eigen members and using the custom stl container allocators for any such class.
A practice that is cumbersome and error-prone.
Your Environment (please complete the following information):
Possible Solution
Setting the CXX standard to 17 (in general or for releases >=Ubuntu 22)
The text was updated successfully, but these errors were encountered: