Bug 234789 - emulators/virtualbox-ose: fails to link on i386 with lld as system linker
Summary: emulators/virtualbox-ose: 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: vbox
URL:
Keywords:
Depends on:
Blocks: 214864
  Show dependency treegraph
 
Reported: 2019-01-09 14:41 UTC by Ed Maste
Modified: 2019-07-24 19:33 UTC (History)
0 users

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


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 14:41:50 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/virtualbox-ose-5.2.22_2.log

kBuild: Linking VBoxRT
ld: error: relocation R_386_PC32 cannot be used against symbol RTMemAllocTag; recompile with -fPIC
>>> defined in /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/out/freebsd.x86/release/obj/VBoxRT/r3/alloc.o
>>> referenced by alloc.cpp:44 (/wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/src/VBox/Runtime/common/alloc/alloc.cpp:44)
>>>               /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/out/freebsd.x86/release/obj/VBoxRT/common/alloc/alloc.o:(RTMemDupTag)

ld: error: relocation R_386_PC32 cannot be used against symbol memcpy; recompile with -fPIC
>>> defined in /lib/libc.so.7
>>> referenced by alloc.cpp:46 (/wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/src/VBox/Runtime/common/alloc/alloc.cpp:46)
>>>               /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/out/freebsd.x86/release/obj/VBoxRT/common/alloc/alloc.o:(RTMemDupTag)

ld: error: relocation R_386_PC32 cannot be used against symbol RTMemAllocTag; recompile with -fPIC
>>> defined in /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/out/freebsd.x86/release/obj/VBoxRT/r3/alloc.o
>>> referenced by alloc.cpp:54 (/wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/src/VBox/Runtime/common/alloc/alloc.cpp:54)
>>>               /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.22/out/freebsd.x86/release/obj/VBoxRT/common/alloc/alloc.o:(RTMemDupExTag)
...

Similar issues in:
emulators/virtualbox-ose-additions
http://package18.nyi.freebsd.org/data/headi386PR214864-default/2019-01-05_21h00m02s/logs/errors/virtualbox-ose-additions-5.2.22_2.log

emulators/virtualbox-ose-additions-nox11
http://package18.nyi.freebsd.org/data/headi386PR214864-default/2019-01-05_21h00m02s/logs/errors/virtualbox-ose-additions-nox11-5.2.22_2.log

emulators/virtualbox-ose-nox11
http://package18.nyi.freebsd.org/data/headi386PR214864-default/2019-01-05_21h00m02s/logs/errors/virtualbox-ose-nox11-5.2.22_2.log

Most likely the link stage needs -z notext (e.g. -Wl,-z,notext in LDFLAGS).
Comment 1 Ed Maste freebsd_committer 2019-07-24 19:33:12 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)