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

Build Issue with VS2017 due to change in VS handling of std:aligned_storage #90

Open
KAL-AL opened this issue Sep 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@KAL-AL
Copy link

KAL-AL commented Sep 12, 2024

When I attempt to build off the latest commit on the master branch, I get the following error when using a Windows 10 box with VS2017 (v15.9.66) in 64-bit mode.
Error C2338 You've instantiated std::aligned_storage<Len, Align> with an extended alignment (in other words, Align > alignof(max_align_t)). Before VS 2017 15.8, the member type would non-conformingly have an alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this correctly, but the fix inherently changes layout and breaks binary compatibility (only for uses of aligned_storage with extended alignments). Please define either (1) _ENABLE_EXTENDED_ALIGNED_STORAGE to acknowledge that you understand this message and that you actually want a type with an extended alignment, or (2) _DISABLE_EXTENDED_ALIGNED_STORAGE to silence this message and get the old non-conformant behavior. bundle_adjuster C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\include\type_traits 1271

When I use #define _ENABLE_EXTENDED_ALIGNED_STORAGE or #define _DISABLE_EXTENDED_ALIGNED_STORAG smal_gcip It will become very slow。
I hope you can help handle this issue Thank you

@KAL-AL KAL-AL added the bug Something isn't working label Sep 12, 2024
@koide3
Copy link
Owner

koide3 commented Sep 21, 2024

I suppose the error stems from improper handling of vectorization in Eigen. Can you try disabling vectorization by adding EIGEN_DONT_ALIGN? It may slightly decrease the processing speed, but the degradation should be small.
http://eigen.tuxfamily.org/index.php?title=FAQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants