[Bug 257696] audio/openal-soft: Fails to link with JACK enabled: ERROR: ld-elf.so.1: /usr/local/lib/libopenal.so.1: Undefined symbol "jack_error_callback"
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 257696] audio/openal-soft Undefined symbol"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 15 Jan 2022 09:45:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257696 Sean Champ <lab+bsd@thinkum.space> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lab+bsd@thinkum.space --- Comment #8 from Sean Champ <lab+bsd@thinkum.space> --- I've seen this error also, compiling multimedia/ffmpeg with jack enabled, with clang 13 in FreeBSD 12.3-STABLE. An excerpt of the build log for multimedia/ffmpeg ~~~~ /usr/local/libexec/ccache/clang -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -lm -Wl,-rpath,/> /usr/local/libexec/ccache/clang -Llibavcodec -Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil -Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -lm -Wl,-rpath,/> ld: error: /usr/local/lib/libopenal.so: undefined reference to jack_error_callback [--no-allow-shlib-undefined] clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [Makefile:124: ffplay_g] Error 1 gmake[2]: *** Waiting for unfinished jobs.... ld: error: /usr/local/lib/libopenal.so: undefined reference to jack_error_callback [--no-allow-shlib-undefined] clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake[2]: *** [Makefile:124: ffmpeg_g] Error 1 gmake[2]: Leaving directory '/wrkdirs/usr/ports/multimedia/ffmpeg/work/ffmpeg-4.4.1' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/multimedia/ffmpeg ~~~~ -ljack does show up in the compiler call, so there went my first guess ... After the tip about possible side effects with weak pointers here, then looking at the work src file for jack work/jack2-eaedec353489f26617221d66f80fd2503953c663/common/jack/weakmacros.h ~~~~ #ifndef JACK_WEAK_EXPORT #ifdef __GNUC__ /* JACK_WEAK_EXPORT needs to be a macro which expands into a compiler directive. If non-null, the directive must tell the compiler to arrange for weak linkage of the symbol it used with. For this to work full may require linker arguments in the client as well. */ #ifdef _WIN32 /* Not working with __declspec(dllexport) so normal linking Linking with JackWeakAPI.cpp will be the preferred way. */ #define JACK_WEAK_EXPORT #else #define JACK_WEAK_EXPORT __attribute__((WEAK_ATTRIBUTE)) #endif ~~~~ Maybe JACK_WEAK_EXPORT is not being defined when the build is produced with clang? As a workaround, I'll try building Jack with GCC, the openal-soft and ffmpeg after. Hopefully it may clear up then -- You are receiving this mail because: You are the assignee for the bug.