Fix Eigen compilation errors from GCC #157
Open
+3
−0
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.
I've been getting multiple Eigen warnings in GCC 13, which become errors because of the
-Werror
flag used for compilation on Linux. The same error has been reported on #156.The first warning is
-Werror=maybe-uninitialized
:I noticed that this one is also addressed in COLMAP here.
The second warning is
-Werror=array-bounds
:This one is a false positive that has been happening since GCC 12 and which the Eigen team is aware of (https://gitlab.com/libeigen/eigen/-/issues/2506). This bug has already been reported to GCC here.
The third warning is
-Werror=stringop-overflow
:I haven't found it reported on the Eigen repo, but maybe this is also a false positive (?).
My proposal to solve these errors is to add the flags
-Wno-maybe-uninitialized
,-Wno-array-bounds
, and-Wno-stringop-overflow
to ignore these warnings. Although another alternative would be to remove the-Werror
which also worked for me.