artivis / manif

A small C++11 header-only library for Lie theory.
https://artivis.github.io/manif
MIT License
1.46k stars 239 forks source link

Broken with current Eigen3? #269

Closed barracuda156 closed 1 year ago

barracuda156 commented 1 year ago

The build fails spectacularly. Too many errors to even quote.

Moreover, it fails even to acknowledge that GCC 12 supports C++14, which Eigen3 wants. manif_log.txt

artivis commented 1 year ago

The first error message in that log should give you a clue,

/opt/local/include/eigen3/Eigen/src/Core/util/Macros.h:707:2: error: #error This compiler appears to be too old to be supported by Eigen
:info:build   707 | #error This compiler appears to be too old to be supported by Eigen

Eigen seems to have troubles with your compiler. Note that we're only testing for macos 11 & 12 in CI.

As for C++14, it seems to be required by gtest rather than Eigen3. manif requires at least C++11, but does not forces it in any way. Nothing prevents you from enabling C++14 or newer from the command line.

barracuda156 commented 1 year ago

I have no issues using eigen3 with gcc12 with numerous ports. This is the first time I see this error, and the code in eigen3 itself is not helpful – define appears fine and should not fail.

There are numerous errors down the road aside of this one anyway.

artivis commented 1 year ago

I don't think that I have any CI job rocking gcc12, I'll give it a shot see if I can reproduce the error. In the mean time give it another go enabling C++14.

artivis commented 1 year ago

So, I've just successfully followed the build instructions on Ubuntu 23.04 with gcc --version 12.2.0, cmake --version 3.25.1 and libeigen3-dev 3.4.0-4. I'm afraid the errors you are encountering are related to your setup :s .

barracuda156 commented 1 year ago

Thank you for taking time to check. Well, the setup is working fine for thousands of ports, so it is not at fault as such, otherwise no Eigen-related ports would build. I will look for a reason what fails here. Weird.

artivis commented 1 year ago

No problem. In the meantime I will close this issue. Feel free to reopen it if you find new evidences of what's going on.

barracuda156 commented 1 year ago

@artivis Okay, the problem is that manif sets a wrong C++ standard. Changing it to C++14 makes eigen3 and gtest errors gone.