Skip to content

undefined reference to symbol dlclose #2854

@ddennedy

Description

@ddennedy

My daily builds on ubuntu:20.04 started failing on Feb. 27 with the error in the subject.
From https://github.com/mltframework/shotcut/actions/runs/13561560133/job/37905518078

LOG: About to run command: cmake -B build -G Ninja -D CMAKE_INSTALL_PREFIX=/root/shotcut/Shotcut/Shotcut.app -DCMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=ON -D GGML_NATIVE=OFF -D GGML_AVX2=OFF -D WHISPER_BUILD_SERVER=OFF -D WHISPER_BUILD_TESTS=OFF -D GGML_BLAS=ON -D GGML_BLAS_VENDOR=OpenBLAS
-- The C compiler identification is GNU 10.5.0
-- The CXX compiler identification is GNU 10.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-10 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-10 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.25.1")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- Including CPU backend
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -msse4.2;-mf16c;-mfma;-mavx GGML_SSE42;GGML_F16C;GGML_FMA;GGML_AVX
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /root/shotcut/Shotcut/Shotcut.app/lib/libopenblas.so
-- BLAS found, Libraries: /root/shotcut/Shotcut/Shotcut.app/lib/libopenblas.so
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'openblas64'
--   No package 'openblas64' found
-- Checking for module 'openblas'
--   Found openblas, version 0.3.29.dev
-- BLAS found, Includes: /root/shotcut/Shotcut/Shotcut.app/include/openblas
-- Including BLAS backend
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: /root/shotcut/src/whisper.cpp/build
LOG: Done configuring whisper.cpp
LOG: Building whisper.cpp - this could take some time
LOG: About to run command: ninja -C build -j 5
ninja: Entering directory `build'
[1/44] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.o
[2/44] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-alloc.c.o
[3/44] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.o
[4/44] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.o
[5/44] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml.c.o
[6/44] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.o
[7/44] Building CXX object ggml/src/CMakeFiles/ggml.dir/ggml-backend-reg.cpp.o
[8/44] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-hbm.cpp.o
[9/44] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.o
[10/44] Building C object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-quants.c.o
[11/44] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-traits.cpp.o
[12/44] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu-aarch64.cpp.o
[13/44] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/amx.cpp.o
[14/44] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/mmq.cpp.o
[15/44] Building CXX object ggml/src/ggml-blas/CMakeFiles/ggml-blas.dir/ggml-blas.cpp.o
[16/44] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-quants.c.o
[17/44] Linking CXX shared library ggml/src/libggml-base.so
[18/44] Linking CXX shared library ggml/src/ggml-blas/libggml-blas.so
[19/44] Building C object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.o
[20/44] Linking CXX shared library ggml/src/libggml-cpu.so
[21/44] Linking CXX shared library ggml/src/libggml.so
[22/44] Building CXX object examples/CMakeFiles/common.dir/grammar-parser.cpp.o
[23/44] Building CXX object examples/bench/CMakeFiles/whisper-bench.dir/bench.cpp.o
[24/44] Building CXX object examples/cli/CMakeFiles/whisper-cli.dir/cli.cpp.o
[25/44] Building CXX object examples/CMakeFiles/common.dir/common-ggml.cpp.o
[26/44] Building CXX object examples/deprecation-warning/CMakeFiles/main.dir/deprecation-warning.cpp.o
[27/44] Linking CXX executable bin/main
[28/44] Building CXX object examples/quantize/CMakeFiles/quantize.dir/quantize.cpp.o
[29/44] Building CXX object examples/deprecation-warning/CMakeFiles/bench.dir/deprecation-warning.cpp.o
[30/44] Building CXX object examples/deprecation-warning/CMakeFiles/stream.dir/deprecation-warning.cpp.o
[31/44] Linking CXX executable bin/bench
[32/44] Linking CXX executable bin/stream
[33/44] Building CXX object examples/deprecation-warning/CMakeFiles/command.dir/deprecation-warning.cpp.o
[34/44] Linking CXX executable bin/command
[35/44] Building CXX object src/CMakeFiles/whisper.dir/whisper.cpp.o
[36/44] Linking CXX shared library src/libwhisper.so.1.7.4
[37/44] Creating library symlink src/libwhisper.so.1 src/libwhisper.so
[38/44] Linking CXX executable bin/whisper-bench
[39/44] Building CXX object examples/server/CMakeFiles/whisper-server.dir/server.cpp.o
[40/44] Building CXX object examples/CMakeFiles/common.dir/common.cpp.o
[41/44] Linking CXX static library examples/libcommon.a
[42/44] Linking CXX executable bin/whisper-cli
FAILED: bin/whisper-cli 
: && /usr/bin/g++-10 -O3 -DNDEBUG  examples/cli/CMakeFiles/whisper-cli.dir/cli.cpp.o -o bin/whisper-cli  -Wl,-rpath,/root/shotcut/src/whisper.cpp/build/src:/root/shotcut/src/whisper.cpp/build/ggml/src:/root/shotcut/src/whisper.cpp/build/ggml/src/ggml-blas:  examples/libcommon.a  src/libwhisper.so.1.7.4  -lpthread  ggml/src/libggml.so  ggml/src/libggml-cpu.so  ggml/src/ggml-blas/libggml-blas.so  ggml/src/libggml-base.so && :
/usr/bin/ld: examples/libcommon.a(common.cpp.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
[43/44] Linking CXX executable bin/whisper-server
FAILED: bin/whisper-server 
: && /usr/bin/g++-10 -O3 -DNDEBUG  examples/server/CMakeFiles/whisper-server.dir/server.cpp.o -o bin/whisper-server  -Wl,-rpath,/root/shotcut/src/whisper.cpp/build/src:/root/shotcut/src/whisper.cpp/build/ggml/src:/root/shotcut/src/whisper.cpp/build/ggml/src/ggml-blas:  examples/libcommon.a  src/libwhisper.so.1.7.4  -lpthread  ggml/src/libggml.so  ggml/src/libggml-cpu.so  ggml/src/ggml-blas/libggml-blas.so  ggml/src/libggml-base.so && :
/usr/bin/ld: examples/libcommon.a(common.cpp.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions