naelstrof / slop

slop (Select Operation) is an application that queries for a selection from the user and prints the region to stdout.
Other
871 stars 58 forks source link

build fails with icu 75 #172

Open andyrtr opened 6 months ago

andyrtr commented 6 months ago

Building with icu 75.1 fails:

[ 80%] Building CXX object CMakeFiles/slopy.dir/src/glrectangle.cpp.o
[ 86%] Linking CXX shared library libslopy.so
[ 86%] Built target slopy
[ 93%] Building CXX object CMakeFiles/slop.dir/src/main.cpp.o
In file included from /usr/include/unicode/unistr.h:39,
                 from /build/slop/src/slop-7.6/src/cxxopts.hpp:51,
                 from /build/slop/src/slop-7.6/src/main.cpp:28:
/usr/include/unicode/stringpiece.h:133:29: error: ‘enable_if_t’ in namespace ‘std’ does not name a template type
  133 |             typename = std::enable_if_t<
      |                             ^~~~~~~~~~~
/usr/include/unicode/stringpiece.h:133:24: note: ‘std::enable_if_t’ is only available from C++14 onwards
  133 |             typename = std::enable_if_t<
      |                        ^~~
/usr/include/unicode/stringpiece.h:133:40: error: expected ‘>’ before ‘<’ token
  133 |             typename = std::enable_if_t<
      |                                        ^
make[2]: *** [CMakeFiles/slop.dir/build.make:76: CMakeFiles/slop.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:111: CMakeFiles/slop.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
N-R-K commented 5 months ago

Bug report about this on gentoo: https://bugs.gentoo.org/933863 Full build log: https://bugs.gentoo.org/attachment.cgi?id=895456

parona-source commented 3 months ago

ICU-75.1 increased its C++ standard requirement to C++17 while slop is currently built with C++11.

std::enable_if_t was added in C++14.

supasonix-zuv commented 2 months ago

Probably not the best solution, but you can just change the CXX_STANDARD lines in CMakeLists.txt from 11 to 17 and it compiles again.