Bug 235603

Summary: audio/openal-soft fails to build with linker error on 12/stable poudriere
Product: Ports & Packages Reporter: Robert Cina <transitive>
Component: Individual Port(s)Assignee: Tobias Kortkamp <tobik>
Status: Closed FIXED    
Severity: Affects Only Me CC: ohartmann, toolchain, w.schwarzenfeld
Priority: --- Keywords: regression
Version: LatestFlags: tobik: maintainer-feedback+
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
audio/openal-soft poudriere log
none
openal-soft.diff tobik: maintainer-approval+

Description Robert Cina 2019-02-08 16:03:13 UTC
Created attachment 201843 [details]
audio/openal-soft poudriere log

The port audio/openal-soft fails to build using poudriere with a linker error on 12/stable.

The following shows the error:


CMakeFiles/OpenAL.dir/Alc/ambdec.c.o CMakeFiles/OpenAL.dir/Alc/bformatdec.c.o CMakeFiles/OpenAL.dir/Alc/panning.c.o CMakeFiles/OpenAL.dir/Alc/mixvoice.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_c.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse2.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse3.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse41.c.o CMakeFiles/OpenAL.dir/Alc/backends/base.c.o CMakeFiles/OpenAL.dir/Alc/backends/loopback.c.o CMakeFiles/OpenAL.dir/Alc/backends/null.c.o CMakeFiles/OpenAL.dir/Alc/backends/oss.c.o CMakeFiles/OpenAL.dir/Alc/backends/wave.c.o  -pthread libcommon.a -lrt -lpthread -lm && :
FAILED: libopenal.so.1.19.1 
: && /usr/local/libexec/ccache/cc -fPIC -std=c11 -O2 -pipe  -fstack-protector -fno-strict-aliasing -O2 -pipe  -fstack-protector -fno-strict-aliasing  -Wl,--as-needed -fstack-protector -fuse-ld=bfd -shared -Wl,-soname,libopenal.so.1 -o libopenal.so.1.19.1 CMakeFiles/OpenAL.dir/OpenAL32/alAuxEffectSlot.c.o CMakeFiles/OpenAL.dir/OpenAL32/alBuffer.c.o CMakeFiles/OpenAL.dir/OpenAL32/alEffect.c.o CMakeFiles/OpenAL.dir/OpenAL32/alError.c.o CMakeFiles/OpenAL.dir/OpenAL32/alExtension.c.o CMakeFiles/OpenAL.dir/OpenAL32/alFilter.c.o CMakeFiles/OpenAL.dir/OpenAL32/alListener.c.o CMakeFiles/OpenAL.dir/OpenAL32/alSource.c.o CMakeFiles/OpenAL.dir/OpenAL32/alState.c.o CMakeFiles/OpenAL.dir/OpenAL32/event.c.o CMakeFiles/OpenAL.dir/OpenAL32/sample_cvt.c.o CMakeFiles/OpenAL.dir/Alc/ALc.c.o CMakeFiles/OpenAL.dir/Alc/ALu.c.o CMakeFiles/OpenAL.dir/Alc/alconfig.c.o CMakeFiles/OpenAL.dir/Alc/bs2b.c.o CMakeFiles/OpenAL.dir/Alc/converter.c.o CMakeFiles/OpenAL.dir/Alc/mastering.c.o CMakeFiles/OpenAL.dir/Alc/ringbuffer.c.o CMakeFiles/OpenAL.dir/Alc/effects/autowah.c.o CMakeFiles/OpenAL.dir/Alc/effects/chorus.c.o CMakeFiles/OpenAL.dir/Alc/effects/compressor.c.o CMakeFiles/OpenAL.dir/Alc/effects/dedicated.c.o CMakeFiles/OpenAL.dir/Alc/effects/distortion.c.o CMakeFiles/OpenAL.dir/Alc/effects/echo.c.o CMakeFiles/OpenAL.dir/Alc/effects/equalizer.c.o CMakeFiles/OpenAL.dir/Alc/effects/fshifter.c.o CMakeFiles/OpenAL.dir/Alc/effects/modulator.c.o CMakeFiles/OpenAL.dir/Alc/effects/null.c.o CMakeFiles/OpenAL.dir/Alc/effects/pshifter.c.o CMakeFiles/OpenAL.dir/Alc/effects/reverb.c.o CMakeFiles/OpenAL.dir/Alc/filters/filter.c.o CMakeFiles/OpenAL.dir/Alc/filters/nfc.c.o CMakeFiles/OpenAL.dir/Alc/filters/splitter.c.o CMakeFiles/OpenAL.dir/Alc/helpers.c.o CMakeFiles/OpenAL.dir/Alc/hrtf.c.o CMakeFiles/OpenAL.dir/Alc/uhjfilter.c.o CMakeFiles/OpenAL.dir/Alc/ambdec.c.o CMakeFiles/OpenAL.dir/Alc/bformatdec.c.o CMakeFiles/OpenAL.dir/Alc/panning.c.o CMakeFiles/OpenAL.dir/Alc/mixvoice.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_c.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse2.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse3.c.o CMakeFiles/OpenAL.dir/Alc/mixer/mixer_sse41.c.o CMakeFiles/OpenAL.dir/Alc/backends/base.c.o CMakeFiles/OpenAL.dir/Alc/backends/loopback.c.o CMakeFiles/OpenAL.dir/Alc/backends/null.c.o CMakeFiles/OpenAL.dir/Alc/backends/oss.c.o CMakeFiles/OpenAL.dir/Alc/backends/wave.c.o  -pthread libcommon.a -lrt -lpthread -lm && :
/usr/local/bin/ld.bfd: CMakeFiles/OpenAL.dir/OpenAL32/alExtension.c.o: relocation R_X86_64_PC32 against protected symbol `alcGetProcAddress' can not be used when making a shared object
/usr/local/bin/ld.bfd: final link failed: bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
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: stopped in /usr/ports/audio/openal-soft
=>> Cleaning up wrkdir
===>  Cleaning for openal-soft-1.19.1_1
build of audio/openal-soft | openal-soft-1.19.1_1 ended at Fri Feb  8 09:07:44 EST 2019
build time: 00:01:15
Comment 1 Tobias Kortkamp freebsd_committer 2019-02-08 22:26:59 UTC
Created attachment 201856 [details]
openal-soft.diff

I can reproduce it with the latest 12.0-STABLE snapshot (not with
12.0-RELEASE), but no idea why it doesn't work all of a sudden.

Anyway here's a patch to force it to use ld.gold as a workaround
for now.
Comment 2 Robert Cina 2019-02-10 13:37:17 UTC
Thanks for the patch. The openal-soft port builds for me now. Really appreciated.
Comment 3 Tobias Kortkamp freebsd_committer 2019-02-12 10:27:36 UTC
*** Bug 235688 has been marked as a duplicate of this bug. ***
Comment 4 commit-hook freebsd_committer 2019-02-12 10:39:57 UTC
A commit references this bug:

Author: tobik
Date: Tue Feb 12 10:39:40 UTC 2019
New revision: 492771
URL: https://svnweb.freebsd.org/changeset/ports/492771

Log:
  audio/openal-soft: Use ld.gold instead of ld.bfd

  openal-soft has stopped linking on 12-STABLE with ld.bfd.  As a
  workaround use ld.gold for now until we can discover why that happens
  all of a sudden.

  PR:		235603
  Reported by:	Robert Cina <transitive@gmail.com>

Changes:
  head/audio/openal-soft/Makefile
Comment 5 Tobias Kortkamp freebsd_committer 2019-02-27 05:05:26 UTC
I can no longer reproduce this with the latest 12-STABLE snapshot (after
reverting the workaround from ports r492771).  Not sure what the problem
was but it seems to be gone.  I'll leave the workaround in place for now.
Comment 6 O. Hartmann 2019-02-27 17:20:03 UTC
Same here (recent 12-STABLE after LLVM 7):

Poudriere version: 3.3.0
Host OSVERSION: 1300013
Jail OSVERSION: 1200503