Tom94 / tev

High dynamic range (HDR) image viewer for graphics people
BSD 3-Clause "New" or "Revised" License
1.02k stars 86 forks source link

unnable to build on linux #180

Closed walksanatora closed 2 years ago

walksanatora commented 2 years ago

after running cmake .. in the build directory no then running make -j4 it crashes stating

[  0%] Built target Half
[  3%] Built target Iex
[  3%] Built target clip
[ 10%] Built target glfw_objects
[ 12%] Built target IexMath
[ 17%] Built target IlmThread
[ 35%] Built target nanogui
[ 39%] Built target Imath
[ 83%] Built target IlmImf
[ 85%] Building CXX object CMakeFiles/tev.dir/src/imageio/ClipboardImageLoader.cpp.o
[ 85%] Building CXX object CMakeFiles/tev.dir/src/imageio/EmptyImageLoader.cpp.o
[ 85%] Building CXX object CMakeFiles/tev.dir/src/imageio/ExrImageSaver.cpp.o
[ 85%] Building CXX object CMakeFiles/tev.dir/src/imageio/ExrImageLoader.cpp.o
c++: error: unrecognized command line option ‘-fcoroutines’
c++: error: unrecognized command line option ‘-fcoroutines’
make[2]: *** [CMakeFiles/tev.dir/build.make:63: CMakeFiles/tev.dir/src/imageio/ClipboardImageLoader.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/tev.dir/build.make:76: CMakeFiles/tev.dir/src/imageio/EmptyImageLoader.cpp.o] Error 1
c++: error: unrecognized command line option ‘-fcoroutines’
c++: error: unrecognized command line option ‘-fcoroutines’
make[2]: *** [CMakeFiles/tev.dir/build.make:89: CMakeFiles/tev.dir/src/imageio/ExrImageLoader.cpp.o] Error 1
make[2]: *** [CMakeFiles/tev.dir/build.make:102: CMakeFiles/tev.dir/src/imageio/ExrImageSaver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:786: CMakeFiles/tev.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Tom94 commented 2 years ago

Hi there, I suspect your compiler does not yet support C++20 coroutines, a feature that the latest version of tev requires.

You could try upgrading your compiler, or, if that's not an option, fetch the commit tagged cpp17 to obtain an older version of tev that only requires a C++17-capable compiler.

Cheers!

walksanatora commented 2 years ago

I do believe my c compiler supports c++20 as it is the latest avaliable gcc (g++) to be specific

Tom94 commented 2 years ago

That's not very specific, actually. Specific would be a version number, which you can get via g++ --version.

The latest available version varies significantly by distro, to the point where some long-term-release distros ship multiple years old compilers.

walksanatora commented 2 years ago

running g++ --version outputs

g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Tom94 commented 2 years ago

That looks to be the issue. You need at least gcc 10 for coroutine support. See the "coroutines" entry in the compatibility chart.

Cheers!