Bug 219718 - audio/freealut: linker error: cannot preempt symbol
Summary: audio/freealut: linker error: cannot preempt symbol
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Oliver Lehmann
URL:
Keywords:
Depends on:
Blocks: 219089
  Show dependency treegraph
 
Reported: 2017-06-02 06:32 UTC by O. Hartmann
Modified: 2017-09-22 18:34 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (oliver)


Attachments
audio/freealut: set LLD_UNSAFE (1.18 KB, patch)
2017-08-22 20:14 UTC, Ed Maste
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2017-06-02 06:32:23 UTC
On 12-CURRENT (FreeBSD 12.0-CURRENT #5 r319215: Tue May 30 16:44:52 CEST 2017 amd64, WITH_LLD_IS_LD=yes), rebuilding/updating/compiling port audio/freealut fails due to the error shown below. This error is due to the fact port audio/openal-soft, which fails with LLVM 4.0.0 lld (PR 219089):

[...]
cc -fvisibility=hidden -Wall -ansi -pedantic -O2 -pipe -O3 -fstack-protector -fno-strict-aliasing -fstack-protector -o .libs/hello_world hello_world.o  -lopenal -lpthread -L/usr/local/lib ../src/.libs/libalut.so -lm -Wl,--rpath -Wl,/usr/local/lib
cc: warning: argument unused during compilation: '-ansi' [-Wunused-command-line-argument]
cc -fvisibility=hidden -Wall -ansi -pedantic -O2 -pipe -O3 -fstack-protector -fno-strict-aliasing -fstack-protector -o .libs/playfile playfile.o  -lopenal -lpthread -L/usr/local/lib ../src/.libs/libalut.so -lm -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/ld: error: hello_world.c:(function main): cannot preempt symbol 'alGenSources' defined in /usr/local/lib/libopenal.so
/usr/bin/ld: error: hello_world.c:(function main): cannot preempt symbol 'alSourcei' defined in /usr/local/lib/libopenal.so
/usr/bin/ld: error: hello_world.c:(function main): cannot preempt symbol 'alSourcePlay' defined in /usr/local/lib/libopenal.so
cc: warning: argument unused during compilation: '-ansi' [-Wunused-command-line-argument]
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:238: hello_world] Error 1
gmake[3]: *** Waiting for unfinished jobs....
/usr/bin/ld: error: playfile.c:(function main): cannot preempt symbol 'alGenSources' defined in /usr/local/lib/libopenal.so
/usr/bin/ld: error: playfile.c:(function main): cannot preempt symbol 'alSourcei' defined in /usr/local/lib/libopenal.so
/usr/bin/ld: error: playfile.c:(function main): cannot preempt symbol 'alSourcePlay' defined in /usr/local/lib/libopenal.so
/usr/bin/ld: error: playfile.c:(function main): cannot preempt symbol 'alGetError' defined in /usr/local/lib/libopenal.so
/usr/bin/ld: error: playfile.c:(function main): cannot preempt symbol 'alGetSourcei' defined in /usr/local/lib/libopenal.so
/usr/bin/ld: error: playfile.c:(function main): cannot preempt symbol 'alGetString' defined in /usr/local/lib/libopenal.so
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [Makefile:241: playfile] Error 1
Comment 1 Ed Maste freebsd_committer 2017-08-22 20:14:10 UTC
confirmed with lld 5.0.0 on FreeBSD-current

/usr/bin/ld: error: cannot preempt symbol: alGenSources
>>> defined in /usr/local/lib/libopenal.so
>>> referenced by hello_world.c
>>>               hello_world.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alSourcei
>>> defined in /usr/local/lib/libopenal.so
>>> referenced by hello_world.c
>>>               hello_world.o:(main)

/usr/bin/ld: error: cannot preempt symbol: alSourcePlay
>>> defined in /usr/local/lib/libopenal.so
>>> referenced by hello_world.c
>>>               hello_world.o:(main)
Comment 2 Ed Maste freebsd_committer 2017-08-22 20:14:44 UTC
Created attachment 185677 [details]
audio/freealut: set LLD_UNSAFE
Comment 3 commit-hook freebsd_committer 2017-09-22 18:32:08 UTC
A commit references this bug:

Author: oliver
Date: Fri Sep 22 18:31:57 UTC 2017
New revision: 450397
URL: https://svnweb.freebsd.org/changeset/ports/450397

Log:
  add LLD_UNSAFE for preemption of audio/openal-soft libs

  PR:		219718
  Submitted by:	emaste
  Reported by:	O. Hartmann

Changes:
  head/audio/freealut/Makefile
Comment 4 Oliver Lehmann freebsd_committer 2017-09-22 18:34:08 UTC
Fixed - Thanks for your submission