|Summary:||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"|
|Product:||Ports & Packages||Reporter:||Jack <xxjack12xx>|
|Component:||Individual Port(s)||Assignee:||freebsd-multimedia (Nobody) <multimedia>|
|Severity:||Affects Some People||CC:||dev, sascha.folie, xxjack12xx|
Description Jack 2021-08-09 03:34:57 UTC
When openal-soft is built with JACK support, the following error appears. ERROR: ld-elf.so.1: /usr/local/lib/libopenal.so.1: Undefined symbol "jack_error_callback"
Comment 1 Kubilay Kocak 2021-08-09 03:39:04 UTC
(In reply to Jack from comment #0) Thank you for your report. Could you add some additional detail, including: - uname -a output - pkg version -v output - full build log (compressed if necessary) - config.log output (in WRKSRC directory, compressed if necessary)
Comment 2 Jack 2021-08-09 05:46:02 UTC
FreeBSD upstairs.jack.com 13.0-STABLE FreeBSD 13.0-STABLE #0 stable/13-n246457-1ea187f8a1bf: Sat Jul 24 00:28:11 PDT 2021 email@example.com:/usr/obj/usr/src/amd64.amd64/sys/UPSTAIRS amd64
Comment 4 Jack 2021-08-09 05:47:04 UTC
Created attachment 227033 [details] compile log with make showconfig
Comment 5 Jack 2021-08-09 05:49:21 UTC
I don't think there is a config.log for cmake?
Comment 6 Florian Walpen 2021-08-09 20:31:06 UTC
Created attachment 227058 [details] Workaround for the missing symbol I can confirm this. Had to install games/supertux2 though, none of my existing ports actually use OpenAL, despite dependencies. The new audio/jack version does not export the jack_error_callback symbol anymore, at least not in the client library (libjack.so). This looks intentional to me, as the symbol is marked optional. My first workaround (and proof of culprit) is attached here. The nullptr argument makes jack use its default handler, which should be fine. And it gets supertux running.
Comment 7 Florian Walpen 2021-08-09 20:51:03 UTC
The code in question looks like it tries to check for the presence of the jack_error_callback symbol. That hints to weak symbol references, but the included `jack/jack.h` header does not specify jack_error_callback as weak. There is actually an additional `jack/weakjack.h` header installed which can be used to achieve that. But when I add it here, other symbols (which are present) provoke a SEGFAULT. There may be a problem with linking order, I didn't investigate any further.