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: New
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: 214864
  Show dependency treegraph
 
Reported: 2019-01-09 15:19 UTC by Ed Maste
Modified: 2020-06-25 14:02 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 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 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 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 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 2020-06-11 15:45:56 UTC
(In reply to Mikael Urankar from comment #3)
err wrong pr
Comment 5 Mikael Urankar freebsd_committer 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 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.