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"
Summary: audio/openal-soft: Fails to link with JACK enabled: ERROR: ld-elf.so.1: /usr/...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-08-09 03:34 UTC by Jack
Modified: 2021-08-11 14:08 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)
koobs: merge-quarterly?


Attachments
pkg version -v output (60.73 KB, text/plain)
2021-08-09 05:46 UTC, Jack
no flags Details
compile log with make showconfig (107.64 KB, text/plain)
2021-08-09 05:47 UTC, Jack
no flags Details
Workaround for the missing symbol (596 bytes, patch)
2021-08-09 20:31 UTC, Florian Walpen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 freebsd_committer freebsd_triage 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     jack@upstairs.jack.com:/usr/obj/usr/src/amd64.amd64/sys/UPSTAIRS  amd64
Comment 3 Jack 2021-08-09 05:46:36 UTC
Created attachment 227032 [details]
pkg version -v output
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.