[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"

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 15 Jan 2022 19:56:24 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257696

--- Comment #12 from Sean Champ <lab+bsd@thinkum.space> ---
(In reply to Florian Walpen from comment #11)

Great to hear!

fwiw the openal-soft build failed when I tried to compile with gcc11.  An
excerpt of the verbose build log under poudriere:
~~~~
[ 13% 15/107] /usr/local/libexec/ccache/g++11 -DRESTRICT=__restrict
-I/wrkdirs/usr/ports/audio/openal-soft/work/.build
-I/wrkdirs/usr/ports/audio/openal-soft/work/openal-soft-1.21.1/utils -I>
FAILED: CMakeFiles/makemhr.dir/utils/makemhr/loadsofa.cpp.o
/usr/local/libexec/ccache/g++11 -DRESTRICT=__restrict
-I/wrkdirs/usr/ports/audio/openal-soft/work/.build
-I/wrkdirs/usr/ports/audio/openal-soft/work/openal-soft-1.21.1/utils
-I/wrkdirs/usr/p>
../openal-soft-1.21.1/utils/makemhr/loadsofa.cpp: In function 'bool
LoadSofaFile(const char*, uint, uint, uint, ChannelModeT, HrirDataT*)':
../openal-soft-1.21.1/utils/makemhr/loadsofa.cpp:554:27: error: 'sleep_for' is
not a member of 'std::this_thread'
  554 |         std::this_thread::sleep_for(std::chrono::milliseconds{50});
      |                           ^~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-thread-safety' may have
been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option '-Wno-thread-safety' may have
been intended to silence earlier diagnostics
[ 14% 15/107] /usr/local/libexec/ccache/g++11 -DRESTRICT=__restrict
-I/wrkdirs/usr/ports/audio/openal-soft/work/.build
-I/wrkdirs/usr/ports/audio/openal-soft/work/openal-soft-1.21.1/utils -I>
In file included from ../openal-soft-1.21.1/utils/makemhr/makemhr.cpp:65:
../openal-soft-1.21.1/utils/makemhr/makemhr.h: In function 'int
ProcessDefinition(const char*, uint, ChannelModeT, bool, uint, uint, int, int,
double, uint, HeadModelT, double, const char*)':
../openal-soft-1.21.1/utils/makemhr/makemhr.h:91:8: warning: inlining failed in
call to 'HrirDataT::~HrirDataT() noexcept': call is unlikely and code size
would grow [-Winline]
   91 | struct HrirDataT {
      |        ^~~~~~~~~
../openal-soft-1.21.1/utils/makemhr/makemhr.cpp:1485:1: note: called from here
 1485 | }
      | ^
In file included from ../openal-soft-1.21.1/utils/makemhr/makemhr.cpp:65:
../openal-soft-1.21.1/utils/makemhr/makemhr.h:91:8: warning: inlining failed in
call to 'HrirDataT::~HrirDataT() noexcept': call is unlikely and code size
would grow [-Winline]
   91 | struct HrirDataT {
      |        ^~~~~~~~~
../openal-soft-1.21.1/utils/makemhr/makemhr.cpp:1485:1: note: called from here
 1485 | }
      | ^
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-thread-safety' may have
been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option '-Wno-thread-safety' may have
been intended to silence earlier diagnostics
ninja: build stopped: subcommand failed.
===> 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/audio/openal-soft
*** Error code 1
~~~

fwiw the '-Wno-thread-safety' option was added to CFLAGS under local make.conf

It looks like this is the most recent version of the upstream distfile. Maybe
it'll build with any earlier GCC version?

I'll attach my build log for  openal-soft-1.21.1_3 under local configuration.
For ports builds, I'm using some custom on-site configuration with files
referenced originally from /etc/make.conf together with a local
/usr/ports/Makefile.inc for facilitating some parts of the build configuration 
- e.g toolchain configuration with conditional selection of clang, gcc,
bintuls, and nasm for specific ports, also some local hacks for ccache
integration in the build (local wrapper scripts, toolchaini symlinks under
BINARY_LINKDIR, etc). Perhaps this may help to explain the verbose output in my
build log.

The build log will be trimmed of my local annotations on make.conf, and will
not include these additional files. I could clean those up and attach, if it
could be of any interest.

The build log is verbose, illustrating a lot of the toolchain configuration at
every stage of the build when building under poudriere

For the present thing, I'll try building this with an earlier GCC version,
maybe gcc10 will work out?

-- 
You are receiving this mail because:
You are the assignee for the bug.