Bug 234790 - audio/faust-lv2: fails to link on i386 with LLD as system linker
Summary: audio/faust-lv2: fails to link on i386 with LLD as system linker
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-09 15:19 UTC by Ed Maste
Modified: 2021-07-26 15:11 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2019-01-09 15:19:02 UTC
http://package18.nyi.freebsd.org/build.html?mastername=headi386PR214864-default&build=2019-01-05_21h00m02s
http://package18.nyi.freebsd.org/data/headi386PR214864-default/2019-01-05_21h00m02s/logs/errors/faust-lv2-1.4.20180118_2.log

ld: error: can't create dynamic relocation R_386_32 against symbol: vtable for LV2UI in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /tmp/NLFeks-4b81cb.o
>>> referenced by NLFeks.cpp
>>>               /tmp/NLFeks-4b81cb.o:(LV2UI::LV2UI(int))

ld: error: can't create dynamic relocation R_386_32 against symbol: vtable for LV2UI in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in /tmp/NLFeks-4b81cb.o
>>> referenced by NLFeks.cpp
>>>               /tmp/NLFeks-4b81cb.o:(LV2UI::~LV2UI())
...

Need to add -Wl,-z,notext to the compiler driver link invocation; unfortunately this port does not honour LDFLAGS.

Adding -Wl,-z,notext to CFLAGS (for i386) appears to work.  Same change probably solves the BROKEN_aarch64 issue.
Comment 1 Ed Maste freebsd_committer freebsd_triage 2019-07-24 19:33:29 UTC
lld has been enabled as system linker for i386 on stable/12 in advance of 12.1 (base svn r350297, a few minutes ago)
Comment 2 Ed Maste freebsd_committer freebsd_triage 2020-05-26 01:55:12 UTC
I confirmed that this builds with CFLAGS=-fPIC and BROKEN_i386 removed. Perhaps consider limiting to CFLAGS_i386 for example, and also aarch64 as the same change presumably fixes the BROKEN_aarch64.
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2020-06-11 15:45:40 UTC
(In reply to Ed Maste from comment #2)
yes -fPIC is also needed for aarch64
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2020-06-11 15:45:56 UTC
(In reply to Mikael Urankar from comment #3)
err wrong pr
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2020-06-11 17:37:01 UTC
(In reply to Mikael Urankar from comment #3)
it's still broken on 12.1 i386
Comment 6 Ed Maste freebsd_committer freebsd_triage 2020-06-25 14:02:38 UTC
(In reply to Mikael Urankar from comment #5)
OK - I tested on -CURRENT with Clang/lld 10.0; presumably this will be fixed as of 12.2.
Comment 7 Ed Maste freebsd_committer freebsd_triage 2021-02-08 01:19:05 UTC
Does it now build on 12.2?
Comment 8 Mikael Urankar freebsd_committer freebsd_triage 2021-02-09 09:59:55 UTC
(In reply to Ed Maste from comment #7)
faust-lv2 is currently broken everywhere.
Comment 9 Ed Maste freebsd_committer freebsd_triage 2021-07-26 14:57:26 UTC
Remove block on 214864, ld.lld has been the system linker for some time now
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2021-07-26 15:08:53 UTC
Is this still a problem?

FreshPorts shows that faust packages are available on FreeBSD:{11,12,13}:i386.

https://www.freshports.org/audio/faust/
Comment 11 Ed Maste freebsd_committer freebsd_triage 2021-07-26 15:11:36 UTC
Yuri reports it builds now; closing.