Bug 226980 - openal-using ports fail to link when lld is the system linker
Summary: openal-using ports fail to link when lld is the system linker
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Ed Maste
URL:
Keywords: toolchain
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2018-03-27 13:54 UTC by Ed Maste
Modified: 2020-06-09 18:26 UTC (History)
7 users (show)

See Also:


Attachments
Proposed patch for games/diaspora (since 461433 revision) (364 bytes, patch)
2018-03-27 22:08 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/assaultcube (since 449527 revision) (384 bytes, patch)
2018-03-27 22:28 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/diaspora (since 461433 revision) (366 bytes, patch)
2018-03-27 23:55 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/assaultcube (since 449527 revision) (3.30 KB, patch)
2018-03-27 23:57 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/diaspora (since 461433 revision) (341 bytes, patch)
2018-03-29 20:17 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/assaultcube (since 449527 revision) (3.27 KB, patch)
2018-03-29 20:18 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/diaspora (since 461433 revision) (323 bytes, patch)
2018-03-29 20:32 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/assaultcube (since 449527 revision) (3.29 KB, patch)
2018-03-29 20:33 UTC, lightside
no flags Details | Diff
Proposed patch for games/assaultcube (since 449527 revision) (767 bytes, patch)
2018-04-05 16:53 UTC, lightside
lightside: maintainer-approval+
Details | Diff
Proposed patch for games/assaultcube (since 449527 revision) (788 bytes, patch)
2018-04-06 04:17 UTC, lightside
no flags Details | Diff
Proposed patch for emulators/wine and emulators/wine-devel (1.25 KB, patch)
2018-08-26 17:35 UTC, Nick Wolff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2018-03-27 13:54:49 UTC
Tracking bug for many failures in ports using openal when lld is the system linker

*** Configure failures:

games/diaspora
games/retroarch
games/allacrost


Sample output:
checking for OpenAL... no
*** Could not run OpenAL test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding OpenAL or finding the wrong
*** version of OpenAL. If it is not finding OpenAL, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location  Also, make sure you have run ldconfig if that
*** is required on your system

Logs
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/diaspora-1.1.1_1.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/RetroArch-1.3.6_9.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/allacrost-1.0.2_21.log



*** Link failures - protected symbol preemption:

games/chromium-bsu
games/el
games/freedoko
games/openclonk
games/stuntrally
games/supertux2
games/scorched3d
games/spring
games/openastromenace
games/megaglest
games/linwarrior
games/keeperrl
games/blackshadeselite
games/assaultcube
emulators/dolphin-emu
games/flightgear
games/excido


Sample output:
/usr/bin/ld: error: cannot preempt symbol: alcOpenDevice
>>> defined in /usr/local/lib/libopenal.so
>>> referenced by AudioOpenAL.cpp
>>>               chromium_bsu-AudioOpenAL.o:(AudioOpenAL::AudioOpenAL())

/usr/bin/ld: error: cannot preempt symbol: alcCreateContext
>>> defined in /usr/local/lib/libopenal.so
>>> referenced by AudioOpenAL.cpp
>>>               chromium_bsu-AudioOpenAL.o:(AudioOpenAL::AudioOpenAL())



Logs:
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/chromium-bsu-0.9.16.1_1.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/el-1.9.4.3_2,1.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/freedoko-0.7.16.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/openclonk-8.0.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/stuntrally-2.6_3.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/supertux2-0.4.0_11.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/scorched3d-0.43.3d_11.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/spring-98.0_10.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/openastromenace-1.3.2_4.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/megaglest-3.13.0_4.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/linwarrior-20100320_5.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/keeperrl-0.0.23_1.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/blackshadeselite-0.0.1_10.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/assaultcube-1.2.0.2_6.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/dolphin-emu-5.0_17.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/flightgear-2017.3.1_3.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/excido-0.1.5c_16.log
Comment 1 Ed Maste freebsd_committer freebsd_triage 2018-03-27 15:17:02 UTC
Additional cases:

devel/love07
devel/love08

---
checking for library containing alSourcePlay... no
configure: error: Can't LÖVE without OpenAL
===>  Script "configure" failed unexpectedly.
---

http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/love07-0.7.2_16.log
http://package18.nyi.freebsd.org/data/headamd64PR214864-default/2018-03-21_17h43m11s/logs/errors/love08-0.8.0_10.log
Comment 2 Ed Maste freebsd_committer freebsd_triage 2018-03-27 21:27:09 UTC
Via tobik@ in ports r465725, BINARY_ALIAS=ld=ld.bfd may be an effective workaround if LLD_UNSAFE does not work.
Comment 3 lightside 2018-03-27 22:08:28 UTC
Created attachment 191886 [details]
Proposed patch for games/diaspora (since 461433 revision)

