[FFmpeg-devel] Linking ffmpeg libavfilter error: undefined reference to symbol 'dlopen@@GLIBC_2.2.5'

david Atkins david at 3adesign.co.uk
Thu Apr 6 08:59:23 EEST 2023


I'm writing a new filter for ffmpeg and need to load a dynamic library using dlopen from dlfcn.h
when I "make" if get the following
LD      ffmpeg_g
/usr/bin/ld: libavfilter/libavfilter.a(vsrc_plugin_source.o): undefined reference to symbol 'dlopen@@GLIBC_2.2.5'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:131: ffmpeg_g] Error 1
If I comment out the dlopen then all builds okay, searching widely suggests that -ldl is needed but this error suggests libdl is being used so should be already managed by configure.
Any suggestions as to how to resolve this, if the answer is "add -ldl" then where does the ffmpeg build system expect it to be added?
I've tried to build one of the other filters that uses dlopen and get a similar issue.

David



More information about the ffmpeg-devel mailing list