jstkdng / ueberzugpp

Drop in replacement for ueberzug written in C++
GNU General Public License v3.0
791 stars 30 forks source link

Compiling error in linux mint #95

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello! Thanks for maintaining ueberzug.

Could you please assist with compiling it on linux mint? I followed the build steps, but the last command gives errors relating to spdlog.

I installed all dependencies listed in the docs, plus others: sudo apt install curl build-essential libssl-dev libtbb-dev libxcb-image0-dev libxcb-res0-dev libvips-dev libsixel-dev

➜  build git:(master) cmake -DCMAKE_BUILD_TYPE=Release ..
-- The CXX compiler identification is GNU 11.3.0
-- The C compiler identification is GNU 11.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.2")
-- Looking for std::execution::par_unseq
-- Looking for std::execution::par_unseq - found
-- Using the multi-header code from /home/user/Downloads/ueberzugpp/build/_deps/nlohmann_json-src/include/
-- Build spdlog: 1.11.0
-- Build type: Release
-- Module support is disabled.
-- Version: 9.1.0
-- Build type: Release
-- CXX_STANDARD: 20
-- Performing Test has_std_20_flag
-- Performing Test has_std_20_flag - Success
-- Performing Test has_std_2a_flag
-- Performing Test has_std_2a_flag - Success
-- Required features: cxx_variadic_templates
-- Checking for module 'xcb'
--   Found xcb, version 1.14
-- Checking for module 'xcb-image'
--   Found xcb-image, version 0.4.0
-- Checking for module 'xcb-res'
--   Found xcb-res, version 1.14
-- Found OpenCV: /usr (found version "4.5.4") found components: core imgproc imgcodecs videoio
-- Checking for module 'vips-cpp'
--   Found vips-cpp, version 8.12.1
-- Checking for module 'libsixel'
--   Found libsixel, version 1.10.3
-- Checking for module 'chafa>=1.6'
--   Found chafa, version 1.13.0
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/Downloads/ueberzugpp/build
➜  build git:(master) cmake --build .
[  2%] Building CXX object _deps/fmt-build/CMakeFiles/fmt.dir/src/format.cc.o
[  5%] Building CXX object _deps/fmt-build/CMakeFiles/fmt.dir/src/os.cc.o
[  8%] Linking CXX static library libfmt.a
[  8%] Built target fmt
[  8%] Built target CLI11
[ 11%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/spdlog.cpp.o
[ 14%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/stdout_sinks.cpp.o
[ 17%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/color_sinks.cpp.o
[ 20%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/file_sinks.cpp.o
[ 22%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/async.cpp.o
[ 25%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/cfg.cpp.o
[ 28%] Building CXX object _deps/spdlog-build/CMakeFiles/spdlog.dir/src/bundled_fmtlib_format.cpp.o
[ 31%] Linking CXX static library libspdlog.a
[ 31%] Built target spdlog
[ 34%] Building CXX object CMakeFiles/ueberzug.dir/src/util/x11.cpp.o
[ 37%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o
[ 40%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/window/x11.cpp.o
[ 42%] Building CXX object CMakeFiles/ueberzug.dir/src/image/opencv.cpp.o
[ 45%] Building CXX object CMakeFiles/ueberzug.dir/src/process/linux.cpp.o
[ 48%] Building CXX object CMakeFiles/ueberzug.dir/src/main.cpp.o
[ 51%] Building CXX object CMakeFiles/ueberzug.dir/src/application.cpp.o
[ 54%] Building CXX object CMakeFiles/ueberzug.dir/src/os.cpp.o
[ 57%] Building CXX object CMakeFiles/ueberzug.dir/src/tmux.cpp.o
[ 60%] Building CXX object CMakeFiles/ueberzug.dir/src/terminal.cpp.o
[ 62%] Building CXX object CMakeFiles/ueberzug.dir/src/dimensions.cpp.o
[ 65%] Building CXX object CMakeFiles/ueberzug.dir/src/flags.cpp.o
[ 68%] Building CXX object CMakeFiles/ueberzug.dir/src/util/util.cpp.o
[ 71%] Building CXX object CMakeFiles/ueberzug.dir/src/util/socket.cpp.o
[ 74%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas.cpp.o
[ 77%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/chafa.cpp.o
[ 80%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/sixel.cpp.o
[ 82%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/kitty.cpp.o
[ 85%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/chunk.cpp.o
[ 88%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/iterm2/iterm2.cpp.o
[ 91%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/iterm2/chunk.cpp.o
[ 94%] Building CXX object CMakeFiles/ueberzug.dir/src/image.cpp.o
[ 97%] Building CXX object CMakeFiles/ueberzug.dir/src/image/libvips.cpp.o
[100%] Linking CXX executable ueberzug
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::set_formatter(std::unique_ptr<spdlog::formatter, std::default_delete<spdlog::formatter> >)':
spdlog.cpp:(.text+0x9f60): multiple definition of `spdlog::set_formatter(std::unique_ptr<spdlog::formatter, std::default_delete<spdlog::formatter> >)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x7b0): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::enable_backtrace(unsigned long)':
spdlog.cpp:(.text+0x9ff0): multiple definition of `spdlog::enable_backtrace(unsigned long)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x830): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::disable_backtrace()':
spdlog.cpp:(.text+0xa060): multiple definition of `spdlog::disable_backtrace()'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x850): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::set_level(spdlog::level::level_enum)':
spdlog.cpp:(.text+0xa100): multiple definition of `spdlog::set_level(spdlog::level::level_enum)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x8f0): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::flush_on(spdlog::level::level_enum)':
spdlog.cpp:(.text+0xa160): multiple definition of `spdlog::flush_on(spdlog::level::level_enum)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x910): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::set_error_handler(void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))':
spdlog.cpp:(.text+0xa1c0): multiple definition of `spdlog::set_error_handler(void (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&))'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x930): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::shutdown()':
spdlog.cpp:(.text+0xa280): multiple definition of `spdlog::shutdown()'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0xa50): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::set_automatic_registration(bool)':
spdlog.cpp:(.text+0xa390): multiple definition of `spdlog::set_automatic_registration(bool)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0xa70): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::default_logger()':
spdlog.cpp:(.text+0xa3d0): multiple definition of `spdlog::default_logger()'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0xa90): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::get_level()':
spdlog.cpp:(.text+0xa440): multiple definition of `spdlog::get_level()'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x8a0): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::should_log(spdlog::level::level_enum)':
spdlog.cpp:(.text+0xa460): multiple definition of `spdlog::should_log(spdlog::level::level_enum)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x8d0): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
spdlog.cpp:(.text+0xa480): multiple definition of `spdlog::get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x750): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::drop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
spdlog.cpp:(.text+0xa590): multiple definition of `spdlog::drop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0xa10): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::set_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, spdlog::pattern_time_type)':
spdlog.cpp:(.text+0xa630): multiple definition of `spdlog::set_pattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, spdlog::pattern_time_type)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x3640): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::default_logger_raw()':
spdlog.cpp:(.text+0xa880): multiple definition of `spdlog::default_logger_raw()'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0xae0): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::drop_all()':
spdlog.cpp:(.text+0xa920): multiple definition of `spdlog::drop_all()'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0xa30): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::dump_backtrace()':
spdlog.cpp:(.text+0xa9b0): multiple definition of `spdlog::dump_backtrace()'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x870): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::apply_all(std::function<void (std::shared_ptr<spdlog::logger>)> const&)':
spdlog.cpp:(.text+0xaa40): multiple definition of `spdlog::apply_all(std::function<void (std::shared_ptr<spdlog::logger>)> const&)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x9f0): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::initialize_logger(std::shared_ptr<spdlog::logger>)':
spdlog.cpp:(.text+0xaf50): multiple definition of `spdlog::initialize_logger(std::shared_ptr<spdlog::logger>)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x3880): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::register_logger(std::shared_ptr<spdlog::logger>)':
spdlog.cpp:(.text+0xb040): multiple definition of `spdlog::register_logger(std::shared_ptr<spdlog::logger>)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x3960): first defined here
/usr/bin/ld: _deps/spdlog-build/libspdlog.a(spdlog.cpp.o): in function `spdlog::set_default_logger(std::shared_ptr<spdlog::logger>)':
spdlog.cpp:(.text+0xb1f0): multiple definition of `spdlog::set_default_logger(std::shared_ptr<spdlog::logger>)'; CMakeFiles/ueberzug.dir/src/main.cpp.o:main.cpp:(.text+0x3a40): first defined here
/usr/bin/ld: warning: libtbb.so.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_core.so.4.5.4d, may conflict with libtbb.so.12
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/ueberzug.dir/build.make:467: ueberzug] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:204: CMakeFiles/ueberzug.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
jstkdng commented 1 year ago

hey, don't the ubuntu binary releases work for mint?

ghost commented 1 year ago

Yeah I have a few binary releases working in mint right now. I didn't see one for ueberzug here. Sorry if I missed it. I'm coming from Arch, ueberzug installs and works great from AUR.

ghost commented 1 year ago

I tried homebrew, but it also fails after installing dozens of dependencies. Here's the final few lines with the error:

đŸș  /home/linuxbrew/.linuxbrew/Cellar/openssl@1.1/1.1.1u: 8,409 files, 24.4MB
==> Installing jstkdng/programs/ueberzugpp dependency: spdlog
==> Pouring spdlog--1.12.0.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/spdlog/1.12.0: 102 files, 2.1MB
==> Installing jstkdng/programs/ueberzugpp dependency: hwloc
==> Pouring hwloc--2.9.2.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/hwloc/2.9.2: 978 files, 11.2MB
==> Installing jstkdng/programs/ueberzugpp dependency: tbb
==> Pouring tbb--2021.9.0.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/tbb/2021.9.0: 256 files, 6.6MB
==> Installing jstkdng/programs/ueberzugpp dependency: cfitsio
==> Pouring cfitsio--4.2.0.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/cfitsio/4.2.0: 17 files, 4.5MB
==> Installing jstkdng/programs/ueberzugpp dependency: cgif
==> Pouring cgif--0.3.2.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/cgif/0.3.2: 10 files, 62.4KB
==> Installing jstkdng/programs/ueberzugpp dependency: gmp
==> Pouring gmp--6.2.1_1.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/gmp/6.2.1_1: 23 files, 3.9MB
==> Installing jstkdng/programs/ueberzugpp dependency: isl
==> Pouring isl--0.26.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/isl/0.26: 74 files, 9.8MB
==> Installing jstkdng/programs/ueberzugpp dependency: mpfr
==> Pouring mpfr--4.2.0-p12.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/mpfr/4.2.0-p12: 31 files, 3.9MB
==> Installing jstkdng/programs/ueberzugpp dependency: libmpc
==> Pouring libmpc--1.3.1.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/libmpc/1.3.1: 13 files, 638.3KB
==> Installing jstkdng/programs/ueberzugpp dependency: binutils
==> Pouring binutils--2.40.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/binutils/2.40: 4,698 files, 462.5MB
==> Installing jstkdng/programs/ueberzugpp dependency: gcc
==> Pouring gcc--13.1.0.x86_64_linux.bottle.tar.gz
No entry for terminal type "xterm-kitty";
using dumb terminal settings.
==> Creating the GCC specs file: /home/linuxbrew/.linuxbrew/Cellar/gcc/13.1.0/bin/../lib/gcc/current/gcc/x86_64-pc-linux-gnu/13/specs
đŸș  /home/linuxbrew/.linuxbrew/Cellar/gcc/13.1.0: 1,668 files, 320.2MB
==> Installing jstkdng/programs/ueberzugpp dependency: libevent
==> Pouring libevent--2.1.12_1.x86_64_linux.bottle.tar.gz
đŸș  /home/linuxbrew/.linuxbrew/Cellar/libevent/2.1.12_1: 62 files, 2.6MB
==> Installing jstkdng/programs/ueberzugpp dependency: open-mpi
==> Pouring open-mpi--4.1.5.x86_64_linux.bottle.1.tar.gz
Error: Too many open files @ rb_sysopen - /home/linuxbrew/.linuxbrew/Cellar/open-mpi/4.1.5/lib/pmix/mca_gds_hash.so

List of dependencies that were installed:

➜  brew list
berkeley-db@5 binutils bzip2 ca-certificates cairo cfitsio cgif chafa cli11 cmake cpp-gsl dbus expat fmt fontconfig freetype fribidi gcc gdk-pixbuf giflib glib gmp graphite2 harfbuzz hwlocicu4c isl jpeg-turbo krb5 libedit libevent libffi libmpc libnsl libpng librsvg libsixel libtiff libtirpc libx11 libxau libxcb libxcrypt libxdmcp libxext libxml2 libxrender lz4 lzo mpdecimal mpfr ncurses nlohmann-json openssl@1.1 openssl@3 pango pcre2 pixman pkg-config python@3.11 readline shared-mime-info spdlog sqlite tbb unzip util-linux webp xorgproto xz zlib zstd
jstkdng commented 1 year ago

You should be able to download from the OBS. https://software.opensuse.org/download.html?project=home%3Ajustkidding&package=ueberzugpp

And that too many open files could be related to the limits.conf

ghost commented 1 year ago

It works, thank you!!!

jstkdng commented 1 year ago

alright then, closing