Summary: | x11-misc/lightdm-1.19.0[qt5]: error: #error "Qt requires C++11 support" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | James Dominy <jgdominy> |
Component: | Current packages | Assignee: | Markos Chandras (RETIRED) <hwoarang> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | endymion+gentoo, fischer, kensington, mail, rose, walch.martin |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 589412 | ||
Attachments: |
emerge.info
build log Set compiler flag to enable C++-11 Enable C++-11 |
Description
James Dominy
2016-06-08 13:18:28 UTC
Created attachment 436868 [details]
emerge.info
Created attachment 436870 [details]
build log
$ emerge -pqv lightdm [ebuild U ] x11-misc/lightdm-1.19.0 [1.16.6] USE="gtk introspection qt5 -audit -gnome -kde -qt4" still the same with x11-misc/lightdm-1.19.1 Qt starting from version 5.7 requires C++11 support from the C++ compiler [1]. This is usually no problem, one has to pass -std=c11 as a compiler flag (CFLAGS or CXXFLAGS?). I haven't tested it, but I strongly assume that using Qt 5.6 will work fine with lightdm. [1] https://wiki.qt.io/New_Features_in_Qt_5.7 Created attachment 439920 [details, diff]
Set compiler flag to enable C++-11
This simple patch sets the compiler flag -std=c++11 to enable C++-11 support for the compiler.
Seems to work for both the current stable version 1.16.7 as well as the latest unstable in Portage, 1.19.0.
Not covered:
- Test if compiler actually supports C++11, but all current C++ compilers should do it
- Not tested with any other compiler than GNU C++ 4.9.3
This patch should be submitted upstream if it can be confirmed to fix the problem for the bug reporter.
Patch works for x11-misc/lightdm-1.19.1 too. But I see this warning: libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=format-security -Werror=format=2 -Werror=missing-include-dirs -I../common -DCONFIG_DIR=\"/etc/lightdm\" -DSESSIONS_DIR=\"/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions\" -DWAYLAND_SESSIONS_DIR=\"/usr/share/wayland-sessions\" -DREMOTE_SESSIONS_DIR=\"/usr/share/lightdm/remote-sessions\" -march=native -O2 -pipe -std=c++11 -c user.c -fPIC -DPIC -o .libs/liblightdm_gobject_1_la-user.o cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C Created attachment 441472 [details, diff] Enable C++-11 (In reply to jospezial from comment #8) > Patch works for x11-misc/lightdm-1.19.1 too. But I see this warning: > [..] > cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but > not for C > cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but > not for C This revised patch only sets CXXFLAGS. I cannot observe this warning on my system when using this revised patch. *** Bug 592828 has been marked as a duplicate of this bug. *** |