(In reply to Ed Maste from comment #2)
> Via tobik@ in ports r465725, BINARY_ALIAS=ld=ld.bfd may be an effective
> workaround if LLD_UNSAFE does not work.
Thanks for the workaround.

The games/disapora builds ok with "BINARY_ALIAS=ld=ld.bfd" on FreeBSD 10.3 amd64.
I can't test this for other cases, when lld enabled as system linker. Please test this before commit.
Comment 4 lightside 2018-03-27 22:09:29 UTC
(In reply to comment #3)
> games/disapora
games/diaspora
Comment 5 lightside 2018-03-27 22:28:22 UTC
Created attachment 191887 [details]
Proposed patch for games/assaultcube (since 449527 revision)

(In reply to comment #3)
Please test this for games/assaultcube also.
Comment 6 Ed Maste freebsd_committer freebsd_triage 2018-03-27 23:07:56 UTC
Antoine raised an important point - for arm64 we need LLD_UNSAFE=yes in addition to BINARY_ALIAS=ld=ld.bfd, as arm64 has no /usr/bin/ld.bfd by default and LLD_UNSAFE=yes automatically depends on the binutils port in that case.
Comment 7 lightside 2018-03-27 23:55:35 UTC
Created attachment 191888 [details]
Proposed patch for games/diaspora (since 461433 revision)

(In reply to Ed Maste from comment #6)
Ok, added LLD_UNSAFE=yes.
Comment 8 lightside 2018-03-27 23:57:18 UTC
Created attachment 191889 [details]
Proposed patch for games/assaultcube (since 449527 revision)

Also possible to modernize games/assaultcube port, by the way.
Comment 9 lightside 2018-03-29 20:17:16 UTC
Created attachment 191952 [details]
Proposed patch for games/diaspora (since 461433 revision)

Looks like, "BINARY_ALIAS+=ld=${LD}" was added to Mk/bsd.port.mk in ports r465900.
Comment 10 lightside 2018-03-29 20:18:00 UTC
Created attachment 191953 [details]
Proposed patch for games/assaultcube (since 449527 revision)
Comment 11 Ed Maste freebsd_committer freebsd_triage 2018-03-29 20:20:19 UTC
I'd probably attach LLD_UNSAFE=yes to the USES etc. block. I'm building disapora with the patch now for testing.
Comment 12 lightside 2018-03-29 20:32:22 UTC
Created attachment 191955 [details]
Proposed patch for games/diaspora (since 461433 revision)

(In reply to Ed Maste from comment #11)
> I'd probably attach LLD_UNSAFE=yes to the USES etc. block.
Ok.
Comment 13 lightside 2018-03-29 20:33:00 UTC
Created attachment 191956 [details]
Proposed patch for games/assaultcube (since 449527 revision)
Comment 14 Ed Maste freebsd_committer freebsd_triage 2018-03-29 20:47:34 UTC
diaspora builds with the patch
Comment 15 commit-hook freebsd_committer freebsd_triage 2018-03-31 16:24:07 UTC
A commit references this bug:

Author: martymac
Date: Sat Mar 31 16:23:14 UTC 2018
New revision: 466062
URL: https://svnweb.freebsd.org/changeset/ports/466062

Log:
  emulators/dolphin-emu: set LLD_UNSAFE

  Prevent Dolphin from linking using lld as it fails with errors like:

  /usr/bin/ld: error: cannot preempt symbol: alcOpenDevice
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by OpenALStream.cpp
  >>>               OpenALStream.cpp.o:(OpenALStream::Start())

  due to preemption of symbols with protected visibility in a shared object.

  See also PR #219089 for more details.

  PR:		226980
  Submitted by:	emaste

Changes:
  head/emulators/dolphin-emu/Makefile
Comment 16 commit-hook freebsd_committer freebsd_triage 2018-03-31 16:27:12 UTC
A commit references this bug:

Author: martymac
Date: Sat Mar 31 16:26:49 UTC 2018
New revision: 466063
URL: https://svnweb.freebsd.org/changeset/ports/466063

Log:
  games/flightgear: set LLD_UNSAFE

  Prevent Flightgear from linking using lld as it fails with errors like:

  /usr/bin/ld: error: cannot preempt symbol: alcGetIntegerv
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by audio_openal.c
  >>>               audio_openal.c.o:(openal_input)

  due to preemption of symbols with protected visibility in a shared object.

  See also PR #219089 for more details.

  PR:		226980
  Submitted by:	emaste

Changes:
  head/games/flightgear/Makefile
Comment 17 Ganael LAPLANCHE freebsd_committer freebsd_triage 2018-03-31 16:29:36 UTC
Fixed for Flightgear and Dolphin, thanks Ed!
Comment 18 lightside 2018-03-31 18:32:30 UTC
(In reply to Ed Maste from comment #14)
> diaspora builds with the patch
Thanks for testing.
Please commit, when testing for games/assaultcube will be done or when you find this suitable.
Comment 19 commit-hook freebsd_committer freebsd_triage 2018-04-01 07:31:12 UTC
A commit references this bug:

Author: krion
Date: Sun Apr  1 07:30:42 UTC 2018
New revision: 466124
URL: https://svnweb.freebsd.org/changeset/ports/466124

Log:
  Switch to ld.bfd by default as ld.ldd doesn't have built-in default
  output target.

  PR:		226980
  Submitted by:	emaste
  Approved by:	portmgr (LLD_UNSAFE blanket)

Changes:
  head/games/diaspora/Makefile
  head/games/retroarch/Makefile
Comment 20 Kirill Ponomarev freebsd_committer freebsd_triage 2018-04-01 08:08:17 UTC
All ports failing with openal as dependencies have direct -lopenal invocation by "pkg-config --libs openal"
Comment 21 commit-hook freebsd_committer freebsd_triage 2018-04-01 09:22:42 UTC
A commit references this bug:

Author: krion
Date: Sun Apr  1 09:21:49 UTC 2018
New revision: 466135
URL: https://svnweb.freebsd.org/changeset/ports/466135

Log:
  Switch to ld.bfd by default as ld.ldd doesn't have built-in default
  output target.

  PR:		226980
  Submitted by:	emaste
  Approved by:	portmgr (LLD_UNSAFE blanket)

Changes:
  head/games/spring/Makefile
Comment 22 commit-hook freebsd_committer freebsd_triage 2018-04-01 09:39:58 UTC
A commit references this bug:

Author: krion
Date: Sun Apr  1 09:39:52 UTC 2018
New revision: 466137
URL: https://svnweb.freebsd.org/changeset/ports/466137

Log:
  Switch to ld.bfd by default as ld.ldd doesn't have built-in default
  output target.

  PR:		226980
  Submitted by:	emaste
  Approved by:	portmgr (LLD_UNSAFE blanket)

Changes:
  head/games/keeperrl/Makefile
Comment 23 Kirill Ponomarev freebsd_committer freebsd_triage 2018-04-01 10:04:19 UTC
Please note, games/assaultcube still fails with proposed patch from maintainer:

https://krion.cc/data/head-amd64-default/2018-04-01_12h02m47s/logs/errors/assaultcube-1.2.0.2_6.log
Comment 24 Kubilay Kocak freebsd_committer freebsd_triage 2018-04-01 11:13:18 UTC
Since multiple committers are resolving referencing this PR, assign it to the reporter, who is a committer, as a/the 'coordinating/cajoling' assignee.
Comment 25 commit-hook freebsd_committer freebsd_triage 2018-04-01 11:16:19 UTC
A commit references this bug:

Author: krion
Date: Sun Apr  1 11:15:44 UTC 2018
New revision: 466141
URL: https://svnweb.freebsd.org/changeset/ports/466141

Log:
  Switch to ld.bfd by default as ld.ldd doesn't have built-in default
  output target.

  PR:		226980
  Submitted by:	emaste
  Approved by:	portmgr (LLD_UNSAFE blanket)

Changes:
  head/games/megaglest/Makefile
Comment 26 lightside 2018-04-01 19:48:11 UTC
(In reply to Kirill Ponomarev from comment #23)
> Please note, games/assaultcube still fails with proposed patch from maintainer
Ok, my proposed patches were removed.

I proposed patch to modernize games/assaultcube in separate PR (bug 227190).
Comment 27 Ed Maste freebsd_committer freebsd_triage 2018-04-02 15:18:16 UTC
Remaining ports:

games/allacrost
games/chromium-bsu
games/el
games/freedoko *
games/openclonk
games/stuntrally
games/supertux2 *
games/scorched3d *
games/openastromenace
games/linwarrior
games/blackshadeselite
games/assaultcube
games/excido *
devel/love07
devel/love08

For reference all result in 0 skipped dependent ports except devel/love07 (which skips games/gunfudeadlands). Unmaintained ports are marked with *.
Comment 28 commit-hook freebsd_committer freebsd_triage 2018-04-02 16:11:25 UTC
A commit references this bug:

Author: krion
Date: Mon Apr  2 16:11:12 UTC 2018
New revision: 466233
URL: https://svnweb.freebsd.org/changeset/ports/466233

Log:
  Switch to ld.bfd by default as ld.ldd doesn't have built-in default
  output target.

  PR:		226980
  Submitted by:	emaste
  Approved by:	portmgr (LLD_UNSAFE blanket)

Changes:
  head/games/supertux2/Makefile
Comment 29 commit-hook freebsd_committer freebsd_triage 2018-04-05 14:00:59 UTC
A commit references this bug:

Author: emaste
Date: Thu Apr  5 14:00:36 UTC 2018
New revision: 466559
URL: https://svnweb.freebsd.org/changeset/ports/466559

Log:
  devel/love07: fix build when lld is the system linker

  Ports that use openal (such as this one) fail to link with lld as the
  system linker due to disagreement in the handling of preemption of
  protected visibility symbols in shared objects.

  In the case of devel/love07 detected at configure time as:
  configure: error: Can't L?VE without OpenAL

  PR:		226980
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/devel/love07/Makefile
Comment 30 commit-hook freebsd_committer freebsd_triage 2018-04-05 14:05:05 UTC
A commit references this bug:

Author: emaste
Date: Thu Apr  5 14:04:54 UTC 2018
New revision: 466560
URL: https://svnweb.freebsd.org/changeset/ports/466560

Log:
  devel/love08: fix build when lld is the system linker

  Ports that use openal (such as this one) fail to link with lld as the
  system linker due to disagreement in the handling of preemption of
  protected visibility symbols in shared objects.

  In the case of devel/love08 detected at configure time as:
  configure: error: Can't L?VE without OpenAL

  PR:		226980
  Approved by:	portmgr (LLD_UNSAFE blanket)
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/devel/love08/Makefile
Comment 31 lightside 2018-04-05 16:53:09 UTC
Created attachment 192249 [details]
Proposed patch for games/assaultcube (since 449527 revision)

Attached new patch to test for games/assaultcube.

The LLD_UNSAFE=yes may add -fuse-ld=bfd to LDFLAGS value in Mk/bsd.port.mk. Therefore, possible to use LDFLAGS value on linking stage.
Comment 32 commit-hook freebsd_committer freebsd_triage 2018-04-06 01:36:19 UTC
A commit references this bug:

Author: emaste
Date: Fri Apr  6 01:36:08 UTC 2018
New revision: 466607
URL: https://svnweb.freebsd.org/changeset/ports/466607

Log:
  games/allacrost: fix build when lld is the system linker

  Ports that use openal (such as this one) fail to link with lld as the
  system linker due to disagreement in the handling of preemption of
  protected visibility symbols in shared objects.

  In the case of games/allacrost, failed at configure time:

  checking for alGetError in -lopenal... no
  You need to install the OpenAL library.
  ===>  Script "configure" failed unexpectedly.

  PR:		226980
  Approved by:	portmgr (LLD_UNSAFE blanket)
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/games/allacrost/Makefile
Comment 33 commit-hook freebsd_committer freebsd_triage 2018-04-06 01:59:40 UTC
A commit references this bug:

Author: emaste
Date: Fri Apr  6 01:58:49 UTC 2018
New revision: 466608
URL: https://svnweb.freebsd.org/changeset/ports/466608

Log:
  games/el: fix build when lld is the system linker

  Ports that use openal (such as this one) fail to link with lld as the
  system linker due to disagreement in the handling of preemption of
  protected visibility symbols in shared objects.

  PR:		226980
  Approved by:	portmgr (LLD_UNSAFE blanket)
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/games/el/Makefile
Comment 34 commit-hook freebsd_committer freebsd_triage 2018-04-06 02:01:44 UTC
A commit references this bug:

Author: emaste
Date: Fri Apr  6 02:01:01 UTC 2018
New revision: 466609
URL: https://svnweb.freebsd.org/changeset/ports/466609

Log:
  games/scorched3d: fix build when lld is the system linker

  Ports that use openal (such as this one) fail to link with lld as the
  system linker due to disagreement in the handling of preemption of
  protected visibility symbols in shared objects.

  PR:		226980
  Approved by:	portmgr (LLD_UNSAFE blanket)
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/games/scorched3d/Makefile
Comment 35 Ed Maste freebsd_committer freebsd_triage 2018-04-06 02:17:30 UTC
with the attached patch (id 192249) games/assaultcube builds and runs with lld as /usr/bin/ld.

These ports still fail with LLD_UNSAFE added to Makefile because they do not honour LD / -fuse-ld=bfd / BINARY_ALIAS:

games/chromium-bsu
games/freedoko
games/linwarrior
games/blackshadeselite
games/excido

These ports still fail with LLD_UNSAFE for other reasons:

games/openclonk
games/stuntrally
Comment 36 commit-hook freebsd_committer freebsd_triage 2018-04-06 02:18:00 UTC
A commit references this bug:

Author: emaste
Date: Fri Apr  6 02:17:03 UTC 2018
New revision: 466610
URL: https://svnweb.freebsd.org/changeset/ports/466610

Log:
  games/openastromenace: fix build when lld is the system linker

  Ports that use openal (such as this one) fail to link with lld as the
  system linker due to disagreement in the handling of preemption of
  protected visibility symbols in shared objects.

  Set LLD_UNSAFE to fall back to ld.bfd for now.

  PR:		226980
  Approved by:	portmgr (LLD_UNSAFE blanket)
  Sponsored by:	The FreeBSD Foundation

Changes:
  head/games/openastromenace/Makefile
Comment 37 lightside 2018-04-06 04:17:02 UTC
Created attachment 192269 [details]
Proposed patch for games/assaultcube (since 449527 revision)

(In reply to Ed Maste from comment #35)
> with the attached patch (id 192249) games/assaultcube builds and runs with lld
> as /usr/bin/ld.
If I understood this correctly, the LLD_UNSAFE=yes is not required and sed patch for LDFLAGS is enough (e.g. -fstack-protector related from Mk/bsd.ssp.mk).

Attached new patch without LLD_UNSAFE=yes.
I think, possible to bump PORTREVISION for this case.
Comment 38 lightside 2018-04-06 04:41:23 UTC
Comment on attachment 192269 [details]
Proposed patch for games/assaultcube (since 449527 revision)

(In reply to comment #36)
> (e.g. -fstack-protector related from Mk/bsd.ssp.mk)
Probably, not a -fstack-protector related, because there are other -fstack-protector value on linking stage.
Comment 39 lightside 2018-04-06 04:42:55 UTC
Comment on attachment 192249 [details]
Proposed patch for games/assaultcube (since 449527 revision)

(In reply to comment #38)
Returned attachment #192249 [details], just in case.
Comment 40 Ed Maste freebsd_committer freebsd_triage 2018-04-06 12:15:47 UTC
(In reply to lightside from comment #37)
I tested the patch with LLD_UNSAFE=yes, and believe it is still needed.
Comment 41 lightside 2018-04-06 14:23:51 UTC
(In reply to Ed Maste from comment #40)
Yes, I returned attachment #192249 [details]. The PORTREVISION bump is not required.
Thanks for testing. Possible to commit it.
Comment 42 commit-hook freebsd_committer freebsd_triage 2018-04-06 18:33:37 UTC
A commit references this bug:

Author: ler
Date: Fri Apr  6 18:32:51 UTC 2018
New revision: 466683
URL: https://svnweb.freebsd.org/changeset/ports/466683

Log:
  games/assaultcube: LLD_UNSAFE additions

  PR:	226980
  Submitted by:	emaste
  Approved by:	ghtside@gmx.com	 (maintainer)

Changes:
  head/games/assaultcube/Makefile
Comment 43 lightside 2018-04-06 22:13:26 UTC
(In reply to comment #42)
Thanks for attention.
Comment 44 Ed Maste freebsd_committer freebsd_triage 2018-05-31 13:44:07 UTC
Remaining failures:

games/chromium-bsu
games/excido
games/freedoko
games/openclonk
games/springlobby
games/stuntrally
Comment 45 commit-hook freebsd_committer freebsd_triage 2018-07-20 11:16:29 UTC
A commit references this bug:

Author: tobik
Date: Fri Jul 20 11:16:02 UTC 2018
New revision: 475004
URL: https://svnweb.freebsd.org/changeset/ports/475004

Log:
  games/excido: Respect LDFLAGS and mark port as LLD_UNSAFE

  /usr/bin/ld: error: cannot preempt symbol: alListenerf
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by SoundCore.cpp
  >>>               src/SoundCore.o:(SoundCore::SoundCore())

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p474767_s336359/logs/excido-0.1.5c_16.log

  - While here fix USE_GL usage

  PR:		226980
  Reported by:	emaste, pkg-fallout

Changes:
  head/games/excido/Makefile
  head/games/excido/files/patch-Makefile
Comment 46 commit-hook freebsd_committer freebsd_triage 2018-07-20 11:23:38 UTC
A commit references this bug:

Author: tobik
Date: Fri Jul 20 11:23:19 UTC 2018
New revision: 475005
URL: https://svnweb.freebsd.org/changeset/ports/475005

Log:
  games/chromium-bsu: Respect LDFLAGS and let LLD_UNSAFE actually work

  /usr/bin/ld: error: cannot preempt symbol: alcOpenDevice
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by AudioOpenAL.cpp
  >>>               chromium_bsu-AudioOpenAL.o:(AudioOpenAL::AudioOpenAL())

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p474767_s336359/logs/chromium-bsu-0.9.16.1_1.log

  PR:		226980
  Reported by:	emaste, pkg-fallout

Changes:
  head/games/chromium-bsu/Makefile
Comment 47 commit-hook freebsd_committer freebsd_triage 2018-07-20 11:58:07 UTC
A commit references this bug:

Author: tobik
Date: Fri Jul 20 11:57:29 UTC 2018
New revision: 475007
URL: https://svnweb.freebsd.org/changeset/ports/475007

Log:
  Mark games/openclonk LLD_UNSAFE

  /usr/bin/ld: error: cannot preempt symbol: alGenSources
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by C4MusicFile.cpp
  >>>               CMakeFiles/openclonk.dir/src/platform/C4MusicFile.cpp.o:(C4MusicFileOgg::Play(bool, double))

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p474767_s336359/logs/openclonk-8.1.log

  Need to disable use of -flto too or the build would fail with

  /usr/bin/ld.bfd: unrecognized option '-plugin'

  PR:		226980
  Reported by:	emaste, pkg-fallout

Changes:
  head/games/openclonk/Makefile
  head/games/openclonk/files/patch-CMakeLists.txt
Comment 48 commit-hook freebsd_committer freebsd_triage 2018-07-20 12:18:26 UTC
A commit references this bug:

Author: tobik
Date: Fri Jul 20 12:17:32 UTC 2018
New revision: 475008
URL: https://svnweb.freebsd.org/changeset/ports/475008

Log:
  games/freedoko: Respect LDFLAGS and mark LLD_UNSAFE

  /usr/bin/ld: error: cannot preempt symbol: alDeleteSources
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by alut.cpp
  >>>               ./sound/alut.o:(Sound::Alut::~Alut())

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p474767_s336359/logs/freedoko-0.7.16.log

  PR:		226980
  Reported by:	emaste, pkg-fallout

Changes:
  head/games/freedoko/Makefile
  head/games/freedoko/files/
  head/games/freedoko/files/patch-Makefile
Comment 49 Tobias Kortkamp freebsd_committer freebsd_triage 2018-07-20 12:22:34 UTC
State after the current round of commits:

games/chromium-bsu	fixed in ports r473443 + ports r475005
games/excido		fixed in ports r475004
games/freedoko		fixed in ports r475008
games/openclonk		fixed in ports r475007
games/stuntrally	fixed in ports r473541

This just leaves games/springlobby.
Comment 50 commit-hook freebsd_committer freebsd_triage 2018-07-28 07:17:13 UTC
A commit references this bug:

Author: tobik
Date: Sat Jul 28 07:16:32 UTC 2018
New revision: 475503
URL: https://svnweb.freebsd.org/changeset/ports/475503

Log:
  games/ultimatestunts: Fix build with Clang 6 and lld

  gamerenderer.cpp:81:30: error: non-constant-expression cannot be narrowed from type 'double' to 'GLfloat' (aka 'float') in initializer list [-Wc++11-narrowing]
          GLfloat specular_color[] = {3.0*lightCol.x, 3.0*lightCol.y, 3.0*lightCol.z, 1.0};
                                      ^~~~~~~~~~~~~~

  http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475044_s336572/logs/ultimatestunts-0.7.7.1_4.log

  - Fix bad absolute symlink
  - Mark as LLD_UNSAFE because of audio/openal-soft dependency [1]

  PR:	226980 [1]

Changes:
  head/games/ultimatestunts/Makefile
Comment 51 commit-hook freebsd_committer freebsd_triage 2018-07-28 12:50:26 UTC
A commit references this bug:

Author: tobik
Date: Sat Jul 28 12:49:58 UTC 2018
New revision: 475551
URL: https://svnweb.freebsd.org/changeset/ports/475551

Log:
  games/opensurge: Cleanup port

  - Remove double alfont build dependency
  - Fold Makefile.svn_rev into Makefile
  - Move ICON_SIZES into the one place it is used
  - dumb-allegro is a static library having it as a run dependency
    makes no sense
  - Add missing lib dependencies on libalure and libpng
  - Remove pkg-message
  - Remove pkg-deinstall (Poudriere reports that the filesystem is clean after
    deinstallation and it is unclear how files would be even be created in
    ${DATADIR} without doing curious things like running opensurge as root)
  - Add USES=localbase and build with Clang
  - Fix bad absolute symlink
  - Mark LLD_UNSAFE because of the audio/openal-soft dependency [1]

  PR:	226980 [1]

Changes:
  head/games/opensurge/Makefile
  head/games/opensurge/Makefile.svn_rev
  head/games/opensurge/files/pkg-deinstall.in
  head/games/opensurge/files/pkg-message.in
Comment 52 commit-hook freebsd_committer freebsd_triage 2018-07-28 13:38:09 UTC
A commit references this bug:

Author: tobik
Date: Sat Jul 28 13:37:21 UTC 2018
New revision: 475572
URL: https://svnweb.freebsd.org/changeset/ports/475572

Log:
  games/lugaru builds fine with Clang

  - Add missing libGL dependency
  - Fix bad absolute symlink
  - Add LLD_UNSAFE because of the audio/openal-soft dependency [1]

  PR:		226980 [1]

Changes:
  head/games/lugaru/Makefile
Comment 53 Nick Wolff 2018-08-26 17:35:55 UTC
Created attachment 196575 [details]
Proposed patch for emulators/wine and emulators/wine-devel
Comment 54 Nick Wolff 2018-08-26 17:37:08 UTC
We also have ports with openal as a non-default option failing I've attached patch to fix this for emulators/wine and emulators/wine-devel.
Comment 55 lightside 2018-08-27 02:01:44 UTC
Comment on attachment 196575 [details]
Proposed patch for emulators/wine and emulators/wine-devel

I think, possible to use OPENAL_VARS variable, instead of ".if  ${PORT_OPTIONS:MOPENAL}" condition. For example:
OPENAL_VARS=	LLD_UNSAFE=yes

% make -C /usr/ports/emulators/wine OPENAL_VARS=LLD_UNSAFE=yes WITH=OPENAL -V LLD_UNSAFE
yes

See Mk/bsd.options.mk for details:
https://svnweb.freebsd.org/ports/head/Mk/bsd.options.mk?revision=463463&view=markup#l148

I also suggest to add maintainer-approval? request to attached patch for emulators/wine(-devel) maintainer. Therefore, gerald@ may check proposed patch also.
Comment 56 commit-hook freebsd_committer freebsd_triage 2018-09-02 11:43:09 UTC
A commit references this bug:

Author: tobik
Date: Sun Sep  2 11:42:21 UTC 2018
New revision: 478788
URL: https://svnweb.freebsd.org/changeset/ports/478788

Log:
  graphis/reallyslick: Fix build with Clang 6

  hyperspace.cpp:387:19: error: non-constant-expression cannot be narrowed from type 'double' to 'float' in initializer list [-Wc++11-narrowing]
          float diff[3] = {flarepos[0] - camPos[0], flarepos[1] - camPos[1], flarepos[2] - camPos[2]};
                           ^~~~~~~~~~~~~~~~~~~~~~~

  http://beefy11.nyi.freebsd.org/data/head-i386-default/p478276_s338342/logs/errors/reallyslick-0.9.1_20.log

  - Attempt build on arm* again; the error message is the same as on amd64/i386
  - Mark as LLD_UNSAFE when compiled with FREEALUT=on because of OpenAL [1]

  PR:		226980 [1]

Changes:
  head/graphics/reallyslick/Makefile
Comment 57 commit-hook freebsd_committer freebsd_triage 2018-10-23 15:33:13 UTC
A commit references this bug:

Author: tobik
Date: Tue Oct 23 15:32:24 UTC 2018
New revision: 482842
URL: https://svnweb.freebsd.org/changeset/ports/482842

Log:
  Mark games/naev as LLD_UNSAFE when OPENAL=on

  This fixes the build on 11.2 and 12.0.

  PR:		226980

Changes:
  head/games/naev/Makefile
Comment 58 commit-hook freebsd_committer freebsd_triage 2018-10-23 15:49:28 UTC
A commit references this bug:

Author: tobik
Date: Tue Oct 23 15:49:10 UTC 2018
New revision: 482844
URL: https://svnweb.freebsd.org/changeset/ports/482844

Log:
  MFH: r482842

  Mark games/naev as LLD_UNSAFE when OPENAL=on

  This fixes the build on 11.2 and 12.0.

  PR:		226980

  Approved by:	ports-secteam blanket

Changes:
_U  branches/2018Q4/
  branches/2018Q4/games/naev/Makefile
Comment 60 commit-hook freebsd_committer freebsd_triage 2019-03-20 06:24:05 UTC
A commit references this bug:

Author: tobik
Date: Wed Mar 20 06:23:39 UTC 2019
New revision: 496312
URL: https://svnweb.freebsd.org/changeset/ports/496312

Log:
  games/iortcw: Mark LLD_UNSAFE

  /usr/bin/ld: error: cannot preempt symbol: alcCaptureStop
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by snd_openal.c
  >>>               build/release-freebsd-amd64/client/snd_openal.o:(S_AL_StopCapture)

  PR:		226980
  Reported by:	pkg-fallout

Changes:
  head/games/iortcw/Makefile
Comment 61 commit-hook freebsd_committer freebsd_triage 2019-04-18 05:16:02 UTC
A commit references this bug:

Author: tobik
Date: Thu Apr 18 05:14:58 UTC 2019
New revision: 499231
URL: https://svnweb.freebsd.org/changeset/ports/499231

Log:
  graphics/magnum-examples: Mark LLD_UNSAFE and unbreak on FreeBSD 12.0/amd64

  /usr/bin/ld: error: cannot preempt symbol: alGenBuffers
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by AudioExample.cpp
  >>>               src/audio/CMakeFiles/magnum-audio.dir/AudioExample.cpp.o:(Magnum::Examples::AudioExample::AudioExample(Magnum::Platform::Sdl2Application::Arguments const&))

  http://beefy6.nyi.freebsd.org/data/120amd64-default/499067/logs/errors/magnum-examples-2019.01.log

  PR:		226980

Changes:
  head/graphics/magnum-examples/Makefile
Comment 62 commit-hook freebsd_committer freebsd_triage 2019-04-18 15:23:37 UTC
A commit references this bug:

Author: tobik
Date: Thu Apr 18 15:23:24 UTC 2019
New revision: 499274
URL: https://svnweb.freebsd.org/changeset/ports/499274

Log:
  MFH: r499231

  graphics/magnum-examples: Mark LLD_UNSAFE and unbreak on FreeBSD 12.0/amd64

  /usr/bin/ld: error: cannot preempt symbol: alGenBuffers
  >>> defined in /usr/local/lib/libopenal.so
  >>> referenced by AudioExample.cpp
  >>>               src/audio/CMakeFiles/magnum-audio.dir/AudioExample.cpp.o:(Magnum::Examples::AudioExample::AudioExample(Magnum::Platform::Sdl2Application::Arguments const&))

  http://beefy6.nyi.freebsd.org/data/120amd64-default/499067/logs/errors/magnum-examples-2019.01.log

  PR:		226980

  Approved by:	ports-secteam blanket

Changes:
_U  branches/2019Q2/
  branches/2019Q2/graphics/magnum-examples/Makefile
Comment 63 maskray 2019-05-22 02:26:35 UTC
Position-dependent object files compiled for main executable cannot call protected functions defined in DSOs (PLT cannot be created as otherwise address uniqueness is not guaranteed), e.g.

/usr/bin/ld: error: cannot preempt symbol: alcGetIntegerv
>>> defined in /usr/local/lib/libopenal.so
>>> referenced by audio_openal.c
>>>               audio_openal.c.o:(openal_input)

alcGetIntegerv is STV_PROTECTED defined in a DSO. These object files for main programs are incorrectly compiled without -fPIC/-fPIE. More appropriate fixes might be add -fPIE to these programs depending on openal.

https://bugs.llvm.org//show_bug.cgi?id=30960 you'll get similar link errors if you use modern binutils.
Comment 64 commit-hook freebsd_committer freebsd_triage 2020-03-19 23:03:36 UTC
A commit references this bug:

Author: tobik
Date: Thu Mar 19 23:02:45 UTC 2020
New revision: 528750
URL: https://svnweb.freebsd.org/changeset/ports/528750

Log:
  Clean up LLD_UNSAFE from openal-soft ports

  After FreeBSD 12.0 EOL we no longer have to worry about LLD 6 and
  can drop LLD_UNSAFE from openal-soft ports.  LLD can link them fine
  now but some ports needs a little help on i386 (-Wl,-znotext).

  PR:		226980
  Reviewed by:	jbeich (earlier version)
  Differential Revision:	https://reviews.freebsd.org/D23030

Changes:
  head/audio/alure/Makefile
  head/audio/freealut/Makefile
  head/audio/openal-soft/Makefile
  head/devel/love07/Makefile
  head/devel/love08/Makefile
  head/emulators/fs-uae/Makefile
  head/emulators/pcem/Makefile
  head/emulators/rpcs3/Makefile
  head/games/OpenTomb/Makefile
  head/games/allacrost/Makefile
  head/games/apricots/Makefile
  head/games/aquaria/Makefile
  head/games/arx-libertatis/Makefile
  head/games/assaultcube/Makefile
  head/games/astromenace/Makefile
  head/games/atr3d/Makefile
  head/games/avp/Makefile
  head/games/barony/Makefile
  head/games/blackshadeselite/Makefile
  head/games/chromium-bsu/Makefile
  head/games/colobot/Makefile
  head/games/dhewm3/Makefile
  head/games/diaspora/Makefile
  head/games/el/Makefile
  head/games/endless-sky/Makefile
  head/games/excido/Makefile
  head/games/flightgear/Makefile
  head/games/freedoko/Makefile
  head/games/freeminer/Makefile
  head/games/freeorion/Makefile
  head/games/fs2open/Makefile
  head/games/glest/Makefile
  head/games/ioquake3/Makefile
  head/games/iortcw/Makefile
  head/games/irrlamb/Makefile
  head/games/keeperrl/Makefile
  head/games/linwarrior/Makefile
  head/games/lugaru/Makefile
  head/games/megaglest/Makefile
  head/games/minetest/Makefile
  head/games/naev/Makefile
  head/games/openclonk/Makefile
  head/games/openomf/Makefile
  head/games/opensurge/Makefile
  head/games/regoth/Makefile
  head/games/retroarch/Makefile
  head/games/scorched3d/Makefile
  head/games/spacezero/Makefile
  head/games/spring/Makefile
  head/games/springlobby/Makefile
  head/games/stuntrally/Makefile
  head/games/supertux2/Makefile
  head/games/supertuxkart/Makefile
  head/games/tome4/Makefile
  head/games/trigger-rally/Makefile
  head/games/ultimatestunts/Makefile
  head/games/valyriatear/Makefile
  head/games/vamos/Makefile
  head/graphics/magnum-examples/Makefile
  head/graphics/reallyslick/Makefile
  head/multimedia/mpv/Makefile
  head/net-im/toxic/Makefile
Comment 65 Ed Maste freebsd_committer freebsd_triage 2020-06-08 17:00:11 UTC
Thanks for all of the fixes tobik - do you know if there are outstanding issues now?
Comment 66 Tobias Kortkamp freebsd_committer freebsd_triage 2020-06-09 12:06:28 UTC
(In reply to Ed Maste from comment #65)
AFAICT everything has been fixed.
Comment 67 Ed Maste freebsd_committer freebsd_triage 2020-06-09 18:26:54 UTC
Believe all issues are now addressed - new PRs can be created for any new issues.