-
Notifications
You must be signed in to change notification settings - Fork 431
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
Linking to OusterSDK::ouster_client crashes our program due to EIGEN_MAX_ALIGN_BYTES=32 #396
Comments
I did some further investigation. I see that in Eigen documentation, the value of EIGEN_MAX_ALIGN_BYTES is set to a default value automatically based architecture, compiler, and OS if not provided. So it seems like setting it to 32 instead of the automatic 16 on our system breaks our application. The question on why you set that compiler define still remains. |
Mind showing us how you've set up your CMakeLists.txt ? We tried to write it so that it would only set |
We build the library (ouster_client.a) the following way:
And changes the following options (rest as default):
Our top level project (stripped away unnecessary info and changed some naming):
Our sub project:
I don't think it works like you intend it to. Because when I look at the file external/lib/cmake/OusterSDK/OusterSDKTargets.cmake I see the following:
|
Never mind, that did not work as I indented. I tried to use BUILD_INTERFACE generator expression to only set the define during building (and not when linking to the installed library), but this still causes crashes since the library is compiled with a different value of the define compared to the value that is set automatically for us. |
Is it possible you're linking against another static pre-built library that uses Eigen, overriding |
No, you seem to misunderstand. When I don't link to OusterSDK:
When I do not make any changes to the OusterSDK, but links to it:
When I make changes to the CMakeLists in OusterSDK by removing the lines that set
So why do want to force |
Yes, sorry. I do understand your problem, or have a good guess at it. The problem is likely that another pre-built library you're using which does not explicitly set The reason we set it initially was to enable avx usage, which requires 32 for alignment. Obviously since you're on a Jetson Xavier, avx does not apply for you. We're hoping to approve #371, which makes it a build option, once it they make a small change with the names. In the meantime, as you've discovered, it may be easiest to simply remove the line from the |
This should be addressed by the addition of the option |
Hello.
I have worked with your library in a separate little test project until now.
Today I tried to use your library and my Ouster driver code in our main project, however this causes problems.
It causes our program to crash with a signal 11 (SIGSEGV).
I managed to reproduce it without actually using any code in your library, but only linking to it with target_link_libraries().
Further, I narrowed it down to the compiler define
-DEIGEN_MAX_ALIGN_BYTES=32
.Simply using that compiler defined, even without linking to your library, crashes our program.
Do you happen to have any idea why that may be? And why that compiler define is needed?
OS: Ubuntu 18.04
Compiler: GCC 7.5.0
Nvidia Jetson AGX Xavier Development Kit
The text was updated successfully, but these errors were encountered: