Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407593 - media-video/vlc-2.0.0: xcb/glx.c:384:13: error: invalid use of void expression (fails with nvidia opengl impl)
Summary: media-video/vlc-2.0.0: xcb/glx.c:384:13: error: invalid use of void expressio...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Alexis Ballier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-09 22:17 UTC by jms
Modified: 2012-03-20 11:46 UTC (History)
7 users (show)

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


Attachments
build log (media-video:vlc-2.0.0:20120309-201553.log,735.11 KB, text/plain)
2012-03-09 22:17 UTC, jms
Details
environment (environment,110.79 KB, text/plain)
2012-03-09 22:21 UTC, jms
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jms 2012-03-09 22:17:30 UTC
Created attachment 304749 [details]
build log

vlc-2.0.0 fail to build .

  CCLD   libxcb_xv_plugin.la
  CC     libxcb_glx_plugin_la-glx.lo
/bin/sh ../../libtool --tag=CC --silent --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..  -DMODULE_NAME=`p="libxcb_glx_plugin_la-glx.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}"` -DMODULE_NAME_IS_`p="libxcb_glx_plugin_la-glx.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}"` -DMODULE_STRING=\"`p="libxcb_glx_plugin_la-glx.lo"; p="${p##*/}"; p="${p#lib}"; echo "${p%_plugin*}"`\" -D__PLUGIN__ -I../../include -I../../include    -I/usr/include/libdrm   -march=native -O2 -pipe -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Wvolatile-register-var -Werror-implicit-function-declaration -pipe -fvisibility=hidden -c -o libxcb_glx_plugin_la-glx.lo `test -f 'xcb/glx.c' || echo './'`xcb/glx.c
xcb/glx.c: In function 'Open':
xcb/glx.c:384:13: error: invalid use of void expression
make[5]: *** [libxcb_glx_plugin_la-glx.lo] Error 1
make[5]: Leaving directory `/var/tmp/portage/media-video/vlc-2.0.0/work/vlc-2.0.0/modules/video_output'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/var/tmp/portage/media-video/vlc-2.0.0/work/vlc-2.0.0/modules/video_output'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/var/tmp/portage/media-video/vlc-2.0.0/work/vlc-2.0.0/modules/video_output'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-video/vlc-2.0.0/work/vlc-2.0.0/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-video/vlc-2.0.0/work/vlc-2.0.0'
make: *** [all] Error 2
 * ERROR: media-video/vlc-2.0.0 failed (compile phase):
Comment 1 jms 2012-03-09 22:18:59 UTC
emerge --info =media-video/vlc-2.0.0
Portage 2.1.10.44 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.13-r4, 3.2.9-gentoo-jms-3.2.9 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.2.9-gentoo-jms-3.2.9-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.0.3
Timestamp of tree: Fri, 09 Mar 2012 15:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.6 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.6.6-r2, 2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.7-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo sunrise gamerlay-stable x-jms
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_GB en es fr en"
PKGDIR="/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/gamerlay /usr/local/portage/jms"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi aim alsa amd64 ao apm autoipd avahi bash-completion berkdb bluetooth branding bzip2 cairo cdaudio cdda cddb cdparanoia cdr cjk cli consolekit cracklib crypt css cups cxx dbus dga dhcpcd directfb dri dts dv dvb dvd dvdnav dvdr emboss encode evdev exif fam fbcon ffmpeg firefox flac fontconfig foomaticdb fortran ftp gdbm gdu gif gimp gnutls gphoto2 gpm gstreamer gtk gzip hdri iconv icq icu ieee1394 imagemagick imap imlib ipod ipv6 jabber jpeg jpeg2k kde kipi kontact lame laptop lastfm lcms ldap libcaca libnotify libwww lm_sensor lzma lzo mad maildir matroska mdnsresponder-compat memlimit mhash mikmod mime mmap mmx mng modules motif mozilla mp3 mp4 mpeg mplayer msn mtp mudflap multilib musepack musicbrainz mysql ncurse ncurses networkmanager nls nptl nptlonly nsplugin nvidia ofx ogg openal openexr opengl openmp oss pam pango pcmcia pcre pdf phonon php plasma png policykit ppds pppd projectm pulseaudio qt3support qt4 quicktime raw readline resolvconf scanner sdl semantic-desktop session smp speex spell sse sse2 ssl ssse3 startup-notification svg sysfs syslog taglib tcpd theora thumbnail tidy tiff truetype udev unicode usb v4l v4l2 vcd vdpau video vim-syntax vorbis webkit wifi x x264 xattr xcb xcomposite xine xinerama xml xorg xosd xpm xscreesaver xulrunner xv xvid xvmc yahoo zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en es fr en" PHP_TARGETS="php5-3 php5-4" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 jms 2012-03-09 22:19:54 UTC
 emerge -pqv =media-video/vlc-2.0.0
[ebuild     U ] media-video/vlc-2.0.0 [1.1.13] USE="X a52 aac aalib alsa avahi avcodec%* avformat%* cdda cddb dbus directfb dts dvb dvbpsi%* dvd encode%* ffmpeg flac fontconfig gcrypt gnutls ieee1394 kde libcaca libnotify matroska mmx mp3 mpeg mtp musepack ncurses ogg opengl oss png postproc%* projectm pulseaudio qt4 sdl skins speex sse svg swscale%* taglib theora truetype udev v4l vaapi vlm vorbis x264 xcb xml xosd xv (-altivec) -atmo (-audioqueue) -bidi -bluray% -dc1394 -debug -dirac (-direct2d) (-directx) (-dshow) (-dxva2) -egl% -fbosd% -fluidsynth -gme -gnome -growl% -httpd (-ios-vout) -jack -kate -libass -libproxy -libsamplerate% -libtar% -libtiger -linsys% -lirc -live -lua (-macosx) (-macosx-audio) (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-macosx-vout) (-media-library) -modplug (-neon) -omxil% -optimisememory -portaudio% -pvr -rtsp -run-as-root -samba -schroedinger -sdl-image -shine -shout -sid% -sqlite -switcher% -twolame -upnp -vcdx (-waveout) (-win32codecs) (-wingdi) -wma-fixed -zvbi (-fbcon%*) (-ggi%) (-id3tag%) (-libv4l%) (-libv4l2%*) (-nsplugin%*) (-remoteosd%) (-stream%) (-svga%)"
Comment 3 jms 2012-03-09 22:21:08 UTC
Created attachment 304751 [details]
environment
Comment 4 jms 2012-03-09 23:26:17 UTC
not sure if this has anything to do with it but in case :
 emerge -pv libxcb xcb-util

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] x11-libs/libxcb-1.8-r1  USE="-doc (-selinux) -static-libs" 0 kB
[ebuild   R    ] x11-libs/xcb-util-0.3.8  USE="-doc -static-libs -test" 0 kB


also did 
revdep-rebuild
lafilefixer --justfixit

to no avail
??
Comment 5 Denis M. (Phr33d0m) 2012-03-10 00:42:17 UTC
I can reproduce this with the exactly same error.

vlc-2.0.0 doesn't want to emerge with USE="xv" (the problematic USE flag is xcb but it can't be removed unless you remove xv too). This can be a severe problem for the ones looking for Xv support.

So in order to emerge vlc with success you have to:
# USE="-xv -xcb" emerge vlc

Otherwise I wasn't able to emerge it.
Comment 6 jms 2012-03-10 06:23:18 UTC
(In reply to comment #5)
> I can reproduce this with the exactly same error.
> 
> vlc-2.0.0 doesn't want to emerge with USE="xv" (the problematic USE flag is
> xcb but it can't be removed unless you remove xv too). This can be a severe
> problem for the ones looking for Xv support.
> 
> So in order to emerge vlc with success you have to:
> # USE="-xv -xcb" emerge vlc
> 
> Otherwise I wasn't able to emerge it.

Thank you.
Yes I can confirme that  
USE="-xv -xcb" emerge vlc
works for me vlc emerge fine
Comment 7 Ivan Grynko 2012-03-10 11:20:17 UTC
eselect opengl set xorg-x11 makes vlc to compile, with eselect opengl set nvidia it fails, so apparently thre is a problem with mesa or eselect-opengl
Comment 8 Benjamin Junglas 2012-03-10 14:02:53 UTC
hi, i had the same problem here.

thanks Ivan, changed to x11-opengl, compiled, switched back to nvidia => works! =)
Comment 9 jms 2012-03-10 21:33:53 UTC
tested try downgrading to 
x11-proto/xcb-proto-1.6-r2
x11-libs/libxcb-1.7
=fail to build

but 
eselect opengl set xorg-x11
emerge -1v vlc
eselect opengl set nvidia
works

what I don't understand ,as this seems to point to a bug with nvidia gllx,(no?)
is that apparently this affect as well fglrx users
http://forums.gentoo.org/viewtopic-t-915974.html?sid=46dcd0405a8278b59168b303a1e767cd

and Chiitoo
http://forums.gentoo.org/viewtopic-t-915978.html?sid=366b39f534ac8bfe55df8f5c4d5f9811
had "media-video/vlc-2.0.0 was built with the following: " [..] +xcb -xv
and he has
VIDEO_CARDS="nvidia"

?!!?
Comment 10 jms 2012-03-11 03:23:33 UTC
well...

xcb/glx.c: In function 'Open':
xcb/glx.c:384:13: error: invalid use of void expression


vlc-2.0.0/vlc-2.0.0/modules/video_output/xcb/glx.c

370     const char *glx_extensions = glXQueryExtensionsString (dpy, snum);
371 
372     bool is_swap_interval_set = false;
373 #ifdef GLX_SGI_swap_control
374     if (HasExtension (glx_extensions, "GLX_SGI_swap_control")) {
375         PFNGLXSWAPINTERVALSGIPROC SwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC)GetProcAddress (NULL, "glXSwapIntervalSGI");
376         if (!is_swap_interval_set && SwapIntervalSGI)
377             is_swap_interval_set = !SwapIntervalSGI (1);
378     }
379 #endif
380 #ifdef GLX_EXT_swap_control
381     if (HasExtension (glx_extensions, "GLX_EXT_swap_control")) {
382         PFNGLXSWAPINTERVALEXTPROC SwapIntervalEXT = (PFNGLXSWAPINTERVALEXTPROC)GetProcAddress (NULL, "glXSwapIntervalEXT");
383         if (!is_swap_interval_set && SwapIntervalEXT)
384             is_swap_interval_set = !SwapIntervalEXT (dpy, sys->glwin, 1);
385     }
386 #endif
387 
388     /* Initialize common OpenGL video display */

anything here?
Comment 11 jms 2012-03-11 04:18:01 UTC
humm
something to do with Bug 407261 ..
Comment 12 jms 2012-03-11 18:40:53 UTC
ok I think I nailed it.
code in
vlc-2.0.0/vlc-2.0.0/modules/video_output/xcb/glx.c

depend of glew
or
glew >=media-libs/glew-1.7.0 doesn't works with this code anymore (see Bug 407261 )
and
equery d glew
 * These packages depend on glew:
media-gfx/enblend-4.0 (media-libs/glew)
media-libs/libprojectm-2.0.1-r1 (media-libs/glew)

so
if emerge with +projectm and one has glew >=media-libs/glew-1.7.0

build will fail

Proposed solution:
From my understanding(not that familiar with ebuild) ebuild should be changed:
line 116 from 
projectm? ( media-libs/libprojectm 
to 
projectm? ( media-libs/libprojectm <media-libs/glew-1.7.0)

To me this is an upstream bug
Comment 13 Robert Golding 2012-03-13 14:08:49 UTC
my failed merge of media-video/vlc-2.0.0 defaults to projectm use flag disabled .. ?
Changed opengl from nvidia to xorg-x11 worked for me after repeatedly getting the parents error message.  Oddly though, disabling use of xv and xcb didn't help at all.
Comment 14 Mattias Merilai 2012-03-13 16:05:35 UTC
For me -xv -xcb compiles, otherwise not. With those set, it makes no difference whether I have projectm and glew installed. Eselecting opengl works around fine though.
Maybe we should bump vlc an ebuild that eselects opengl xorg-x11 for build time, until this issue gets sorted out? IIRC it would not be the first package to do so.
Comment 15 jms 2012-03-13 16:16:21 UTC
hum about projectm skip that my mistake my compile test with this was flawded...
but I can reconfirm for me 
eselect xorg-x11
emerge with -xv -xcb
Comment 16 Alexis Ballier gentoo-dev 2012-03-14 12:06:39 UTC
(In reply to comment #9)
> but 
> eselect opengl set xorg-x11
> emerge -1v vlc
> eselect opengl set nvidia
> works

seems to be related to nvidia-drivers, cc'in maintainers.
Comment 17 Alexis Ballier gentoo-dev 2012-03-14 14:07:44 UTC
actually, according to http://www.opengl.org/registry/specs/EXT/swap_control.txt
standard is to be a void function; mesa defines it as returning an int, so mesa seems wrong but vlc followed mesa
vlc should probably be patched it seems

however, how does that affect ABI compatibility ? wont it break if using nvidia's opengl when vlc was built with mesa's header ?
Comment 18 Alexis Ballier gentoo-dev 2012-03-20 09:24:36 UTC
fixed in vlc-2.0.1 and later

i fear that subtle difference between mesa and nvidia libGL causes a big ABI difference: after a function returning int, the ABI tells to pop the int from the stack, after a function returning void there is nothing on the stack, so switching libGL.so will make vlc crash...
Comment 19 Mattias Merilai 2012-03-20 11:46:39 UTC
(In reply to comment #18)
> fixed in vlc-2.0.1 and later
> 
> i fear that subtle difference between mesa and nvidia libGL causes a big ABI
> difference: after a function returning int, the ABI tells to pop the int
> from the stack, after a function returning void there is nothing on the
> stack, so switching libGL.so will make vlc crash...

Well I have been using the eselect build workaround for a week now, haven't noticed any problems.