Created attachment 181888 [details] portupgrade_VBox_5.1.20.log I tried upgrading VBox to 5.1.20 with and without ccache, with default clang (3.4.1) and clang 4.0. Always same error (part of log): […] 4 warnings generated. kBuild: Compiling VirtualBox - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.20/src/VBox/Frontends/VirtualBox/src/widgets/UIToolBar.cpp kBuild: Compiling VirtualBox - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.20/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp kBuild: Compiling VirtualBox - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.20/src/VBox/Frontends/VirtualBox/src/widgets/VBoxMediaComboBox.cpp kBuild: Compiling VirtualBox - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.20/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp /usr/ports/emulators/virtualbox-ose/work/VirtualBox-5.1.20/src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp:32:11: fatal error: 'QWindow' file not found # include <Qwindow> [...] <uname> FreeBSD 10.3-RELEASE-p18 amd64 <make.conf> CPUTYPE?=core2 OPTIONS_SET=CUPS WITHOUT_LPR=YES DEFAULT_VERSIONS+=apache=2.4 QT4_OPTIONS=CUPS NAS QGTKSTYLE LOCALIZED_LANG=ru MAKE_JOBS_UNSAFE=yes DEFAULT_VERSIONS+=mysql=5.7 .if ${.CURDIR:M*/ports/devel/ccache} NO_CCACHE=yes .endif DEFAULT_VERSIONS+=ssl=openssl .if ${.CURDIR:M*/emulators/linux-c6} OPTIONS_SET=NVIDIA_GL .endif .if ${.CURDIR:M*/graphics/linux-c6-glx-utils} OPTIONS_SET=NVIDIA_GL .endif .if ${.CURDIR:M*/x11-toolkits/linux-c6-qt47-x11} OPTIONS_SET=NVIDIA_GL .endif DEFAULT_VERSIONS+=samba=4.3
This could fixed with --- src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp.orig 2017-04-19 09:40:35 UTC +++ src/VBox/Frontends/VirtualBox/src/widgets/UIMiniToolBar.cpp @@ -29,7 +29,9 @@ # include <QToolButton> # include <QStateMachine> # include <QPainter> +# if QT_VERSION >= 0x050000 # include <QWindow> +# endif # ifdef VBOX_WS_X11 # include <QWindowStateChangeEvent> # endif @@ -806,6 +808,8 @@ void UIMiniToolBar::sltAdjust() #endif } +# if QT_VERSION >= 0x050000 + void UIMiniToolBar::sltAdjustTransience() { // WORKAROUND: @@ -818,6 +822,8 @@ void UIMiniToolBar::sltAdjustTransience( So it compiles, but after this it does not start: VirtualBox: supR3HardenedMainGetTrustedMain: dlopen("/usr/local/lib/virtualbox/VirtualBox.so",) failed: /usr/local/lib/virtualbox/VirtualBox.so: Undefined symbol "_ZN13UIMiniToolBar19sltAdjustTransienceEv"
Created attachment 181890 [details] patch-UIMiniToolBar.cpp
Sorry, there was a paste error. It was not complete. I attached the whole patch.
Oh, I does not read the second error message correct. Obsolete the patch.
Created attachment 181897 [details] proposed_patch-UIMiniToolBar.cpp
If I am right, this should work. It seems it is caused by the qt5 WORKAROUND in UIMiniToolBar.cpp.
Created attachment 181905 [details] patch_svn.diff
Patch work fine for me! Thanks! Version VBox in the CLI: admin@vladiom:~ % vboxmanage --version 5.1.20r114628 Version VBox in the GUI (with warning message): admin@vladiom:~ % VirtualBox Qt WARNING: libpng warning: iCCP: known incorrect sRGB profile VirtualBox Graphical User Interface Version 5.1.20 r114628 In the attachment patch for the port.
Thanks. but the svn-diff has a problem with poudriere. I think we had to rename the patch to extrapatch-src_VBox_Frontends_VirtualBox_src_widgets_UIMiniToolBar.cpp and add to the Makefile EXTRA_PATCHES+= ${PATCHFILE}/patch-src_VBox_Frontends_VirtualBox_src_widgets_UIMiniToolBar.cpp cause virtualbox-ose-kmod tries to take the patch.
correct: EXTRA_PATCHES+= ${PATCHFILE}/extrapatch-src_VBox_Frontends_VirtualBox_src_widgets_UIMiniToolBar.cpp
I've been trying to keep Qt4 support but it's getting harder and harder. https://svnweb.freebsd.org/changeset/ports/431852 https://svnweb.freebsd.org/changeset/ports/434552 https://svnweb.freebsd.org/changeset/ports/435797 As I threatened earlier, I think it's time to let go of Qt4 support. Do we really want to keep going like this?
Created attachment 181912 [details] svn-diff_virtualbox-ose
Created attachment 181913 [details] svn-diff-virtualbox-ose_2
(In reply to Jung-uk Kim from comment #11) If qt4 is "over", it is over. You only had to remove the qt4 option.
(In reply to Jung-uk Kim from comment #11) > As I threatened earlier, I think it's time to let go of Qt4 support. > Do we really want to keep going like this? Of course NOT! (In reply to w.schwarzenfeld from comment #14) I agree! :)
A commit references this bug: Author: jkim Date: Wed Apr 19 18:10:34 UTC 2017 New revision: 438899 URL: https://svnweb.freebsd.org/changeset/ports/438899 Log: - Fix build with option QT4. - Warn users Qt4 support may be removed in the future. PR: 218748 Submitted by: w dot schwarzenfeld at utanet dot at (initial) Changes: head/emulators/virtualbox-ose/Makefile head/emulators/virtualbox-ose/files/extrapatch-src_VBox_Frontends_VirtualBox_src_widgets_UIMiniToolBar.cpp
I went ahead and committed the patch (with minor changes). However, I also added a warning that the option may be removed in the future.