patrikhuber / eos

A lightweight 3D Morphable Face Model library in modern C++
Apache License 2.0
1.91k stars 597 forks source link

Error: ‘variant_size_v’ is not a member of ‘mpark’ #232

Closed lehoangphuc86 closed 5 years ago

lehoangphuc86 commented 5 years ago

Hello, Please help me with the below issue.

I am trying to build the project in Ubuntu and got the below error message OS: Ubuntu 14.04.5 LTS Eclipse: Build id: 20180917-1800 Language: c++ 11 Source file: eos/cpp17/detail/mpark_variant_serialization.hpp Error message: eos/include/eos/cpp17/detail/mpark_variant_serialization.hpp: At global scope: /eos/include/eos/cpp17/detail/mpark_variant_serialization.hpp:52:30: error: ‘variant_size_v’ is not a member of ‘mpark’ typename std::enable_if<N == mpark::variant_size_v, void>::type

Is this a bug or I missed something? Thank you.

patrikhuber commented 5 years ago

Hi,

I'd guess your compiler is too old, I'd recommend to use at least g++-6. You can install a newer one from the ubuntu-toolchain-r repo.

Feel free to re-open if that doesn't fix the issue. You can also check out the travis build results and you can see it builds fine there on >=g++-6. I'm not sure why it doesn't build on g++-5 anymore, but someone could certainly investigate that if they want to build on g++-5.

lehoangphuc86 commented 5 years ago

Hi,

I'd guess your compiler is too old, I'd recommend to use at least g++-6. You can install a newer one from the ubuntu-toolchain-r repo.

Feel free to re-open if that doesn't fix the issue. You can also check out the travis build results and you can see it builds fine there on >=g++-6. I'm not sure why it doesn't build on g++-5 anymore, but someone could certainly investigate that if they want to build on g++-5.

Hi Patrikhuber, Thanks for your dropping in. I am using g++11 and getting that issue. Appreciate if you let me know the further information to investigate this one. Thanks. Peter

patrikhuber commented 5 years ago

I would be surprised if there's a compiler "g++11" (yet).

I think you're best off getting help with your setup on StackOverflow or a similar site.