Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662462 - app-emulation/virtualbox-5.2.16: Configure failure with USE="qt5" and GCC <6
Summary: app-emulation/virtualbox-5.2.16: Configure failure with USE="qt5" and GCC <6
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-30 11:22 UTC by Alex Turbov
Modified: 2019-04-29 08:16 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
configure.log (configure.log,38.79 KB, text/x-log)
2018-09-04 21:10 UTC, Ryo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Turbov 2018-07-30 11:22:52 UTC
Checking for Mesa / GLU: Checking for Qt5: 
  ** qt5 not found!
Check /storage/tmp/paludis/app-emulation-virtualbox-5.2.16/work/VirtualBox-5.2.16/configure.log for details

The log mentioned contains the following error:

***** Checking Qt5 *****
(Qt5 from pkg-config)
compiling the following source file:
#include <QtGlobal>
extern "C" int main(void)
{
#if QT_VERSION >= 329216
  return 0;
#else
  return 1;
#endif
}
using the following command line:
x86_64-pc-linux-gnu-g++  -fPIC -g -O -Wall -o /storage/tmp/paludis/app-emulation-virtualbox-5.2.16/work/VirtualBox-5.2.16/.tmp_out /storage/tmp/paludis/app-emulation-virtualbox-5.2.16/work/VirtualBox-5.2.16/.tmp_src.cc "-L/usr/lib64 -lQt5Core -lpthread -I/usr/include/qt5/QtCore -I/usr/include/qt5"
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/type_traits:35:0,
                 from /usr/include/qt5/QtCore/qglobal.h:45,
                 from /usr/include/qt5/QtCore/QtGlobal:1,
                 from /storage/tmp/paludis/app-emulation-virtualbox-5.2.16/work/VirtualBox-5.2.16/.tmp_src.cc:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
In file included from /usr/include/qt5/QtCore/qglobal.h:98:0,
                 from /usr/include/qt5/QtCore/QtGlobal:1,
                 from /storage/tmp/paludis/app-emulation-virtualbox-5.2.16/work/VirtualBox-5.2.16/.tmp_src.cc:1:
/usr/include/qt5/QtCore/qcompilerdetection.h:567:6: error: #error Qt requires a C++11 compiler and yours does not seem to be that.
 #    error Qt requires a C++11 compiler and yours does not seem to be that.
      ^
<skipped unrelated>


Reproducible: Always
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-08-09 06:26:44 UTC
This is because you use GCC <6 (5.4.0) which defaults to C++ 1998.
GCC >=6 defaults to C++ 2014.

If maintainers of this package plan to support GCC <6, then they should add e.g. 'append-cxxflags -std=gnu++14' or 'append-cxxflags -std=c++14'
Comment 2 Ryo 2018-08-11 12:10:56 UTC
line 2775 of Config.kmk

# C++ Std settings
	$(QUIET)$(APPEND) '$@' 'ifneq ($$(VBOX_GCC_VERSION_CXX),)'
	$(QUIET)$(APPEND) '$@' ' ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40800),)'
	$(QUIET)$(APPEND) '$@' '  VBOX_GCC_std ?= -std=c++11'
	$(QUIET)$(APPEND) '$@' ' else ifneq ($$(int-ge $$(VBOX_GCC_VERSION_CXX),40600),)'
	$(QUIET)$(APPEND) '$@' '  VBOX_GCC_std ?= -std=c++0x'
	$(QUIET)$(APPEND) '$@' ' endif'
	$(QUIET)$(APPEND) '$@' 'endif'

then -std=c++11 should be included since gcc-4.8
but it's not in every tests :

***** Checking Qt5 *****
(Qt5 from pkg-config)
compiling the following source file:
#include <QtGlobal>
extern "C" int main(void)
{
#if QT_VERSION >= 329216
  return 0;
#else
  return 1;
#endif
}
using the following command line:
x86_64-pc-linux-gnu-g++  -fPIC -g -O -Wall -o /dev/shm/portage/app-emulation/virtualbox-5.2.16/work/VirtualBox-5.2.16/.tmp_out /dev/shm/portage/app-emulation/virtualbox-5.2.16/work/VirtualBox-5.2.16/.tmp_src.cc "-L/usr/lib64 -lQt5Core   -lpthread -I/usr/include/qt5/QtCore -I/usr/include/qt5  "
Comment 3 Ryo 2018-09-04 21:10:02 UTC
Created attachment 545936 [details]
configure.log

=> configure.lol :)
Comment 4 Ryo 2018-09-04 21:17:51 UTC
(In reply to Ryo from comment #3)
> Created attachment 545936 [details]
> configure.log
> 
> => configure.lol :)


I spent some times on this, i managed to compile it.
It looks like a configure (script) failure , but i can't really understand what test is failing.

the interesting parts are :

1489 # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk)
1490 [ $cc_maj -eq 4 -a $cc_min -eq 8 ] && FLGQT5="$FLGQT5 -std=c++11"

and

1606   else
1607     log_failure "qt5 not found"
1608     fail <=========
1609   fi

I had to comment out the "fail" function , then it compiled.I ran it too for a few minutes , it was OK.
I've attached the configure.log , someone is shouting about all QT5 tests.

Hope it helps, cheers.

:)
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-29 08:16:33 UTC
gcc versions older than 6.x are masked and I won't support them any more.