Bug 217240 - emulators/virtualbox-ose fails to build when kbuild looks for moc-qt4
Summary: emulators/virtualbox-ose fails to build when kbuild looks for moc-qt4
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jung-uk Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-19 22:37 UTC by russo
Modified: 2017-02-21 20:14 UTC (History)
3 users (show)

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 russo 2017-02-19 22:37:10 UTC
A recent update to ports updated qt4 ports to stop them from installing directly to /usr/local/bin, and to stop appending "-qt4" to their names.  Now, one selects which Qt version using qtchooser.

This appears to have broken virtualbox-ose building.  Now, compilation aborts well into the process with this error:

kBuild: moc VBoxDbg - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/src/VBox/Debugger/VBoxDbgGui.h
kmk: /usr/local/lib/qt4/bin/moc-qt4: Command not found
kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/obj/VBoxDbg/qtmoc/VBoxDbgGui.tmp.cpp] Error 127
The failing command:
@/usr/local/lib/qt4/bin/moc-qt4  -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/src/VBox/Debugger -I/usr/local/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/xpcom -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/string -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/xpcom -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/nsprpub -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/ipcd -I/usr/local/include/qt4/QtCore -I/usr/local/include/qt4/QtGui -I/usr/local/include/qt4 -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/obj/VBoxDbg/qtmoc -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/obj/VBoxDbg/qtuic -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_REM -DVBOX_WITH_RAW_MODE -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_AMD64 -D__AMD64__ -DPIC -DIN_RING3 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DHAVE_CONFIG_H -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DVBOX_WITH_XPCOM -DIN_DBG_R3 -DVBOXDBG_USE_QT4 -DQT_CORE_LIB -DQT_GUI_LIB -o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/out/freebsd.amd64/release/obj/VBoxDbg/qtmoc/VBoxDbgGui.tmp.cpp /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.14/src/VBox/Debugger/VBoxDbgGui.h

So clearly there's something amiss, because it should not be looking for moc-qt4 in /usr/local/lib/qt4/bin, but just "moc"

I have tried force-reinstalling kBuild to no avail.

The only thing that was able to get me back to being able to buil VirtualBox was by hamfistedly symlinking /usr/local/lib/qt4/bin/moc-qt4 to moc, so that kmk could find it.

I'm not sure if this is an issue with kBuild or VirtualBox.
Comment 1 russo 2017-02-19 22:48:29 UTC
Follow-up:  

By adding a symlink
   cd /usr/local/lib/qt4/bin
   ln -s moc moc-qt4

I got past the compilation error in the initial description.  It got caught up again later, when it tried to run uic-qt4.  A similar symlink got past that, only to get caught up when it hit "lrelease-qt4."  Kludged that with another symlink.  Those three symlinks were enough to let the compilation proceed.  But it is an icky "solution."

I was able to get VirtualBox reinstalled with all that kludging, but clearly some package (kBuild?  VirtualBox? qtchooser?) is still not aware that the qt ports got rearranged and that it's inappropriate to add the "-qt4" suffix.
Comment 3 Jung-uk Kim freebsd_committer freebsd_triage 2017-02-21 20:11:18 UTC
I'll take it.
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-02-21 20:13:31 UTC
A commit references this bug:

Author: jkim
Date: Tue Feb 21 20:12:51 UTC 2017
New revision: 434552
URL: https://svnweb.freebsd.org/changeset/ports/434552

Log:
  Fix build with option QT4.

  PR:		217240

Changes:
  head/emulators/virtualbox-ose/Makefile
Comment 5 Jung-uk Kim freebsd_committer freebsd_triage 2017-02-21 20:14:41 UTC
It should be fixed with r434552.  Thanks!