Bug 242307 - audio/openal-soft fails to build on 12.1 i386
Summary: audio/openal-soft fails to build on 12.1 i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Some People
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-29 23:48 UTC by Vladimir Druzenko
Modified: 2019-11-30 08:02 UTC (History)
0 users

See Also:
tobik: maintainer-feedback+


Attachments
openal-soft.diff (387 bytes, patch)
2019-11-29 23:51 UTC, Tobias Kortkamp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2019-11-29 23:48:41 UTC
Part of build log:

[75/78] /usr/local/bin/cmake -E cmake_symlink_library libopenal.so.1.20.0  libopenal.so.1 libopenal.so && :
[76/78] : && /usr/local/bin/cmake -E remove libex-common.a && /usr/bin/ar qc libex-common.a  CMakeFiles/ex-common.dir/examples/common/alhelpers.c.o && /usr/bin/ranlib libex-common.a && :
[77/78] : && /usr/bin/cc -O2 -pipe -march=prescott  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -march=prescott  -fstack-protector-strong -fno-strict-aliasing  -Wl,--as-needed -fstack-protector-strong CMakeFiles/altonegen.dir/examples/altonegen.c.o  -o altonegen  -Wl,-rpath,/usr/obj/usr/ports/audio/openal-soft/work/.build: -pthread -lm libex-common.a libopenal.so.1.20.0 -lrt && :
FAILED: altonegen 
: && /usr/bin/cc -O2 -pipe -march=prescott  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -march=prescott  -fstack-protector-strong -fno-strict-aliasing  -Wl,--as-needed -fstack-protector-strong CMakeFiles/altonegen.dir/examples/altonegen.c.o  -o altonegen  -Wl,-rpath,/usr/obj/usr/ports/audio/openal-soft/work/.build: -pthread -lm libex-common.a libopenal.so.1.20.0 -lrt && :
ld: error: cannot preempt symbol: alIsExtensionPresent
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alcGetCurrentContext
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alcGetContextsDevice
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alcGetIntegerv
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alcGetError
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGenBuffers
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alBufferData
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGetError
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGetString
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alIsBuffer
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alDeleteBuffers
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGenSources
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alSourcei
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGetError
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alSourcei
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alSourcePlay
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGetSourcei
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGetSourcei
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alSourcei
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: cannot preempt symbol: alGetError
>>> defined in libopenal.so.1.20.0
>>> referenced by altonegen.c
>>>               CMakeFiles/altonegen.dir/examples/altonegen.c.o:(main)

ld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
*** Error code 1

But build fine with USE_GCC=yes (lang/gcc9) in audio/openal-soft/Makefile.
And on 12.1 amd64 with clang from base.
Comment 1 Tobias Kortkamp freebsd_committer freebsd_triage 2019-11-29 23:51:07 UTC
Created attachment 209539 [details]
openal-soft.diff

Try with this patch then.  Maybe I was overly optimistic.
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-11-30 01:42:22 UTC
A commit references this bug:

Author: tobik
Date: Sat Nov 30 01:42:01 UTC 2019
New revision: 518688
URL: https://svnweb.freebsd.org/changeset/ports/518688

Log:
  audio/openal-soft: Keep full LLD_UNSAFE for now

  lld on i386 on 12.1 and up still does not link openal-soft.

  PR:		242307

Changes:
  head/audio/openal-soft/Makefile
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2019-11-30 03:10:03 UTC
(In reply to commit-hook from comment #2)
Thanks! Build without errors on i386 now!

But why not something like this:
.if ${ARCH} == "i386"
	LLD_UNSAFE=     yes
.endif

Or this:
.if ${ARCH} != "amd64"
	LLD_UNSAFE=     yes
.endif
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-11-30 08:01:46 UTC
A commit references this bug:

Author: tobik
Date: Sat Nov 30 08:00:48 UTC 2019
New revision: 518709
URL: https://svnweb.freebsd.org/changeset/ports/518709

Log:
  audio/openal-soft: Limit LLD_UNSAFE to FreeBSD 12.0 again

  We can unbreak the build with lld on i386 on FreeBSD > 12.0 by
  passing -Wl,-z,notext to the linker.  It should not make any
  difference on older releases.

  PR:		242307
  Tested by:	jbeich

Changes:
  head/audio/openal-soft/Makefile