Bug 236775 - emulators/virtualbox-ose: Fails to link on HEAD (r343963): undefined reference to pthread_getschedparam
Summary: emulators/virtualbox-ose: Fails to link on HEAD (r343963): undefined referenc...
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: Jung-uk Kim
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-03-25 09:48 UTC by Guido Falsi
Modified: 2019-03-27 09:03 UTC (History)
2 users (show)

See Also:
koobs: maintainer-feedback? (vbox)
koobs: merge-quarterly?


Attachments
Link VBoxXPCOM with pthread (1.02 KB, patch)
2019-03-26 20:20 UTC, Jung-uk Kim
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Falsi freebsd_committer freebsd_triage 2019-03-25 09:48:49 UTC
I have recently updated to a newer head and now virtualbox fails in my poudriere machine.

I get this error:

kBuild: Linking VBoxManage
kBuild: Linking VBoxBalloonCtrl
ld: error: /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxXPCOM.so: undefined reference to pthread_getschedparam
ld: error: /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxXPCOM.so: undefined reference to pthread_setschedparam
ld: error: /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxXPCOM.so: undefined reference to pthread_getschedparam
ld: error: /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxXPCOM.so: undefined reference to pthread_setschedparam
c++: error: linker command failed with exit code 1 (use -v to see invocation)
kmk: *** [/wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManage] Error 1
The failing command:
@c++               '-Wl,-rpath,/usr/local/lib/virtualbox'   -m64   -o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManage /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManage.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxInternalManage.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageAppliance.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageBandwidthControl.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageControlVM.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageDebugVM.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageDHCPServer.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageDisk.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageGuestCtrl.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageGuestCtrlListener.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageGuestProp.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageHelp.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/gen/VBoxManageBuiltInHelp.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageHostonly.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageInfo.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageList.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageMetrics.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageMisc.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageModifyVM.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageSnapshot.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageStorageController.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageUSB.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/VBoxManageNATNetwork.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxManage/dt/dt/NetworkServices/NetLib/VBoxNetPortForwardString.o   -L/usr/local/lib   /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxDDU.so   /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxRT.so   /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/lib/VBoxCOM.a   /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxXPCOM.so 
kmk: *** Waiting for unfinished jobs....
c++: error: linker command failed with exit code 1 (use -v to see invocation)
kmk: *** [/wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxBalloonCtrl/VBoxBalloonCtrl] Error 1
The failing command:
@c++               '-Wl,-rpath,/usr/local/lib/virtualbox'   -m64   -o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxBalloonCtrl/VBoxBalloonCtrl /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxBalloonCtrl/VBoxWatchdog.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxBalloonCtrl/VBoxWatchdogUtils.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxBalloonCtrl/VBoxModAPIMonitor.o /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/obj/VBoxBalloonCtrl/VBoxModBallooning.o   -L/usr/local/lib   /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxRT.so   /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/lib/VBoxCOM.a   /wrkdirs/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.2.26/out/freebsd.amd64/release/bin/VBoxXPCOM.so 
USBIdDatabaseGenerator: info: Total 378934 bytes - saving 29% (161311 bytes); old version 717755 bytes + relocs (47% save)
kmk: *** Exiting with status 2
*** Error code 2

Stop.
make: stopped in /usr/ports/emulators/virtualbox-ose



From the error it looks like it's missing a "-lpthread" argument, but I don't know the virtualbox build system and was not able to easily figure out how to add it.
Comment 1 Jung-uk Kim freebsd_committer freebsd_triage 2019-03-26 20:18:00 UTC
I'll take it.
Comment 2 Jung-uk Kim freebsd_committer freebsd_triage 2019-03-26 20:20:46 UTC
Created attachment 203170 [details]
Link VBoxXPCOM with pthread
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-03-26 22:24:49 UTC
A commit references this bug:

Author: jkim
Date: Tue Mar 26 22:23:53 UTC 2019
New revision: 496927
URL: https://svnweb.freebsd.org/changeset/ports/496927

Log:
  Fix build with lld on head after r345349.

  PR:		236775

Changes:
  head/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_Makefile.kmk
Comment 4 Jung-uk Kim freebsd_committer freebsd_triage 2019-03-26 22:25:59 UTC
It should be fixed now.  Thanks!
Comment 5 Guido Falsi freebsd_committer freebsd_triage 2019-03-27 09:03:43 UTC
Thanks!