jstkdng / ueberzugpp

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

Build fails with linking error on Arch Linux #158

Closed sergiuser1 closed 8 months ago

sergiuser1 commented 8 months ago

I'm trying to build from the AUR and I get the following error. I have switched to libvips-git but it still fails:

[ 97%] Building CXX object CMakeFiles/ueberzug.dir/src/image/libvips.cpp.o
[100%] Linking CXX executable ueberzug
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/util/util.cpp.o: in function `util::get_b2_hash_ssl[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >)':
/usr/src/debug/ueberzugpp/ueberzugpp-2.9.2/src/util/util.cpp:136:(.text+0x2ad0): undefined reference to `EVP_MD_size'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ueberzug.dir/build.make:677: ueberzug] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ueberzug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Not sure if it's related to #150.

jstkdng commented 8 months ago

hello, I'm able to build without issues. what version of openssl do you have?

try doing a clean build, openssl was upgraded not too long ago.

sergiuser1 commented 8 months ago

I have these openssl versions:

seoj@seoj-linux0x:~$ yay -Q | grep openssl
openssl 3.2.0-1
openssl-1.1 1.1.1.w-1

Here's the full build log:

seoj@seoj-linux0x:ueberzugpp$ mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
-- The CXX compiler identification is GNU 13.2.1
-- The C compiler identification is GNU 13.2.1
-- 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 "2.1.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.2.0")
-- Looking for std::execution::par_unseq
-- Looking for std::execution::par_unseq - found
-- Checking for module 'xcb'
--   Found xcb, version 1.16
-- Checking for module 'xcb-image'
--   Found xcb-image, version 0.4.1
-- Checking for module 'xcb-res'
--   Found xcb-res, version 1.16
-- Found OpenCV: /usr (found version "4.8.1") found components: core imgproc imgcodecs videoio
-- Checking for module 'vips-cpp'
--   Found vips-cpp, version 8.16.0
-- Checking for module 'libsixel'
--   Found libsixel, version 1.10.3
-- Checking for module 'chafa>=1.6'
--   Found chafa, version 1.12.4
-- Configuring done (2.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/seoj/git/ueberzugpp/build
[  4%] Building CXX object CMakeFiles/ueberzug.dir/src/util/x11.cpp.o
[  8%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o
[ 12%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/window/x11.cpp.o
[ 16%] Building CXX object CMakeFiles/ueberzug.dir/src/image/opencv.cpp.o
[ 20%] Building CXX object CMakeFiles/ueberzug.dir/src/process/linux.cpp.o
[ 25%] Building CXX object CMakeFiles/ueberzug.dir/src/main.cpp.o
[ 29%] Building CXX object CMakeFiles/ueberzug.dir/src/application.cpp.o
[ 33%] Building CXX object CMakeFiles/ueberzug.dir/src/os.cpp.o
[ 37%] Building CXX object CMakeFiles/ueberzug.dir/src/tmux.cpp.o
[ 41%] Building CXX object CMakeFiles/ueberzug.dir/src/terminal.cpp.o
[ 45%] Building CXX object CMakeFiles/ueberzug.dir/src/dimensions.cpp.o
[ 50%] Building CXX object CMakeFiles/ueberzug.dir/src/flags.cpp.o
[ 54%] Building CXX object CMakeFiles/ueberzug.dir/src/util/util.cpp.o
[ 58%] Building CXX object CMakeFiles/ueberzug.dir/src/util/socket.cpp.o
[ 62%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas.cpp.o
[ 66%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/chafa.cpp.o
[ 70%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/sixel.cpp.o
[ 75%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/kitty.cpp.o
[ 79%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/chunk.cpp.o
[ 83%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/iterm2/iterm2.cpp.o
[ 87%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/iterm2/chunk.cpp.o
[ 91%] Building CXX object CMakeFiles/ueberzug.dir/src/image.cpp.o
[ 95%] Building CXX object CMakeFiles/ueberzug.dir/src/image/libvips.cpp.o
[100%] Linking CXX executable ueberzug
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/util/util.cpp.o: in function `util::get_b2_hash_ssl[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >)':
util.cpp:(.text+0x1690): undefined reference to `EVP_MD_size'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ueberzug.dir/build.make:468: ueberzug] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ueberzug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
jstkdng commented 8 months ago

can't reproduce on my end. Are you compiling from master or latest release

sergiuser1 commented 8 months ago

I tried from master and latest release, and I get the same errors. These are the libssl libraries I have, are they the right version?

seoj@seoj-linux0x:build$ ls /usr/lib/libssl*
-rwxr-xr-x 1 root root 592K Sep 17 10:05 /usr/lib/libssl.so.1.1*
-rwxr-xr-x 1 root root 894K Dec 17 09:18 /usr/lib/libssl.so.3*
-rwxr-xr-x 1 root root 415K Dec 20 01:20 /usr/lib/libssl3.so*
lrwxrwxrwx 1 root root   11 Dec 17 09:18 /usr/lib/libssl.so -> libssl.so.3*
jstkdng commented 8 months ago

Indeed they are the correct version. And ueberzugpp uses libcrypto instead of libssl. Sorry, I'm unable to help as I can't reproduce the issue on my end. Closing until someone comes with a solution.

jacanchaplais commented 6 months ago

I'm having the same issue. I do a full system upgrade every day, so unlikely to be out-of-date dependencies.

$ yay -Syu ueberzugpp                                                                                                                                                          [14:13:00]
:: Synchronising package databases...
 core is up to date
 extra                                                                                             8.3 MiB  15.8 MiB/s 00:01 [###########################################################################] 100%
 community is up to date
 multilib is up to date
:: Searching AUR for updates...
:: Searching databases for updates...
 -> Packages not in AUR: haskell-connection  haskell-x509-store  haskell-x509-system  haskell-x509-validation  libspotify
 -> Flagged Out Of Date AUR Packages: asoundconf
:: 6 dependencies will also be installed for this operation.
   extra/cli11                 -> 2.3.2-1
   (make dependency of ueberzugpp)
   extra/cmake                 -> 3.28.3-1
   (make dependency of ueberzugpp)
   extra/extra-cmake-modules   -> 5.115.0-1
   (make dependency of ueberzugpp)
   extra/nlohmann-json         -> 3.11.2-2
   (make dependency of ueberzugpp)
   extra/range-v3              -> 0.12.0-1
   (make dependency of ueberzugpp)
   extra/wayland-protocols     -> 1.33-1
   (make dependency of ueberzugpp)

:: 1 package to upgrade/install.
1  aur/ueberzugpp   -> 2.9.4-1
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==>
AUR Explicit (1): ueberzugpp-2.9.4-1
Sync Make Dependency (6): extra-cmake-modules-5.115.0-1, range-v3-0.12.0-1, cmake-3.28.3-1, cli11-2.3.2-1, nlohmann-json-3.11.2-2, wayland-protocols-1.33-1
:: PKGBUILD up to date, skipping download: ueberzugpp
  1 ueberzugpp                               (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> A
:: Deleting (1/1): /home/jacan/.cache/yay/ueberzugpp
HEAD is now at 82aad16 upgpkg: ueberzugpp 2.9.4-1
warning: could not open directory 'pkg/': Permission denied
Removing pkg/
Removing src/
Removing v2.9.2.tar.gz
Removing v2.9.4.tar.gz
  1 ueberzugpp                               (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
==> Making package: ueberzugpp 2.9.4-1 (Mon 26 Feb 2024 14:17:05 GMT)
==> Retrieving sources...
  -> Downloading v2.9.4.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 67825    0 67825    0     0   140k      0 --:--:-- --:--:-- --:--:--  140k
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha256sums...
    v2.9.4.tar.gz ... Passed
:: Remove make dependencies after install? [y/N] y
:: (1/1) Parsing SRCINFO: ueberzugpp
:: Synchronising package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (8) cppdap-1.58.0-1  rhash-1.4.4-1  cli11-2.3.2-1  cmake-3.28.3-1  extra-cmake-modules-5.115.0-1  nlohmann-json-3.11.2-2  range-v3-0.12.0-1  wayland-protocols-1.33-1

Total Installed Size:  79.83 MiB

:: Proceed with installation? [Y/n] y
(8/8) checking keys in keyring                                                                                               [###########################################################################] 100%
(8/8) checking package integrity                                                                                             [###########################################################################] 100%
(8/8) loading package files                                                                                                  [###########################################################################] 100%
(8/8) checking for file conflicts                                                                                            [###########################################################################] 100%
(8/8) checking available disk space                                                                                          [###########################################################################] 100%
:: Processing package changes...
(1/8) installing range-v3                                                                                                    [###########################################################################] 100%
(2/8) installing rhash                                                                                                       [###########################################################################] 100%
(3/8) installing cppdap                                                                                                      [###########################################################################] 100%
(4/8) installing cmake                                                                                                       [###########################################################################] 100%
Optional dependencies for cmake
    make: for unix Makefile generator [installed]
    ninja: for ninja generator
    qt6-base: cmake-gui [installed]
(5/8) installing cli11                                                                                                       [###########################################################################] 100%
(6/8) installing nlohmann-json                                                                                               [###########################################################################] 100%
(7/8) installing wayland-protocols                                                                                           [###########################################################################] 100%
(8/8) installing extra-cmake-modules                                                                                         [###########################################################################] 100%
Optional dependencies for extra-cmake-modules
    python-pyxdg: to generate fastlane metadata for Android apps
    python-requests: to generate fastlane metadata for Android apps
    python-yaml: to generate fastlane metadata for Android apps
:: Running post-transaction hooks...
(1/4) Arming ConditionNeedsUpdate...
(2/4) Updating the MIME type database...
(3/4) Updating icon theme caches...
(4/4) Updating the desktop file MIME type cache...
==> Making package: ueberzugpp 2.9.4-1 (Mon 26 Feb 2024 14:17:25 GMT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found v2.9.4.tar.gz
==> Validating source files with sha256sums...
    v2.9.4.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting v2.9.4.tar.gz with bsdtar
==> Sources are ready.
==> Making package: ueberzugpp 2.9.4-1 (Mon 26 Feb 2024 14:17:29 GMT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
-- The CXX compiler identification is GNU 13.2.1
-- The C compiler identification is GNU 13.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/gcc - 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 "2.1.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.2.1")
-- Looking for std::execution::par_unseq
-- Looking for std::execution::par_unseq - found
-- Found OpenGL: /usr/lib/libOpenGL.so
-- Checking for module 'xcb'
--   Found xcb, version 1.16
-- Checking for module 'xcb-image'
--   Found xcb-image, version 0.4.1
-- Checking for module 'xcb-res'
--   Found xcb-res, version 1.16
-- Checking for module 'xcb-errors'
--   Found xcb-errors, version 1.0.1
-- Found Wayland_Client: /usr/lib/libwayland-client.so (found version "1.22.0")
-- Found Wayland_Egl: /usr/lib/libwayland-egl.so (found version "18.1.0")
-- Found Wayland: /usr/lib/libwayland-client.so;/usr/lib/libwayland-egl.so (found version "1.22.0") found components: Client Egl
-- Found WaylandProtocols: //usr/share/wayland-protocols (found version "1.33")
-- Found WaylandScanner: /usr/bin/wayland-scanner
-- Found OpenCV: /usr (found version "4.9.0") found components: core imgproc imgcodecs videoio
-- Checking for module 'vips-cpp'
--   Found vips-cpp, version 8.15.1
-- Checking for module 'libsixel'
--   Found libsixel, version 1.10.3
-- Checking for module 'chafa>=1.6'
--   Found chafa, version 1.14.0
-- Checking for module 'libexif'
--   Found libexif, version 0.6.24
-- Configuring done (5.9s)
-- Generating done (0.1s)
-- Build files have been written to: /home/jacan/.cache/yay/ueberzugpp/src/build
[  2%] Generating wayland-xdg-shell-client-protocol.h
[  5%] Generating wayland-xdg-shell-protocol.c
[  7%] Building CXX object CMakeFiles/ueberzug.dir/src/util/egl.cpp.o
[ 10%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/window/x11.cpp.o
[ 13%] Building CXX object CMakeFiles/ueberzug.dir/src/util/x11.cpp.o
[ 15%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o
[ 18%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/window/x11egl.cpp.o
[ 21%] Building C object CMakeFiles/ueberzug.dir/wayland-xdg-shell-protocol.c.o
[ 23%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/window/waylandegl.cpp.o
[ 26%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/wayland.cpp.o
[ 28%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/config.cpp.o
[ 31%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/window/shm.cpp.o
[ 34%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/window/waylandshm.cpp.o
[ 36%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/config/sway.cpp.o
[ 39%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/config/hyprland.cpp.o
[ 42%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/config/wayfire.cpp.o
[ 44%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/wayland/config/dummy.cpp.o
[ 47%] Building CXX object CMakeFiles/ueberzug.dir/src/image/opencv.cpp.o
[ 50%] Building CXX object CMakeFiles/ueberzug.dir/src/process/linux.cpp.o
[ 52%] Building CXX object CMakeFiles/ueberzug.dir/src/main.cpp.o
[ 55%] Building CXX object CMakeFiles/ueberzug.dir/src/application.cpp.o
[ 57%] Building CXX object CMakeFiles/ueberzug.dir/src/os.cpp.o
[ 60%] Building CXX object CMakeFiles/ueberzug.dir/src/tmux.cpp.o
[ 63%] Building CXX object CMakeFiles/ueberzug.dir/src/terminal.cpp.o
[ 65%] Building CXX object CMakeFiles/ueberzug.dir/src/dimensions.cpp.o
[ 68%] Building CXX object CMakeFiles/ueberzug.dir/src/flags.cpp.o
[ 71%] Building CXX object CMakeFiles/ueberzug.dir/src/util/util.cpp.o
[ 73%] Building CXX object CMakeFiles/ueberzug.dir/src/util/socket.cpp.o
[ 76%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas.cpp.o
[ 78%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/chafa.cpp.o
[ 81%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/sixel.cpp.o
[ 84%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/kitty.cpp.o
[ 86%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/chunk.cpp.o
[ 89%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/iterm2/iterm2.cpp.o
[ 92%] 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: CMakeFiles/ueberzug.dir/src/util/egl.cpp.o: undefined reference to symbol '_ZTVN10__cxxabiv121__vmi_class_type_infoE@@CXXABI_1.3'
/usr/bin/ld: /usr/lib/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ueberzug.dir/build.make:678: ueberzug] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ueberzug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: ueberzugpp-exit status 4
checking dependencies...
jstkdng commented 6 months ago

can you try building without using yay?

jacanchaplais commented 6 months ago
$ git clone https://github.com/jstkdng/ueberzugpp.git                                                                                                                [15:03:11]
cd ueberzugpp
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
Cloning into 'ueberzugpp'...
remote: Enumerating objects: 4704, done.
remote: Counting objects: 100% (2018/2018), done.
remote: Compressing objects: 100% (626/626), done.
remote: Total 4704 (delta 1572), reused 1774 (delta 1385), pack-reused 2686
Receiving objects: 100% (4704/4704), 1.31 MiB | 11.67 MiB/s, done.
Resolving deltas: 100% (3412/3412), done.
-- The CXX compiler identification is GNU 13.2.1
-- The C compiler identification is GNU 13.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/gcc - 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 "2.1.0")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.2.1")
-- Looking for std::execution::par_unseq
-- Looking for std::execution::par_unseq - found
-- Using the multi-header code from /home/jacan/downloads/ueberzugpp/build/_deps/nlohmann_json-src/include/
-- Found Git: /usr/bin/git (found version "2.44.0")
-- [range-v3]: C++ std=2a
-- Performing Test RANGES_HAS_CXXSTD
-- Performing Test RANGES_HAS_CXXSTD - Success
-- Performing Test RANGES_HAS_WALL
-- Performing Test RANGES_HAS_WALL - Success
-- Performing Test RANGES_HAS_WEXTRA
-- Performing Test RANGES_HAS_WEXTRA - Success
-- Performing Test RANGES_HAS_WERROR
-- Performing Test RANGES_HAS_WERROR - Success
-- Performing Test RANGES_HAS_FDIAGNOSTIC_SHOW_TEMPLATE_TREE
-- Performing Test RANGES_HAS_FDIAGNOSTIC_SHOW_TEMPLATE_TREE - Success
-- Performing Test RANGES_HAS_FTEMPLATE_BACKTRACE_LIMIT
-- Performing Test RANGES_HAS_FTEMPLATE_BACKTRACE_LIMIT - Success
-- Performing Test RANGES_HAS_FMACRO_BACKTRACE_LIMIT
-- Performing Test RANGES_HAS_FMACRO_BACKTRACE_LIMIT - Failed
-- Performing Test RANGES_HAS_OMIT_FRAME_POINTER
-- Performing Test RANGES_HAS_OMIT_FRAME_POINTER - Success
-- Performing Test RANGES_HAS_OFAST
-- Performing Test RANGES_HAS_OFAST - Success
-- Performing Test RANGES_HAS_STRICT_ALIASING
-- Performing Test RANGES_HAS_STRICT_ALIASING - Success
-- Performing Test RANGES_HAS_STRICT_VTABLE_POINTERS
-- Performing Test RANGES_HAS_STRICT_VTABLE_POINTERS - Failed
-- Performing Test RANGES_HAS_FAST_MATH
-- Performing Test RANGES_HAS_FAST_MATH - Success
-- Performing Test RANGES_HAS_VECTORIZE
-- Performing Test RANGES_HAS_VECTORIZE - Failed
-- Performing Test RANGES_HAS_SIZED_DEALLOCATION
-- Performing Test RANGES_HAS_SIZED_DEALLOCATION - Success
-- Performing Test RANGES_HAS_MARCH_NATIVE
-- Performing Test RANGES_HAS_MARCH_NATIVE - Success
-- Performing Test RANGES_HAS_MTUNE_NATIVE
-- Performing Test RANGES_HAS_MTUNE_NATIVE - Success
-- Performing Test RANGE_V3_ALIGNED_NEW_PROBE
-- Performing Test RANGE_V3_ALIGNED_NEW_PROBE - Failed
-- Performing Test RANGE_V3_HAS_FCONCEPTS
-- Performing Test RANGE_V3_HAS_FCONCEPTS - Success
-- Checking for module 'xcb'
--   Found xcb, version 1.16
-- Checking for module 'xcb-image'
--   Found xcb-image, version 0.4.1
-- Checking for module 'xcb-res'
--   Found xcb-res, version 1.16
-- Found OpenCV: /usr (found version "4.9.0") found components: core imgproc imgcodecs videoio
-- Checking for module 'vips-cpp'
--   Found vips-cpp, version 8.15.1
-- Checking for module 'libsixel'
--   Found libsixel, version 1.10.3
-- Checking for module 'chafa>=1.6'
--   Found chafa, version 1.14.0
-- Checking for module 'libexif'
--   Found libexif, version 0.6.24
-- Configuring done (15.7s)
-- Generating done (0.5s)
-- Build files have been written to: /home/jacan/downloads/ueberzugpp/build
[  0%] Built target CLI11
[  4%] Building CXX object CMakeFiles/ueberzug.dir/src/util/x11.cpp.o
[  8%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o
[ 12%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/x11/window/x11.cpp.o
[ 16%] Building CXX object CMakeFiles/ueberzug.dir/src/image/opencv.cpp.o
[ 20%] Building CXX object CMakeFiles/ueberzug.dir/src/process/linux.cpp.o
[ 25%] Building CXX object CMakeFiles/ueberzug.dir/src/main.cpp.o
[ 29%] Building CXX object CMakeFiles/ueberzug.dir/src/application.cpp.o
[ 33%] Building CXX object CMakeFiles/ueberzug.dir/src/os.cpp.o
[ 37%] Building CXX object CMakeFiles/ueberzug.dir/src/tmux.cpp.o
[ 41%] Building CXX object CMakeFiles/ueberzug.dir/src/terminal.cpp.o
[ 45%] Building CXX object CMakeFiles/ueberzug.dir/src/dimensions.cpp.o
[ 50%] Building CXX object CMakeFiles/ueberzug.dir/src/flags.cpp.o
[ 54%] Building CXX object CMakeFiles/ueberzug.dir/src/util/util.cpp.o
[ 58%] Building CXX object CMakeFiles/ueberzug.dir/src/util/socket.cpp.o
[ 62%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas.cpp.o
[ 66%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/chafa.cpp.o
[ 70%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/sixel.cpp.o
[ 75%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/kitty.cpp.o
[ 79%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/kitty/chunk.cpp.o
[ 83%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/iterm2/iterm2.cpp.o
[ 87%] Building CXX object CMakeFiles/ueberzug.dir/src/canvas/iterm2/chunk.cpp.o
[ 91%] Building CXX object CMakeFiles/ueberzug.dir/src/image.cpp.o
[ 95%] Building CXX object CMakeFiles/ueberzug.dir/src/image/libvips.cpp.o
[100%] Linking CXX executable ueberzug
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o: undefined reference to symbol '_ZTVN10__cxxabiv121__vmi_class_type_infoE@@CXXABI_1.3'
/usr/bin/ld: /usr/lib/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ueberzug.dir/build.make:469: ueberzug] Error 1
make[1]: *** [CMakeFiles/Makefile2:167: CMakeFiles/ueberzug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
jstkdng commented 6 months ago

I think I found the issue.

-- Check for working CXX compiler: /usr/bin/gcc - skipped

seems it is trying to use gcc for compiling C++ code, it should be using g++ (or c++). Can you run echo $CC and echo $CXX ?

jacanchaplais commented 6 months ago

Ah brilliant, good spot, thank you! I had an environment variable I set at some point for CXX set to gcc. It works, now!

MattiaSilvestri commented 5 months ago

I get the same linking error using both AUR package and build from source, and my CXX variable is correctly set to c++:

-- 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/gcc - skipped

But also got all of this additional output:

/usr/bin/ld: warning: libfmt.so.10, needed by /usr/lib/libspdlog.so.1.12.0, may conflict with libfmt.so.9
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o: in function `X11Canvas::X11Canvas()':
x11.cpp:(.text+0x4a72): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o: in function `X11Canvas::add_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<Image, std::default_delete<Image> >)':
x11.cpp:(.text+0x697e): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o: in function `void spdlog::logger::log_<unsigned int const&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, unsigned int const&)':
x11.cpp:(.text._ZN6spdlog6logger4log_IJRKjEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_[_ZN6spdlog6logger4log_IJRKjEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_]+0x122): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o: in function `void spdlog::logger::log_<unsigned int const&, unsigned short const&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, unsigned int const&, unsigned short const&)':
x11.cpp:(.text._ZN6spdlog6logger4log_IJRKjRKtEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_[_ZN6spdlog6logger4log_IJRKjRKtEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_]+0x134): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/canvas/x11/x11.cpp.o: in function `void spdlog::logger::log_<int const&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, int const&)':
x11.cpp:(.text._ZN6spdlog6logger4log_IJRKiEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_[_ZN6spdlog6logger4log_IJRKiEEEvNS_10source_locENS_5level10level_enumEN3fmt2v917basic_string_viewIcEEDpOT_]+0x122): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: CMakeFiles/ueberzug.dir/src/canvas/x11/window/x11.cpp.o:x11.cpp:(.text+0x33b2): more undefined references to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ueberzug.dir/build.make:624: ueberzug] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ueberzug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
PCesteban commented 3 months ago

Hello @jstkdng, I have the same issue:

my CXX variable is correct

==> Starting build()...
-- The CXX compiler identification is GNU 13.2.1
-- The C compiler identification is GNU 13.2.1
-- 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 "2.1.1")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.3.0")
-- Looking for std::execution::par_unseq
-- Looking for std::execution::par_unseq - found
-- Found OpenGL: /usr/lib/libOpenGL.so

This is the output when it fails:

[100%] Linking CXX executable ueberzug
/usr/bin/ld: warning: libfmt.so.10, needed by /usr/lib/libspdlog.so.1.14.1, may conflict with libfmt.so.9
/usr/bin/ld: /tmp/ccCYI9a3.ltrans1.ltrans.o: in function `void spdlog::logger::log<char [15]>(spdlog::level::level_enum, char const (&) [15])':
/usr/include/spdlog/logger.h:122:(.text+0x4204): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans1.ltrans.o: in function `X11Canvas::add_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<Image, std::default_delete<Image> >)':
/usr/include/spdlog/logger.h:331:(.text+0x6c88): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o: in function `void spdlog::logger::log_<unsigned short&, unsigned short&, int&, int&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, unsigned short&, unsigned short&, int&, int&) [clone .constprop.0]':
/usr/include/spdlog/logger.h:331:(.text+0x1014): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o: in function `void spdlog::logger::log_<int&, int&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, int&, int&) [clone .constprop.0]':
/usr/include/spdlog/logger.h:331:(.text+0x11a6): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o: in function `void spdlog::logger::log_<unsigned short&, unsigned short&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, unsigned short&, unsigned short&) [clone .constprop.0]':
/usr/include/spdlog/logger.h:331:(.text+0x1334): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o:/usr/include/spdlog/logger.h:331: more undefined references to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)' follow
/usr/bin/ld: /usr/lib/libcfitsio.so.10: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libcfitsio.so.10: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_strerror@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ueberzug.dir/build.make:677: ueberzug] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ueberzug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
PCesteban commented 3 months ago

Hello @jstkdng, I have the same issue:

my CXX variable is correct

==> Starting build()...
-- The CXX compiler identification is GNU 13.2.1
-- The C compiler identification is GNU 13.2.1
-- 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 "2.1.1")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/libcrypto.so (found version "3.3.0")
-- Looking for std::execution::par_unseq
-- Looking for std::execution::par_unseq - found
-- Found OpenGL: /usr/lib/libOpenGL.so

This is the output when it fails:

[100%] Linking CXX executable ueberzug
/usr/bin/ld: warning: libfmt.so.10, needed by /usr/lib/libspdlog.so.1.14.1, may conflict with libfmt.so.9
/usr/bin/ld: /tmp/ccCYI9a3.ltrans1.ltrans.o: in function `void spdlog::logger::log<char [15]>(spdlog::level::level_enum, char const (&) [15])':
/usr/include/spdlog/logger.h:122:(.text+0x4204): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans1.ltrans.o: in function `X11Canvas::add_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::unique_ptr<Image, std::default_delete<Image> >)':
/usr/include/spdlog/logger.h:331:(.text+0x6c88): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o: in function `void spdlog::logger::log_<unsigned short&, unsigned short&, int&, int&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, unsigned short&, unsigned short&, int&, int&) [clone .constprop.0]':
/usr/include/spdlog/logger.h:331:(.text+0x1014): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o: in function `void spdlog::logger::log_<int&, int&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, int&, int&) [clone .constprop.0]':
/usr/include/spdlog/logger.h:331:(.text+0x11a6): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o: in function `void spdlog::logger::log_<unsigned short&, unsigned short&>(spdlog::source_loc, spdlog::level::level_enum, fmt::v9::basic_string_view<char>, unsigned short&, unsigned short&) [clone .constprop.0]':
/usr/include/spdlog/logger.h:331:(.text+0x1334): undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)'
/usr/bin/ld: /tmp/ccCYI9a3.ltrans12.ltrans.o:/usr/include/spdlog/logger.h:331: more undefined references to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v9::basic_string_view<char>, spdlog::level::level_enum, fmt::v9::basic_string_view<char>)' follow
/usr/bin/ld: /usr/lib/libcfitsio.so.10: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libcfitsio.so.10: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_strerror@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/libsixel.so: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/ueberzug.dir/build.make:677: ueberzug] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ueberzug.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().

For the record, I was able to solve this by deactivating my Python virtual environment. Some libraries were in conflict needed during the build process. Now it works, with alacritty, GNOME and X11, waiting patiently for the GNOME + Wayland support