Skip to content
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

Ubunto error with gcc 8++: error: ISO C++17 does not allow dynamic exception specifications #33

Closed
ghost opened this issue Sep 2, 2020 · 4 comments
Labels
bug - compilation error Something isn't working

Comments

@ghost
Copy link

ghost commented Sep 2, 2020

Is get error:

[  2%] Building CXX object source/matplot/CMakeFiles/matplot.dir/util/common.cpp.o
In file included from /usr/include/OpenEXR/ImfHeader.h:51,
                 from /usr/include/OpenEXR/ImfRgbaFile.h:50,
                 from matplotplusplus/source/3rd_party/cimg/CImg.h:549,
                 from matplotplusplus/source/matplot/util/common.cpp:16:
/usr/include/OpenEXR/ImathVec.h:228:34: error: ISO C++17 does not allow dynamic exception specifications
     const Vec2 & normalizeExc () throw (IEX_NAMESPACE::MathExc);

Same as here: stack-of-tasks/pinocchio#786

@nspo
Copy link

nspo commented Sep 2, 2020

As mentioned in the other issue, it seems this library (OpenEXR) in the state in the repos of Ubuntu 18.04 is not compatible with C++17.

@alandefreitas
Copy link
Owner

Can you check if removing:

pkg_check_modules(OPENEXR OpenEXR)
if(OPENEXR_FOUND)
  message("OPENEXR Found")
  target_compile_definitions(cimg INTERFACE cimg_use_openexr)
  target_link_libraries(cimg INTERFACE ${OPENEXR_LIBRARIES})
  target_include_directories(cimg INTERFACE ${OPENEXR_INCLUDE_DIRS})
endif()

from source/3rd_party/CMakeLists.txt solves the problem?

@alandefreitas alandefreitas added the bug - compilation error Something isn't working label Sep 2, 2020
@nspo
Copy link

nspo commented Sep 2, 2020

@alandefreitas Yes, it does on Ubuntu 18.04. It compiles successfully and the examples I tried run afterwards!

If you'd like to support Ubuntu 18.04 it should be mentioned that the default Cmake version is 3.10, i.e. lower than the specified minimum. One can of course install a newer cmake manually though (which I for example did.

@alandefreitas
Copy link
Owner

So I'm removing this dependency since (i) it's optional, and (ii) it's not compatible with C++17
4d19af6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug - compilation error Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants