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

Unable to build in Ubuntu 20 #213

Closed iamsh4shank closed 6 months ago

iamsh4shank commented 8 months ago

I am trying to build in Ubuntu 20 but getting errors for the coroutines.

Error Log -

c++: error: unrecognized command line option ‘-fcoroutines’ c++: error: unrecognized command line option ‘-fcoroutines’ c++: error: unrecognized command line option ‘-fcoroutines’ c++: error: unrecognized command line option ‘-fcoroutines’ make[2]: [CMakeFiles/tev.dir/build.make:76: CMakeFiles/tev.dir/src/imageio/ClipboardImageLoader.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: [CMakeFiles/tev.dir/build.make:90: CMakeFiles/tev.dir/src/imageio/EmptyImageLoader.cpp.o] Error 1 make[2]: [CMakeFiles/tev.dir/build.make:104: CMakeFiles/tev.dir/src/imageio/ExrImageLoader.cpp.o] Error 1 make[2]: [CMakeFiles/tev.dir/build.make:132: CMakeFiles/tev.dir/src/imageio/ImageLoader.cpp.o] Error 1 c++: error: unrecognized command line option ‘-fcoroutines’ make[2]: [CMakeFiles/tev.dir/build.make:146: CMakeFiles/tev.dir/src/imageio/ImageSaver.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:160: CMakeFiles/tev.dir/src/imageio/PfmImageLoader.cpp.o] Error 1 make[2]: [CMakeFiles/tev.dir/build.make:118: CMakeFiles/tev.dir/src/imageio/ExrImageSaver.cpp.o] Error 1 c++: error: unrecognized command line option ‘-fcoroutines’ make[2]: [CMakeFiles/tev.dir/build.make:174: CMakeFiles/tev.dir/src/imageio/QoiImageLoader.cpp.o] Error 1 c++: error: unrecognized command line option ‘-fcoroutines’ make[2]: [CMakeFiles/tev.dir/build.make:188: CMakeFiles/tev.dir/src/imageio/QoiImageSaver.cpp.o] Error 1 c++: error: unrecognized command line option ‘-fcoroutines’ make[2]: [CMakeFiles/tev.dir/build.make:202: CMakeFiles/tev.dir/src/imageio/StbiHdrImageSaver.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:216: CMakeFiles/tev.dir/src/imageio/StbiImageLoader.cpp.o] Error 1 make[2]: [CMakeFiles/tev.dir/build.make:230: CMakeFiles/tev.dir/src/imageio/StbiLdrImageSaver.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:694: CMakeFiles/tev.dir/all] Error 2 make: *** [Makefile:156: all] Error 2

I tried checkingout to cpp17 but gave me error for the tinyformat package.

iamsh4shank commented 8 months ago

@Tom94

Tom94 commented 8 months ago

Hi, there are three options:

  1. Update your compiler to a version that supports C++20 (and thus coroutines)
  2. Ensure submodules are in sync after checking out the C++17-compatible tag. To do this, run git submodule sync followed by git submodule update --init --recursive after having checked out cpp17
  3. Use the precompiled app image from the releases page.

Highlighting me is superfluous, by the way — maintainers get notified of issues in any case — and comes off as impolitely impatient.

iamsh4shank commented 8 months ago

Hi, sorry for being impatient, I was quite stuck with this for a long time. Also thank you for the help the solution worked for me.