I have attempted to compile ueberzugpp (Überzug++) a few times using clang/clang++ (14, 15, and 16) and gcc14/gcc++14.
I first satisfied its dependencies
When I try building it with gcc it builds to 100%, but at the end results in ld errors. I gave up with gcc14/g++14 and instead tried building with clang. I added
to CMakeLists.txt
Before running the commands I set CC and CXX environment variables to the respective versions of clang. I tried clang14, clang15, and clang16, with the respective clang++ versions. I then followed the github, using the commands:
First cmake command would work as expected, but then when bulding, the output would always be:
Anything I try building that uses
How can I get it to compile/will it likely compile on 14.0?
clang --version
returns 14.0.5. I am on 13.2-RELEASE and am fully up to date with both freebsd-update and pkg, which is set to latest.I first satisfied its dependencies
pkg install cmake gmake vips libsixel chafa onetbb nlohmann-json cli11 libfmt microsoft-gsl
When I try building it with gcc it builds to 100%, but at the end results in ld errors. I gave up with gcc14/g++14 and instead tried building with clang. I added
Code:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include -L/usr/local/lib")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/include/c++ -I/usr/local/include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
Before running the commands I set CC and CXX environment variables to the respective versions of clang. I tried clang14, clang15, and clang16, with the respective clang++ versions. I then followed the github, using the commands:
Code:
cd ueberzugpp
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_X11=OFF -DENABLE_OPENCV=OFF .. # On Wayland. Didn't get opencv. Always gave expected outputs.
cmake --build .
Code:
/ueberzugpp/src/terminal.cpp:302:11: error: no member named 'reverse' in namespace 'std::ranges'; did you mean 'std::reverse'?
using std::ranges::reverse;
^~~~~~~~~~~~~~~~~~~~
std::reverse
/usr/include/c++/v1/__algorithm/reverse.h:49:1: note: 'std::reverse' declared here
reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
^
/ueberzugpp/src/terminal.cpp:309:9: error: no matching function for call to 'reverse'
reverse(tree);
^~~~~~~
/usr/include/c++/v1/__algorithm/reverse.h:49:1: note: candidate function not viable: requires 2 arguments, but 1 was provided
reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
^
2 errors generated.
gmake[2]: *** [CMakeFiles/ueberzug.dir/build.make:146: CMakeFiles/ueberzug.dir/src/terminal.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ueberzug.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
Anything I try building that uses
std::ranges::reverse
that I think should be defined by algorithm fails to build with clang++ -std=c++20:
Code:
./test.cpp:10:5: error: no member named 'reverse' in namespace 'std::ranges'; did you mean 'std::reverse'?
std::ranges::reverse(s.begin(), s.end());
^~~~~~~~~~~~~~~~~~~~
std::reverse
/usr/include/c++/v1/__algorithm/reverse.h:49:1: note: 'std::reverse' declared here
reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
^
./test.cpp:12:18: error: no type named 'reverse' in namespace 'std::ranges'
std::ranges::reverse(s);
~~~~~~~~~~~~~^
./test.cpp:19:18: error: no type named 'reverse' in namespace 'std::ranges'
std::ranges::reverse(a);
~~~~~~~~~~~~~^
3 errors generated.
How can I get it to compile/will it likely compile on 14.0?