Fix MATLAB 2024a MEX build: resolve size_t and uint64_t template collision#2553
Closed
svenangerer wants to merge 1 commit into
Closed
Fix MATLAB 2024a MEX build: resolve size_t and uint64_t template collision#2553svenangerer wants to merge 1 commit into
svenangerer wants to merge 1 commit into
Conversation
Member
|
Thanks. Two issues:
|
Author
|
Thanks! I took a look at the borglab/wrap repo and saw that PR #183 recently addressed this for Windows (_WIN64). However, because I am building on 64-bit Ubuntu, _WIN64 isn't defined, so the size_t / uint64_t template collision was still causing the MATLAB build to fail on my machine. I have closed this PR and opened a new one on the wrap repository to extend those guards to cover 64-bit Unix (LP64) as well. You can find the new pull request here: borglab/wrap#186 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
I was attempting to build GTSAM with MATLAB 2024a support on Ubuntu using GCC 11.4. The build failed due to a redefinition of template specializations in matlab.h because size_t and uint64_t resolve to the same underlying type on 64-bit Linux.
Changes:
Note: I am aware that hard-commenting these out might affect Windows builds where the types differ. I am open to suggestions on how to conditionally compile these using #if macros or <type_traits> to ensure cross-platform compatibility.
My Configuration: