Created attachment 441384 [details] emerge --ignore-default-opts --info '=media-video/vlc-2.2.4::gentoo' make all-am make[7]: Entering directory '/var/tmp/portage/media-video/vlc-2.2.4/work/vlc-2.2.4/modules/gui/qt4' ../../../doltlibtool --tag=CXX --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../.. -DMODULE_STRING=\"$(p="libqt4_plugin_la-qt4.lo"; p="${p##*/}"; p="${p#lib}"; p="${p%_plugin*}"; p="${p%.lo}"; echo "$p")\" -D__PLUGIN__ -I../../../include -I../../../inclu de -I/usr/include/qt5/QtWidgets -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtX11Extras -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/ qt5 -DQT5_HAS_X11 -DHAVE_XI -O2 -pipe -mtune=native -march=native -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -fvisibility=hidden -c -o libqt4_plugin_la-qt4.lo `test -f 'qt4.cpp' || echo './'`qt4.cpp ../../../doltlibtool --tag=CXX --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../.. -DMODULE_STRING=\"$(p="libqt4_plugin_la-menus.lo"; p="${p##*/}"; p="${p#lib}"; p="${p%_plugin*}"; p="${p%.lo}"; echo "$p")\" -D__PLUGIN__ -I../../../include -I../../../inc lude -I/usr/include/qt5/QtWidgets -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtX11Extras -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/includ e/qt5 -DQT5_HAS_X11 -DHAVE_XI -O2 -pipe -mtune=native -march=native -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -fvisibility=hidden -c -o libqt4_plugin_la-menus.lo `test -f 'menus.cpp' || echo './'`menus.cpp In file included from /usr/include/qt5/QtCore/qatomic.h:46:0, from /usr/include/qt5/QtCore/qglobal.h:1145, from /usr/include/qt5/QtCore/qcoreapplication.h:43, from /usr/include/qt5/QtWidgets/qapplication.h:43, from /usr/include/qt5/QtWidgets/QApplication:1, from qt4.cpp:29: /usr/include/qt5/QtCore/qbasicatomic.h:61:4: error: #error "Qt requires C++11 support" # error "Qt requires C++11 support" [ebuild U ] media-video/vlc-2.2.4 [2.2.3] USE="X a52 alsa avcodec avformat bluray cdda cddb dbus dts dvb dvbpsi dvd encode faad ffmpeg flac gcrypt gme jpeg kate libass libnotify libsamplerate libtiger matroska modplug mp3 mpeg mtp musepack ncurses ogg opencv opengl opus png projectm pulseaudio qt5 rtsp schroedinger sdl sdl-image sftp shout speex svg swscale taglib theora truetype udev upnp v4l vaapi vlm vnc vorbis x264 xcb xv -aalib (-altivec) -atmo (-audioqueue) -bidi -chromaprint -dc1394 -debug -directfb (-directx) (-dxva2) -fdk -fluidsynth -fontconfig -gnome -gnutls -growl -httpd -ieee1394 -jack -kde -libav -libcaca -libtar -linsys -lirc -live -lua (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-media-library) (-neon) -omxil -optimisememory -postproc -qt4 -rdp -run-as-root -samba -sid -skins {-test} -tremor -twolame -vcdx -vdpau -vpx -wma-fixed -x265 -xml -zeroconf -zvbi" CPU_FLAGS_X86="mmx sse"
Created attachment 441386 [details] build log
Sorry for my delayed response; it took me a while to build a system with QT 5.7 from the overlay to test. I confirmed the problem in VLC 2.4 and have found at least two workarounds: 1. Use GCC > 6 as they change to defaulting to C++14 (
Sorry for my delayed response; it took me a while to build a system with QT 5.7 from the overlay to test. I confirmed the problem in VLC 2.2.4 and have found at least two workarounds: 1. Set the CXX flag "--std=c++11". I confirmed this work with GCC 5.4.0, but presumably any GCC > 4.8.1 should work (source: https://gcc.gnu.org/projects/cxx-status.html#cxx11) 2. Use GCC > 6 as they change to defaulting to C++14 (source: https://gcc.gnu.org/gcc-6/changes.html), I have confirmed this works with GCC 6.1 from the "hardened-development" overlay. If you go with GCC 6, you'll need the patch I posted in Bug 587954. I will research how to incorporate one of these fixes (probably the first one) into the ebuild.
(In reply to Nick Andrade from comment #3) > 1. Set the CXX flag "--std=c++11". I confirmed this work with GCC 5.4.0, > but presumably any GCC > 4.8.1 should work (source: > https://gcc.gnu.org/projects/cxx-status.html#cxx11) Any suggestion on how to achieve this? The usual append-cxxflags -std=c++11 seems not to be working. I'm using GCC 4.9, so happy to test.
(In reply to Michael Palimaka (kensington) from comment #4) > (In reply to Nick Andrade from comment #3) > > 1. Set the CXX flag "--std=c++11". I confirmed this work with GCC 5.4.0, > > but presumably any GCC > 4.8.1 should work (source: > > https://gcc.gnu.org/projects/cxx-status.html#cxx11) > > Any suggestion on how to achieve this? The usual append-cxxflags -std=c++11 > seems not to be working. I'm using GCC 4.9, so happy to test. Hi Michael, I'm sorry for the delayed response; I've been sick the last few days and finally got some testing done. I was able to get the build VLC 2.2.4 w/ QT 5.7 & GCC-4.9.3 by applying the patch I posted in Bug 587954 (vlc-gcc-6-buildfixes.patch) and also using CXXFLAGS="-std=c++11". Now that I know the patch can work with old GCC versions, I may update the ebuild to use "-std=c++11" and the patch by default. I would need to test some more, but I think this will be my go-forward approach.
(In reply to Nick Andrade from comment #3) > Sorry for my delayed response; it took me a while to build a system with QT > 5.7 from the overlay to test. > > I confirmed the problem in VLC 2.2.4 and have found at least two workarounds: > > 1. Set the CXX flag "--std=c++11". I confirmed this work with GCC 5.4.0, > but presumably any GCC > 4.8.1 should work (source: > https://gcc.gnu.org/projects/cxx-status.html#cxx11) Doing so, I'm running into #587954
BTW. 'USE="qt4 -qt5" emerge -v1 vl' works like a charm.
Created attachment 445552 [details] build log with atomic errors I tried it with -std=c++11, but now it fails with a bunch of atomic errors. Any idea what's that about?
Created attachment 447016 [details, diff] vlc-atomics.patch (In reply to PM from comment #8) > I tried it with -std=c++11, but now it fails with a bunch of atomic errors. > Any idea what's that about? Yes, https://mailman.videolan.org/pipermail/vlc-devel/2016-July/108715.html
Created attachment 447018 [details, diff] vlc-qt5-c++11.patch Patch: Enable C++11 just for the qt module. Own hackish work.
So I poked around a bit. It seems the "real" problem has to do with vlc_atomic.h. It is intended to be a c-style header that's included in a c++ context. In a c-context, it includes <stdatomic.h> with the proper five argument function, however in a c++ context it's just providing some four argument macros. Something along the lines of a patch that simply adds #if (__cplusplus >= 201103L) #include<atomic> #else //everything else #endif Alternatively, go through the cpp and hpp files and replace all instances of "vlc_atomic.h" with the regular <atomic> Neither of these fixes are super portable or fit for sending upstream but will probably make it build on your system. I'm going to fool around with this, and when I have a working patch I'll post it here.
Oh ignore me, I didn't see that there was a patch from vlc posted already. Definitely use that.
(In reply to Jan Kundrát from comment #10) > Created attachment 447018 [details, diff] [details, diff] > vlc-qt5-c++11.patch > > Patch: Enable C++11 just for the qt module. Own hackish work. 'emerge vlc' still fails with qt5 USE flag for me" ... make[7]: Entering directory '/var/tmp/portage/media-video/vlc-2.2.4/work/vlc-2.2.4/modules/gui/qt4' ../../../doltlibtool --tag=CXX --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../.. -DMODULE_STRING=\"$(p="libqt4_plugin_la-qt4.lo"; p="${p##*/}"; p="${p#lib}"; p="${p%_plugin*}"; p="${p%.lo}"; echo "$p")\" -D__PLUGIN__ -I../../../include -I../../../include -I/usr/include/samba-4.0 -I/usr/include/qt5/QtWidgets -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/qt5/QtX11Extras -I/usr/include/qt5 -I/usr/include/qt5/QtGui -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/include/qt5 -DQT5_HAS_X11 -std=c++11 -DHAVE_XI -march=native -O2 -pipe -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -fvisibility=hidden -c -o libqt4_plugin_la-qt4.lo `test -f 'qt4.cpp' || echo './'`qt4.cpp In file included from ../../../include/vlc_picture.h:35:0, from ../../../include/vlc_subpicture.h:34, from ../../../include/vlc_spu.h:29, from ../../../include/vlc_vout_osd.h:29, from ../../../include/vlc_input.h:39, from ../../../include/vlc_playlist.h:31, from qt4.hpp:34, from qt4.cpp:33: ../../../include/vlc_atomic.h:37:0: warning: "ATOMIC_FLAG_INIT" redefined # define ATOMIC_FLAG_INIT false ^ In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/atomic:41:0, from /usr/include/qt5/QtCore/qatomic_cxx11.h:45, from /usr/include/qt5/QtCore/qbasicatomic.h:53, from /usr/include/qt5/QtCore/qatomic.h:46, from /usr/include/qt5/QtCore/qglobal.h:1145, from /usr/include/qt5/QtCore/qcoreapplication.h:43, from /usr/include/qt5/QtWidgets/qapplication.h:43, from /usr/include/qt5/QtWidgets/QApplication:1, from qt4.cpp:29: /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/bits/atomic_base.h:157:0: note: this is the location of the previous definition #define ATOMIC_FLAG_INIT { 0 } ^ ... /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/atomic:988:25: error: macro "atomic_compare_exchange_weak_explicit" passed 5 arguments, but takes just 4 memory_order __m2) noexcept ^ /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/atomic:996:25: error: macro "atomic_compare_exchange_weak_explicit" passed 5 arguments, but takes just 4 memory_order __m2) noexcept ^ /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/atomic:1004:27: error: macro "atomic_compare_exchange_strong_explicit" passed 5 arguments, but takes just 4
Created attachment 448020 [details] build.log.bz2
(In reply to Juergen Rose from comment #13) > (In reply to Jan Kundrát from comment #10) > > Created attachment 447018 [details, diff] [details, diff] [details, diff] > > vlc-qt5-c++11.patch > > > > Patch: Enable C++11 just for the qt module. Own hackish work. > > 'emerge vlc' still fails with qt5 USE flag for me" That's expected, you need an actual patch from https://bugs.gentoo.org/attachment.cgi?id=447016 as well.
(In reply to Jan Kundrát from comment #15) > (In reply to Juergen Rose from comment #13) > > (In reply to Jan Kundrát from comment #10) > > > Created attachment 447018 [details, diff] [details, diff] [details, diff] [details, diff] > > > vlc-qt5-c++11.patch > > > > > > Patch: Enable C++11 just for the qt module. Own hackish work. > > > > 'emerge vlc' still fails with qt5 USE flag for me" > > That's expected, you need an actual patch from > https://bugs.gentoo.org/attachment.cgi?id=447016 as well. Thanks for the hint. It works now with qt5.
I've set up a PR mostly about qt4 vs. qt5 conflict removal but also adding the attached patches from here to speed up things wrt Qt 5.7.x unmasking (coming very soon).
Has there been any progress with this recently? What's holding it back?
(In reply to Andreas Sturmlechner from comment #17) > I've set up a PR mostly about qt4 vs. qt5 conflict removal but also adding > the attached patches from here to speed up things wrt Qt 5.7.x unmasking > (coming very soon). The patches from efb634127e94b5d71f5bd7472f19a54d024934d9 solve the issue for me.
Fixed in git with commit 7698d3296b27e1f53a9abd8af43a66dc5e676541.