Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 603648

Summary: media-video/vlc-2.2.4[qt5] on amd64-musl: qmetatype.h:1741:1: error: body of constexpr function ‘constexpr int qMetaTypeId() [with T = QModelIndex]’ not a return-statement
Product: Gentoo Linux Reporter: tt_1 <herrtimson>
Component: Current packagesAssignee: Gentoo musl team <musl>
Severity: normal CC: blueness, media-video, proxy-maint, SDNick484
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: compressed build.log
output of emerge --info
output of emerge --info for vlc

Description tt_1 2016-12-24 18:18:20 UTC
Created attachment 457324 [details]
compressed build.log

I currently had to rebuild many packages due to both the ncurses and the icu upgrade. Vlc-2.2.4{-r1} does fail to build with qt5/X useflag, with that particular flag disabled it builds just fine. 

the build log is attached
Comment 1 tt_1 2016-12-24 18:20:05 UTC
Created attachment 457326 [details]
output of emerge --info

the output of emerge --info
Comment 2 tt_1 2016-12-24 18:23:57 UTC
Created attachment 457328 [details]
output of emerge --info for vlc

emerge -pv vlc for useflags

                        Package Settings

[ebuild   R   ] media-video/vlc-2.2.4  USE="X a52 alsa avcodec avformat bluray cdda dbus dts dvb dvbpsi dvd encode faad ffmpeg gcrypt libsamplerate matroska mp3 mpeg ncurses ogg png qt5 swscale theora udev v4l vorbis wma-fixed xcb xml -aalib (-altivec) -atmo (-audioqueue) -bidi -cddb -chromaprint -dc1394 -debug -directfb (-directx) (-dxva2) -fdk -flac -fluidsynth -fontconfig -gme -gnome -gnutls -growl -httpd -ieee1394 -jack -jpeg -kate -kde -libass -libav -libcaca -libnotify -libtar -libtiger -linsys -lirc -live -lua (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) -modplug -mtp -musepack (-neon) -omxil -opencv -opengl -optimisememory -opus -postproc -projectm -pulseaudio -qt4 -rdp -rtsp -run-as-root -samba -schroedinger -sdl -sdl-image -sftp -shout -sid -skins -speex -svg -taglib {-test} -tremor -truetype -twolame -upnp -vaapi -vcdx (-vdpau) -vlm -vnc -vpx (-x264) -x265 -xv -zeroconf -zvbi (-media-library%)" CPU_FLAGS_X86="mmx sse" 

how to reproduce: grabe a recent stage3, chroot into it and emerge vlc with USE=-qt4 qt5 X"
Comment 3 Nick Andrade 2017-01-21 06:39:17 UTC
I haven't been able to duplicate the issue (however I'm not on musl).  Could post the exact version of qt5 you're using?
Comment 4 tt_1 2017-01-21 13:24:40 UTC
I'm using the stable qt-5.6.2, with the exception of qtcore which is 5.6.2-r1 from the musl overlay. Neither do I have this problem on my main glibc system. Of course I tried the unstable branch of 5.7.1 before posting this. 

To reproduce you can just grab a recent stage3 and emerge vlc with the provided useflags. Disabling qt5 solves the compile issue, but I appreciate and need the gui! :)
Comment 5 Nick Andrade 2017-01-21 18:14:47 UTC
I'm not in a position to do the stage3 test at the moment, but should be able to later.  In the meantime, could you see if you can reproduce this error on qt-5.6.1?  I ask because I don't see any similar error reports on Alpine Linux which is a musl based distro, and they seem to still be on qt-5.6.1.
Comment 6 tt_1 2017-01-21 18:56:54 UTC
It is a regression, that's for sure. Vlc used to compile just fine around half a year ago. 

5.6.1 went stable on Jul 22nd for amd64 
5.6.2 went stable on Dec 6th for amd64 

So I think it is worth a try to a downgrade. I'll talk to the guys from the overlay to restore their patched version of 5.6.1 and tell you more later on.
Comment 7 tt_1 2017-01-21 20:24:49 UTC
Well, the build with qt-gui/core-5.6.1 fails with exactly the same build error.
Comment 8 Nick Andrade 2017-01-22 00:51:18 UTC
(In reply to tt_1 from comment #7)
> Well, the build with qt-gui/core-5.6.1 fails with exactly the same build
> error.

Bummer, thanks for checking.  I will try to set up an environment and duplicate the issue.  Definitely interesting that they aren't reporting it on Alpine Linux.

Going through your log, I see a lot more errors than just qmetatype.h, for example:

/usr/lib/gcc/x86_64-gentoo-linux-musl/4.9.4/include/g++-v4/bits/uses_allocator.h:66:75: error: macro "_Static_assert" passed 3 arguments, but takes just 2
     { static_assert( uses_allocator<_Tp, _Alloc>::value, "uses allocator" ); };

and tons of errors related to ../../../include/vlc_fixups.h such as:
../../../include/vlc_fixups.h:243:33: error: expected ‘)’ before ‘void’
../../../include/vlc_fixups.h:243:73: error: expected unqualified-id before ‘)’ token
 # define _Static_assert(x, s) ((void) sizeof (struct { unsigned:-!(x); }))
Seems something related to the macro expansion of static_assert is broken.

Have you tried other versions of GCC?  Perhaps give GCC 5.4.0-r2 a go?
Comment 9 tt_1 2017-01-22 12:26:57 UTC
I found an upstream ticket about an issue which seems to be related to this one, but it has been closed without further discussion as invalid/worksforme

Anyway, I could give gcc-6.3.0 a try and see if anything changes.
Comment 10 tt_1 2017-01-22 18:44:11 UTC
All issues are solved by using gcc 6.3.0 from the musl overlay to compile. 

Is there any interest into fixing the compile error with the stable gcc-4.9.4? In other words, should this be left open? 

This is, by the way, not the first time where there is no appropiate patch in the alpine repos to solve a problem with gentoo. Always hard to figure it out if they solved it otherwise, cause they do not have a good way to document their patches and other efforts.
Comment 11 tt_1 2017-02-13 20:18:22 UTC
Wouldn't it be sufficient to mask the qt5 useflag for vlc on the musl profiles?
Comment 12 tt_1 2017-04-20 17:39:48 UTC
gcc 5.4 is stable now, problem solved.