Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 405173 - <dev-libs/glib-2.40.2 causes error in media-video vlc: "- /bin/sh: line 4: 2215 Segmentation fault ./vlc-cache-gen ../modules"
Summary: <dev-libs/glib-2.40.2 causes error in media-video vlc: "- /bin/sh: line 4: 2...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 4 votes (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PATCH
: 384313 431818 463558 469236 471918 479798 479836 479898 480684 483334 483396 517546 (view as bug list)
Depends on: 529964
Blocks: gnome-3.8-stable
  Show dependency tree
 
Reported: 2012-02-21 17:47 UTC by Chris Smith
Modified: 2015-01-02 12:29 UTC (History)
47 users (show)

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


Attachments
build log (media-video:vlc-2.0.0:20120221-170554.log,209.50 KB, text/plain)
2012-02-21 17:48 UTC, Chris Smith
Details
vlc-cache-gen bt-full.log (vlc-cache-gen bt-full.log,9.93 KB, text/plain)
2013-08-03 14:09 UTC, Denis M. (Phr33d0m)
Details
Patch to specify only the function body in AC_TRY_LINK (actry-use-only-function-body.patch,568 bytes, patch)
2014-07-20 13:38 UTC, Alessandro Di Federico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Smith 2012-02-21 17:47:20 UTC
Using media-video/vlc-2.0.0 is given as a fix for Bug 404261yet it fails to compile.

Reproducible: Always

Actual Results:  
Making all in bin
make[2]: Entering directory `/var/tmp/portage/media-video/vlc-2.0.0/work/vlc-2.0.0/bin'
  CC     vlc.o
  CC     override.o
  CC     vlc_static-vlc.o
  CC     rootwrap.o
  CC     vlc_static-override.o
  CC     cachegen.o
  CCLD   vlc-cache-gen
  CCLD   vlc-wrapper
  CCLD   vlc
  CCLD   vlc-static
  GEN    ../modules/plugins.dat
/bin/sh: line 4:  2215 Segmentation fault      ./vlc-cache-gen ../modules
make[2]: *** [../modules/plugins.dat] Error 139



emerge --info
Portage 2.2.0_alpha88 (default/linux/amd64/10.0, gcc-4.6.2, glibc-2.15, 3.2.6-gentoo x86_64)
=================================================================
System uname: Linux-3.2.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.1
Timestamp of tree: Tue, 21 Feb 2012 16:15:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.7-r3
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
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.10.3, 1.11.3
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.2 (virtual/os-headers)
sys-libs/glibc:           2.15
Repositories: gentoo tcg mythtv
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.netcologne.de/gentoo/ http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/ ftp://mirrors.rit.edu/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en_US en"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/mythtv_portage/Gentoo"
SYNC="rsync://rsync11.us.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr apache2 audiofile bash-completion berkdb bzip2 cairo caps cdaudio cddb cdparanoia cdr cdrdao chm cli consolekit cracklib crypt cups curl cxx dbus designer-plugin djvu dri dts dv dvb dvd dvdr ebook encode exif fam ffmpeg flac fortran gdbm gif gmp gnome gphoto2 gpm gps graphite gstreamer gtk gtk3 iconv icu ieee1394 imagemagick imap imlib ipv6 jack java jpeg jpeg2k kpathsea lame lcms libffi libnotify mad marble midi mmap mmx modules mozilla mp3 mudflap multilib musicbrainz mythtv ncurses network nls nodrm nptl nptlonly nsplugin nvidia ofx ogg openexr opengl openmp pam pcre pdf png policykit pulseaudio quicktime readline samba sasl scanner sdl semantic-desktop session slp smp sndfile spell sse sse2 ssl subversion svg sysfs theora threads tiff tk transparency truetype udev unicode usb vcd vdpau vim-syntax vorbis vpx wav wavpack wmf x264 xattr xcomposite xine xml xorg xscreensaver xv xvid xvmc zlib" ALSA_CARDS="hda-intel hdsp hpet hrtimer rtctimer seqdummy virmidi" 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" 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="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" PHP_TARGETS="php5-3" QEMU_SOFTMMU_TARGETS="i386 x86 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Chris Smith 2012-02-21 17:48:53 UTC
Created attachment 302713 [details]
build log
Comment 2 Zorzo Luca 2012-02-21 22:22:31 UTC
Same here, using stable amd64 except for vlc and needed testing deps.
Comment 3 Chris Smith 2012-02-24 17:32:10 UTC
Same problem exists for media-video/vlc-2.0.9999.
So what is the fix for Bug 404261 ?
Any possibility this bug is related to Bug 385109 ?
Comment 4 Alexis Ballier gentoo-dev 2012-02-24 17:39:55 UTC
(In reply to comment #3)
> Any possibility this bug is related to Bug 385109 ?

seems similar, yes

but in any case, to understand a segfault, we need a backtrace as decribed in:
http://www.gentoo.org/proj/en/qa/backtraces.xml


i was thinking about removing the call to vlc-cache-gen in the build system, but it may be better to fail like that instead of installing the package which is half-broken like happened with vlc-1.1
Comment 5 Chris Smith 2012-02-24 17:49:22 UTC
(In reply to comment #4)
> but in any case, to understand a segfault, we need a backtrace as decribed in:
> http://www.gentoo.org/proj/en/qa/backtraces.xml

I should run the emerge within gdb?
Comment 6 Alexis Ballier gentoo-dev 2012-02-24 18:00:49 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > but in any case, to understand a segfault, we need a backtrace as decribed in:
> > http://www.gentoo.org/proj/en/qa/backtraces.xml
> 
> I should run the emerge within gdb?

(In reply to comment #0)
> /bin/sh: line 4:  2215 Segmentation fault      ./vlc-cache-gen ../modules
> make[2]: *** [../modules/plugins.dat] Error 139


segfaulting command is './vlc-cache-gen ../modules' so thats this one that shall be ran under gdb
Comment 7 Daniel Dewald 2012-03-03 01:31:05 UTC
I had this bug with vlc-9999 from git repository (2.1.0-git). After a painfull trail and error session of almost 2 hours I found out that removing the svg useflag fixed it for me! It most likely is a broken plugin. Hope this helps someone who has the same mess! If more data from my system configuration is needed just ask ;o).

Greetz

Daniel
Comment 8 Chris Smith 2012-03-31 16:20:58 UTC
Now on 2.0.1 bug still exists. If I change USE flags to "-libnotify -svg -xcb -xv" it will install. With any of those USE flags set I get the segfault.
Comment 9 Francesco Riosa 2012-05-09 21:18:24 UTC
Another incarnation of this bug:

1) vlc is built on a core i7 machine, all it's fine, this is a virtual server with appropriate *flags for a core2 cpu
2) using the pkg built @ 1) install it on a core2 it segfault with bus error
>>> Original instance of package unmerged safely.
 * Running /usr/lib64/vlc/vlc-cache-gen on /usr/lib64/vlc/plugins/
/var/tmp/portage/media-video/vlc-2.0.1/temp/environment: line 2901:   304 Errore di bus           "/usr/$(get_libdir)/vlc/vlc-c)/vlc/plugins/"
>>> media-video/vlc-2.0.1 merged.
3) enjoy knotify crash in kde, https://bugs.kde.org/show_bug.cgi?id=299707

the problematic plugin was /usr/lib64/vlc/plugins/access/libaccess_smb_plugin.so
re-emerging it @ core i7 box and reinstalling samba + vlc totally fix the problem
Comment 10 Francesco Riosa 2012-05-09 21:19:43 UTC
Program received signal SIGBUS, Bus error.
0x00007ffff7de73f3 in ?? () from /lib64/ld-linux-x86-64.so.2
(gdb) bt 
#0  0x00007ffff7de73f3 in ?? () from /lib64/ld-linux-x86-64.so.2
#1  0x00007ffff7dee6fd in ?? () from /lib64/ld-linux-x86-64.so.2
#2  0x00007ffff7dea236 in ?? () from /lib64/ld-linux-x86-64.so.2
#3  0x00007ffff7dedeba in ?? () from /lib64/ld-linux-x86-64.so.2
#4  0x00007ffff6cdff56 in ?? () from /lib64/libdl.so.2
#5  0x00007ffff7dea236 in ?? () from /lib64/ld-linux-x86-64.so.2
#6  0x00007ffff6ce04ef in ?? () from /lib64/libdl.so.2
#7  0x00007ffff6cdfff1 in dlopen () from /lib64/libdl.so.2
#8  0x00007ffff797efc1 in module_Load (p_this=0x604328, psz_file=<optimized out>, p_handle=0x7fffffffd1c0, lazy=<optimized out>) at posix/plugin.c:62
#9  0x00007ffff7969846 in module_InitDynamic (obj=0x604328, path=0x672120 "/usr/lib64/vlc/plugins/access/libaccess_smb_plugin.so", fast=<optimized out>)
    at modules/bank.c:536
#10 0x00007ffff7969b45 in AllocatePluginFile (st=0x7fffffffd210, relpath=0x66db10 "access/libaccess_smb_plugin.so", 
    abspath=0x672120 "/usr/lib64/vlc/plugins/access/libaccess_smb_plugin.so", bank=0x7fffffffd410) at modules/bank.c:479
#11 AllocatePluginDir (bank=0x7fffffffd410, maxdepth=3, absdir=<optimized out>, reldir=0x618b50 "access") at modules/bank.c:440
#12 0x00007ffff7969bee in AllocatePluginDir (bank=0x7fffffffd410, maxdepth=4, absdir=<optimized out>, reldir=0x0) at modules/bank.c:444
#13 0x00007ffff7969ecc in AllocatePluginPath (p_this=0x604328, path=0x635640 "/usr/lib64/vlc/plugins", mode=CACHE_RESET) at modules/bank.c:353
#14 0x00007ffff796a280 in AllocateAllPlugins (p_this=0x604328) at modules/bank.c:282
#15 module_LoadPlugins (obj=0x604328) at modules/bank.c:189
#16 0x00007ffff790c612 in libvlc_InternalInit (p_libvlc=0x604328, i_argc=4, ppsz_argv=0x7fffffffd7d0) at libvlc.c:247
#17 0x00007ffff7bcae19 in libvlc_new (argc=3, argv=<optimized out>) at core.c:59
#18 0x0000000000400985 in main (argc=3, argv=<optimized out>) at cachegen.c:107
(gdb) quit
Comment 11 Carl Michal 2012-08-18 20:14:30 UTC
Here's some more clues:

I only see  this problem with nvidia video drivers.

If I: eselect opengl set xorg-x11
before building vlc, it builds with no problem.

With nvidia opengl, vlc-cache-gen dies with a Segmentation fault if svg or libnotify is enabled. With current eselect-opengl (1.2.5-r1), the vlc-2.0.1 build dies while building its xcb library.

With the vidia opengl and USE=svg or libnotify, vlc-cache-gen dies and dmesg shows:

vlc-cache-gen[15233]: segfault at 7f31da30e9d0 ip 00007f31da30e9d0 sp 00007fff310a5418 error 14 in libexpat.so.1.6.0[7f31dcd47000+26000]

What's really weird though is that if I run vlc-cache-gen with strace, it doesn't crash.
Comment 12 Carl Michal 2012-08-18 20:16:55 UTC
*** Bug 431818 has been marked as a duplicate of this bug. ***
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-11 15:42:29 UTC
*** Bug 469236 has been marked as a duplicate of this bug. ***
Comment 14 Helmut Jarausch 2013-05-29 07:41:10 UTC
Just for the record.

The seems to be related to the qt4 gui.
I have just emerged vlc-2.0.7 with USE=-qt4 .
It seems to work just fine ( "just" without a gui ).
Comment 15 Jeroen Roovers (RETIRED) gentoo-dev 2013-05-31 16:48:22 UTC
*** Bug 471918 has been marked as a duplicate of this bug. ***
Comment 16 白川間瀬流 2013-07-28 08:31:18 UTC
So i also hit in this bug and i can say,

it worked perfectly for me until now.

Since the last update of my system, VLC is not building anymore.

These are the changes from the last update

gnome-base/gnome-common-3.7.4
sys-fs/dosfstools-3.0.22
dev-libs/re2-0_p20130712
media-libs/libid3tag-0.15.1b-r3
dev-python/setuptools-0.9.8
dev-libs/libgcrypt-1.5.3
app-office/libreoffice-l10n-4.1.0.4
dev-libs/gobject-introspection-common-1.36.0
media-libs/libpng-1.6.3
dev-libs/icu-51.2
dev-libs/libxml2-2.9.1-r1
sys-apps/help2man-1.43.3
sys-kernel/vanilla-sources-3.10.3
dev-lang/nacl-toolchain-newlib-0_p11846
media-libs/fontconfig-2.10.92
sys-boot/grub-2.00-r4
sys-apps/kmod-14-r1
x11-proto/videoproto-2.3.2
sys-power/acpid-2.0.19
app-text/libmspub-0.0.6
x11-libs/libXfont-1.4.6
media-libs/libvisio-0.0.30
media-libs/raptor-2.0.9
net-misc/dhcpcd-6.0.3
media-libs/libcdr-0.0.14
sys-apps/lm_sensors-3.3.4
x11-misc/makedepend-1.0.5
mail-mta/nullmailer-1.13
dev-libs/nss-3.15.1
net-misc/openssh-6.2_p2-r3
dev-libs/glib-2.36.3-r1
media-video/ffmpeg-1.2.1
x11-libs/cairo-1.12.14-r4
dev-libs/gobject-introspection-1.36.0
sys-apps/gptfdisk-0.8.6
x11-libs/libpciaccess-0.13.2
dev-libs/atk-2.8.0
app-accessibility/at-spi2-core-2.8.0
media-libs/harfbuzz-0.9.18-r1
dev-python/pygobject-3.8.3
dev-qt/qtcore-4.8.5
sys-fs/udev-206
x11-libs/pango-1.34.1
app-accessibility/at-spi2-atk-2.8.1
dev-qt/qtscript-4.8.5
virtual/udev-206
dev-qt/qtgui-4.8.5
sys-apps/hwids-20130717-r1
app-misc/media-player-info-21
dev-libs/libwacom-0.7
dev-qt/qtsql-4.8.5
dev-qt/qt3support-4.8.5
dev-qt/qttest-4.8.5
dev-qt/qtsvg-4.8.5
dev-qt/qtopengl-4.8.5
dev-qt/qtdbus-4.8.5
net-print/cups-1.6.3-r2
dev-qt/qtxmlpatterns-4.8.5
app-office/akonadi-server-1.10.2
dev-qt/qtdeclarative-4.8.5
x11-libs/gtk+-3.8.2
dev-qt/designer-4.8.5
dev-qt/qtwebkit-4.8.5
www-plugins/adobe-flash-11.2.202.297-r1
sys-auth/consolekit-0.4.6
sys-power/upower-0.9.21
kde-base/kdelibs-4.10.5-r1
kde-base/kdm-4.10.5-r1
kde-base/plasma-workspace-4.10.5-r2
www-client/chromium-29.0.1547.32
app-emulation/wine-1.6
app-office/libreoffice-4.1.0.4

after i updated those packages, VLC is not compiling anymore.

I have an radeon using fglrx/catalyst
Comment 17 白川間瀬流 2013-07-28 08:31:59 UTC
Sorry for unsorted output, here again

app-accessibility/at-spi2-atk-2.8.1
app-accessibility/at-spi2-core-2.8.0
app-emulation/wine-1.6
app-misc/media-player-info-21
app-office/akonadi-server-1.10.2
app-office/libreoffice-4.1.0.4
app-office/libreoffice-l10n-4.1.0.4
app-text/libmspub-0.0.6
dev-lang/nacl-toolchain-newlib-0_p11846
dev-libs/atk-2.8.0
dev-libs/glib-2.36.3-r1
dev-libs/gobject-introspection-1.36.0
dev-libs/gobject-introspection-common-1.36.0
dev-libs/icu-51.2
dev-libs/libgcrypt-1.5.3
dev-libs/libwacom-0.7
dev-libs/libxml2-2.9.1-r1
dev-libs/nss-3.15.1
dev-libs/re2-0_p20130712
dev-python/pygobject-3.8.3
dev-python/setuptools-0.9.8
dev-qt/designer-4.8.5
dev-qt/qt3support-4.8.5
dev-qt/qtcore-4.8.5
dev-qt/qtdbus-4.8.5
dev-qt/qtdeclarative-4.8.5
dev-qt/qtgui-4.8.5
dev-qt/qtopengl-4.8.5
dev-qt/qtscript-4.8.5
dev-qt/qtsql-4.8.5
dev-qt/qtsvg-4.8.5
dev-qt/qttest-4.8.5
dev-qt/qtwebkit-4.8.5
dev-qt/qtxmlpatterns-4.8.5
gnome-base/gnome-common-3.7.4
kde-base/kdelibs-4.10.5-r1
kde-base/kdm-4.10.5-r1
kde-base/plasma-workspace-4.10.5-r2
mail-mta/nullmailer-1.13
media-libs/fontconfig-2.10.92
media-libs/harfbuzz-0.9.18-r1
media-libs/libcdr-0.0.14
media-libs/libid3tag-0.15.1b-r3
media-libs/libpng-1.6.3
media-libs/libvisio-0.0.30
media-libs/raptor-2.0.9
media-video/ffmpeg-1.2.1
net-misc/dhcpcd-6.0.3
net-misc/openssh-6.2_p2-r3
net-print/cups-1.6.3-r2
sys-apps/gptfdisk-0.8.6
sys-apps/help2man-1.43.3
sys-apps/hwids-20130717-r1
sys-apps/kmod-14-r1
sys-apps/lm_sensors-3.3.4
sys-auth/consolekit-0.4.6
sys-boot/grub-2.00-r4
sys-fs/dosfstools-3.0.22
sys-fs/udev-206
sys-kernel/vanilla-sources-3.10.3
sys-power/acpid-2.0.19
sys-power/upower-0.9.21
virtual/udev-206
www-client/chromium-29.0.1547.32
www-plugins/adobe-flash-11.2.202.297-r1
x11-libs/cairo-1.12.14-r4
x11-libs/gtk+-3.8.2
x11-libs/libpciaccess-0.13.2
x11-libs/libXfont-1.4.6
x11-libs/pango-1.34.1
x11-misc/makedepend-1.0.5
x11-proto/videoproto-2.3.2
Comment 18 William Seager 2013-08-02 15:58:40 UTC
I have the same problem. As noted above, using
USE=-svg "solved" it and vlc built ...
Comment 19 Jason Lamb 2013-08-02 19:32:40 UTC
I have a similar situation now. My normal vlc USE flags have been;

media-video/vlc-2.0.7  USE="X a52 aac alsa avcodec avformat bluray cdda cddb dbus dts dvbpsi dvd egl encode ffmpeg flac fluidsynth fontconfig gcrypt kde libass libnotify matroska mmx mp3 mpeg mtp ncurses ogg opengl opus png postproc projectm qt4 rtsp samba schroedinger sdl skins speex sse svg* swscale theora truetype twolame udev v4l vorbis x264 xcb xml xv

And it had emerged cleanly as of Sat Jun 22 2013 20:23:24EST. When I tried re-emerging this today, I received the same segmentation fault reported in this bug report. So I removed the libnotify USE flag, and while it it emerges without error, upon trying to run vlc from the command line I get;

vlc
VLC media player 2.0.7 Twoflower (revision 2.0.6-54-g7dd7e4d)
Segmentation fault

If I then re-emerge vlc without the libnotify and svg USE flags, then it will emerge without error and run, but trying to select any video file again generates a segmentation fault like;

vlc
VLC media player 2.0.7 Twoflower (revision 2.0.6-54-g7dd7e4d)
[0x20aa138] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0x20e1df8] qt4 interface error: Unable to load extensions module
"/org/freedesktop/UDisks2/drives/[snip]" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/[snip]" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/[snip]" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/[snip]" : property "Drive" does not exist 
"/org/freedesktop/UDisks2/drives/[snip]" : property "Drive" does not exist 
kfilemodule(13314) KSambaSharePrivate::testparmParamValue: We got some errors while running testparm "Load smb config files from /etc/samba/smb.conf
Error loading services.
" 
kfilemodule(13314) KSambaSharePrivate::findSmbConf: KSambaShare: Could not find smb.conf! 
Segmentation fault

If I re-emerge vlc without the USE flag qt4, then it emerges cleanly, and will play files correctly. It simply does this without a GUI. Note, this is with the libnotify and svg USE flags back on. Also the samba USE flag, and rebuilding samba, had no effect on my system.
Comment 20 Denis M. (Phr33d0m) 2013-08-03 13:14:55 UTC
*** Bug 384313 has been marked as a duplicate of this bug. ***
Comment 21 Denis M. (Phr33d0m) 2013-08-03 14:08:50 UTC
Lets summarize all these bugs reported about the same problem.
Here are my default USE flags for vlc (excluding 'debug'):
[ebuild   R    ] media-video/vlc-2.0.7  USE="X a52 aac alsa avcodec avformat bidi bluray dbus debug dts dvbpsi dvd encode ffmpeg flac fontconfig gcrypt gnutls kde libass libnotify live matroska mmx mp3 mpeg ncurses ogg opengl png postproc pulseaudio qt4 sdl sse svg swscale theora truetype udev vaapi vlm vorbis x264 xcb xml xv -aalib (-altivec) -atmo (-audioqueue) -avahi -cdda -cddb -dc1394 -dirac (-direct2d) -directfb (-directx) (-dshow) -dvb (-dxva2) -egl -fbosd -fluidsynth -gme -gnome -growl -httpd -ieee1394 (-ios-vout) -jack -kate -libcaca -libproxy -libsamplerate -libtar -libtiger -linsys -lirc -lua (-macosx) (-macosx-audio) (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-macosx-vout) (-media-library) -modplug -mtp -musepack (-neon) -omxil -optimisememory -opus -oss -portaudio -projectm -pvr -rtsp -run-as-root -samba -schroedinger -sdl-image -shine -shout -sid -skins -speex -sqlite -switcher -taglib -twolame -upnp -v4l -vcdx (-waveout) (-wingdi) -wma-fixed -xosd -zvbi" 0 kB


[1] For some people, vlc-cache-gen will segfault running at build time and won't allow proper emerge (example: USE="svg"):
/bin/sh: line 4: 29759 Segmentation fault      ./vlc-cache-gen ../modules
make[2]: *** [../modules/plugins.dat] Error 139
make[2]: Leaving directory `/var/tmp/portage/media-video/vlc-2.0.7/work/vlc-2.0.7/bin'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-video/vlc-2.0.7/work/vlc-2.0.7'
make: *** [all] Error 2

[2] For some people, vlc-cache-gen won't segfault running at build time and will allow proper emerge but vlc-cache-gen will still segfault after that (example: USE="-svg").
 * Running /usr/lib64/vlc/vlc-cache-gen on /usr/lib64/vlc/plugins/
/var/tmp/portage/media-video/vlc-2.0.7/temp/environment: line 3237: 20264 Segmentation fault      "/usr/$(get_libdir)/vlc/vlc-cache-gen" -f "/usr/$(get_libdir)/vlc/plugins/"
>>> media-video/vlc-2.0.7 merged.


With [2] after emerge, if you try to manually do `/usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugins` you'll get the same segfault as on build time with [1].
The segfault for [1] and [2] is the same so "we" (i.e. I) currently have no idea why removing (for example) svg support allows a proper emerge(?)


Here's a `bt` from vlc-cache-gen:

Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
164     ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.
(gdb) bt
#0  __strcmp_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:164
#1  0x00007fffef53ca7f in g_str_equal (v1=<optimized out>, v2=<optimized out>) at ghash.c:1706
#2  0x00007fffef53c284 in g_hash_table_lookup_node (hash_return=<synthetic pointer>, key=0x7fffec68b513, hash_table=0x750c00) at ghash.c:386
#3  g_hash_table_lookup (hash_table=0x750c00, key=key@entry=0x7fffec68b513) at ghash.c:1076
#4  0x00007fffef558d2f in quark_from_string (duplicate=0, string=0x7fffec68b513 "-g-type-private--GTypeFlags") at gquark.c:173
#5  g_quark_from_static_string (string=string@entry=0x7fffec68b513 "-g-type-private--GTypeFlags") at gquark.c:239
#6  0x00007fffec67ff68 in gobject_init_ctor () at gtype.c:4365
#7  0x00007ffff7de9b46 in call_init (env=0x6042c0, argv=0x7fffffffe608, argc=3, l=<optimized out>) at dl-init.c:84
#8  call_init (l=<optimized out>, argc=3, argv=0x7fffffffe608, env=0x6042c0) at dl-init.c:34
#9  0x00007ffff7de9c2a in _dl_init (main_map=main_map@entry=0x776bb0, argc=3, argv=0x7fffffffe608, env=0x6042c0) at dl-init.c:133
#10 0x00007ffff7dedcd9 in dl_open_worker (a=a@entry=0x7fffffffddc8) at dl-open.c:566
#11 0x00007ffff7de9986 in _dl_catch_error (objname=objname@entry=0x7fffffffddb8, errstring=errstring@entry=0x7fffffffddc0, mallocedp=mallocedp@entry=0x7fffffffddb7, 
    operate=operate@entry=0x7ffff7ded960 <dl_open_worker>, args=args@entry=0x7fffffffddc8) at dl-error.c:177
#12 0x00007ffff7ded509 in _dl_open (file=0x779780 "/usr/lib64/vlc/plugins/notify/libnotify_plugin.so", mode=-2147483647, caller_dlopen=<optimized out>, nsid=-2, argc=3, argv=0x7fffffffe608, env=0x6042c0)
    at dl-open.c:656
#13 0x00007ffff6cde1e6 in dlopen_doit (a=a@entry=0x7fffffffdfd0) at dlopen.c:66
#14 0x00007ffff7de9986 in _dl_catch_error (objname=0x618df0, errstring=0x618df8, mallocedp=0x618de8, operate=0x7ffff6cde180 <dlopen_doit>, args=0x7fffffffdfd0) at dl-error.c:177
#15 0x00007ffff6cde78c in _dlerror_run (operate=operate@entry=0x7ffff6cde180 <dlopen_doit>, args=args@entry=0x7fffffffdfd0) at dlerror.c:163
#16 0x00007ffff6cde281 in __dlopen (file=<optimized out>, mode=<optimized out>) at dlopen.c:87
#17 0x00007ffff797fa31 in module_Load (p_this=p_this@entry=0x6044c8, psz_file=psz_file@entry=0x779780 "/usr/lib64/vlc/plugins/notify/libnotify_plugin.so", p_handle=p_handle@entry=0x7fffffffe038, 
    lazy=<optimized out>) at posix/plugin.c:62
#18 0x00007ffff796a1b2 in module_InitDynamic (obj=0x6044c8, path=0x779780 "/usr/lib64/vlc/plugins/notify/libnotify_plugin.so", fast=<optimized out>) at modules/bank.c:536
#19 0x00007ffff796a5ab in AllocatePluginFile (st=<optimized out>, relpath=<optimized out>, abspath=<optimized out>, bank=<optimized out>) at modules/bank.c:479
#20 AllocatePluginDir (bank=0x7fffffffe270, maxdepth=3966285075, absdir=0x3c <Address 0x3c out of bounds>, reldir=0x618cf0 "notify") at modules/bank.c:440
#21 0x00007ffff796a56d in AllocatePluginDir (bank=0x7fffffffe270, maxdepth=3966285075, maxdepth@entry=5, absdir=0x3c <Address 0x3c out of bounds>, absdir@entry=0x6357e0 "/usr/lib64/vlc/plugins", reldir=0x0)
    at modules/bank.c:444
#22 0x00007ffff796a6fb in AllocatePluginPath (p_this=p_this@entry=0x6044c8, path=0x6357e0 "/usr/lib64/vlc/plugins", mode=mode@entry=CACHE_RESET) at modules/bank.c:353
#23 0x00007ffff796abc5 in AllocateAllPlugins (p_this=0x6044c8) at modules/bank.c:298
#24 module_LoadPlugins (obj=obj@entry=0x6044c8) at modules/bank.c:189
#25 0x00007ffff790c28b in libvlc_InternalInit (p_libvlc=p_libvlc@entry=0x6044c8, i_argc=i_argc@entry=4, ppsz_argv=ppsz_argv@entry=0x7fffffffe450) at libvlc.c:247
#26 0x00007ffff7bc8eaa in libvlc_new (argc=argc@entry=3, argv=argv@entry=0x7fffffffe4d0) at core.c:59
#27 0x0000000000400bd8 in main (argc=3, argv=0x7fffffffe608) at cachegen.c:107

For full backtrace, see the attached `vlc-cache-gen bt-full.log` file.


Looking at the backtrace, it seems something's wrong with libnotify. If we emerge vlc with USE="-libnotify -svg" the segfaulting disappears.

As we can see from bug 385109, this has happened even with vlc-1.1.11 and glibc-2.{13,14}.
Comment 22 Denis M. (Phr33d0m) 2013-08-03 14:09:48 UTC
Created attachment 355030 [details]
vlc-cache-gen bt-full.log
Comment 23 Captain Crutches 2013-08-04 23:55:10 UTC
Unfortunately, I seem to have this problem even with VLC compiled with -libnotify and -svg... Emerges fine, but segfaults as soon as I try to open a file.

Backtrace from segfault: http://bpaste.net/raw/119996/
emerge --info: http://bpaste.net/raw/119997/

VLC Installed versions:  2.0.7(07:53:55 PM 08/04/2013)(X a52 aac aalib alsa avcodec avformat cdda dbus dvbpsi dvd encode ffmpeg flac gcrypt kde libass lua matroska mmx mp3 mpeg musepack ncurses ogg opengl png postproc pulseaudio qt4 samba sdl speex sqlite sse swscale theora truetype udev v4l vorbis x264 xcb xml xv -altivec -atmo -audioqueue -avahi -bidi -bluray -cddb -dc1394 -debug -dirac -direct2d -directfb -directx -dshow -dts -dvb -dxva2 -egl -fbosd -fluidsynth -fontconfig -gme -gnome -gnutls -growl -httpd -ieee1394 -ios-vout -jack -kate -libcaca -libnotify -libproxy -libsamplerate -libtar -libtiger -linsys -lirc -live -macosx -macosx-audio -macosx-dialog-provider -macosx-eyetv -macosx-qtkit -macosx-quartztext -macosx-vout -media-library -modplug -mtp -neon -omxil -optimisememory -opus -oss -portaudio -projectm -pvr -rtsp -run-as-root -schroedinger -sdl-image -shine -shout -sid -skins -svg -switcher -taglib -twolame -upnp -vaapi -vcdx -vlm -waveout -wingdi -wma-fixed -xosd -zvbi ELIBC="glibc")

glibc Installed versions:  2.15-r4(2.2)^s(03:57:33 PM 07/04/2013)(gd multilib -debug -hardened -profile -selinux -vanilla CROSSCOMPILE_OPTS="-headers-only")
Comment 24 Derk W te Bokkel 2013-08-05 00:13:44 UTC
I've been monkeying about with this as well and setting the svg flag alone triggers the failure for me.

Calculating dependencies... done!
[ebuild   R    ] media-video/vlc-2.0.7  USE="X a52 aac alsa avcodec avformat cdda cddb dbus dvbpsi dvd encode flac gcrypt gnutls libnotify live mmx mp3 mpeg ncurses ogg opengl opus png postproc qt4 samba sqlite sse swscale theora truetype twolame udev v4l vaapi vorbis wma-fixed x264 xcb xosd xv -aalib (-altivec) -atmo (-audioqueue) -avahi -bidi -bluray -dc1394 -debug -dirac (-direct2d) -directfb (-directx) (-dshow) -dts -dvb (-dxva2) -egl -fbosd -ffmpeg -fluidsynth -fontconfig -gme -gnome -growl -httpd -ieee1394 (-ios-vout) -jack -kate -kde -libass -libcaca -libproxy -libsamplerate -libtar -libtiger -linsys -lirc -lua (-macosx) (-macosx-audio) (-macosx-dialog-provider) (-macosx-eyetv) (-macosx-qtkit) (-macosx-quartztext) (-macosx-vout) -matroska (-media-library) -modplug -mtp -musepack (-neon) -omxil -optimisememory -oss -portaudio -projectm -pulseaudio -pvr -rtsp -run-as-root -schroedinger -sdl -sdl-image -shine -shout -sid -skins -speex -svg -switcher -taglib -upnp -vcdx -vlm (-waveout) (-wingdi) -xml -zvbi" 0 kB
Comment 25 Denis M. (Phr33d0m) 2013-08-05 01:10:30 UTC
(In reply to Captain Crutches from comment #23)
> Unfortunately, I seem to have this problem even with VLC compiled with
> -libnotify and -svg... Emerges fine, but segfaults as soon as I try to open
> a file.
Please open a different bug for that one. It's probably not related to the vlc-cache-gen problem here.
Comment 26 Captain Crutches 2013-08-05 01:40:51 UTC
(In reply to Denis M. (Phr33d0m) from comment #25)
> (In reply to Captain Crutches from comment #23)
> > Unfortunately, I seem to have this problem even with VLC compiled with
> > -libnotify and -svg... Emerges fine, but segfaults as soon as I try to open
> > a file.
> Please open a different bug for that one. It's probably not related to the
> vlc-cache-gen problem here.

Hm, okay. Thought it was, as "/usr/lib64/vlc/vlc-cache-gen -f /usr/lib64/vlc/plugins/" still segfaults.
Comment 27 Denis M. (Phr33d0m) 2013-08-05 02:20:09 UTC
(In reply to Captain Crutches from comment #26)
> Hm, okay. Thought it was, as "/usr/lib64/vlc/vlc-cache-gen -f
> /usr/lib64/vlc/plugins/" still segfaults.
I do believe these are different bugs. For example, debugging this bug (vlc-cache-gen) I found another in which vlc segfaults if you use the "Open File" dialogue and then close vlc normally. But that's a different story.

Before submitting your bug, get a meaningful backtrace. The one from your comment 23 is, unfortunately, completely useless.
Comment 28 Captain Crutches 2013-08-05 02:26:32 UTC
(In reply to Denis M. (Phr33d0m) from comment #27)
> (In reply to Captain Crutches from comment #26)
> > Hm, okay. Thought it was, as "/usr/lib64/vlc/vlc-cache-gen -f
> > /usr/lib64/vlc/plugins/" still segfaults.
> I do believe these are different bugs. For example, debugging this bug
> (vlc-cache-gen) I found another in which vlc segfaults if you use the "Open
> File" dialogue and then close vlc normally. But that's a different story.
> 
> Before submitting your bug, get a meaningful backtrace. The one from your
> comment 23 is, unfortunately, completely useless.

Indeed, the segfault also occurs when opening a file through the "open recent" list, the "open file" dialog, or just double-clicking a file with vlc set as the default program.  I may, however, have found my bug in #463558, so I've watched it and thrown my hat in that ring just in case.

For the record, how should I go about getting a more meaningful backtrace?  That one comes from a "bt" just after segfaulting in gdb.

Sorry for looking like a noob here... I'm rather new to the whole Gentoo/bug-reporting thing.
Comment 29 Denis M. (Phr33d0m) 2013-08-05 03:01:04 UTC
*** Bug 463558 has been marked as a duplicate of this bug. ***
Comment 30 Captain Crutches 2013-08-05 04:03:04 UTC
Interestingly, Steam has also begun segfaulting recently... I suspect since upgrading glib to 2.36, as others seem to suspect that upgrade as what's broken VLC.

So perhaps the problem isn't solely with VLC, but either with glib itself, or that VLC is one of many other programs that need to change to work with the new glib version.
Comment 31 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-08-05 08:25:10 UTC
*** Bug 479798 has been marked as a duplicate of this bug. ***
Comment 32 Cédric Delmas 2013-08-05 11:21:31 UTC
I have the same problem with VLC 2.0.7. It seems that the problem comes from glib 2.36 and the dynamic modules of VLC (at least libnotify_plugin.so and libsvg_plugin.so).

In glib 2.36, the libgobject-2.0.so.0 deprecates functions g_type_init_with_debug_flags() and g_type_init() and uses an automatic constructor. This initialization creates/looks for some Quarks (association between string and integer identifier) using static strings as key; these Quarks are managed by the libglib-2.0.so.0.

When vlc-cache-gen starts, it loads and unloads plugins libnotify_plugin.so and libsvg_plugin.so which both (indirectly) depend on libgobject-2.0.so.0. When each plugin is loaded, the library libgobject-2.0.so.0 is also loaded, the constructor is called then the lib and the plugin are unloaded. However the libglib-2.0.so.0 seems to be kept between load and unload thus the Quarks are not destroyed. As they refers to static strings in libgobject-2.0.so.0, these pointers became dangling when this library is loaded at another location and this leads to segmentation fault.

I could run vlc-cache-gen by replacing g_quark_from_static_string() by g_quark_from_string() and g_intern_static_string() by g_intern_string() in the gobject library. I don't known if something can be done in vlc directly.
Comment 33 Rafał Mużyło 2013-08-05 15:08:55 UTC
*** Bug 479836 has been marked as a duplicate of this bug. ***
Comment 34 Jason Lamb 2013-08-05 19:16:53 UTC
I reported this in a related Gentoo User Forum;

https://forums.gentoo.org/viewtopic-t-966108.html

Based on franzf's suggestion there I forced a re-emerge of dev-qt/qtcore-4.8.5 and dev-qt/qtgui-4.8.5 without the glib USE flag. I then emerged media-video/vlc-2.0.7 with my normal USE flags (including svg and libnotify), and it emerged without error. Running vlc from the GUI or command line, now operates normally. I then followed that by re-emerging dev-qt/qtcore-4.8.5 and dev-qt/qtgui-4.8.5 with the glib USE flag enabled and media-video/vlc-2.0.7 continues to work normally.
Comment 35 Captain Crutches 2013-08-06 02:03:50 UTC
(In reply to Jason Lamb from comment #34)
> I reported this in a related Gentoo User Forum;
> 
> https://forums.gentoo.org/viewtopic-t-966108.html
> 
> Based on franzf's suggestion there I forced a re-emerge of
> dev-qt/qtcore-4.8.5 and dev-qt/qtgui-4.8.5 without the glib USE flag. I then
> emerged media-video/vlc-2.0.7 with my normal USE flags (including svg and
> libnotify), and it emerged without error. Running vlc from the GUI or
> command line, now operates normally. I then followed that by re-emerging
> dev-qt/qtcore-4.8.5 and dev-qt/qtgui-4.8.5 with the glib USE flag enabled
> and media-video/vlc-2.0.7 continues to work normally.

Confirmed.  I did

>emerge --unmerge qtcore qtgui
>USE="$USE -glib" emerge -a1v qtcore qtgui
>emerge -av vlc

and VLC installed and ran fine, with no segfaults.  A subsequent

>emerge -auDNv world

to reset the flag (which only rebuilt qtcore and qtgui) and it still works.  Thank you!
Comment 36 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-06 12:23:51 UTC
*** Bug 479898 has been marked as a duplicate of this bug. ***
Comment 37 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-08-12 06:41:18 UTC
*** Bug 480684 has been marked as a duplicate of this bug. ***
Comment 38 Franz Trischberger 2013-08-12 13:22:29 UTC
As this seems to hit quite some people now:
1) Simply rebuilding qtcore and qtgui seems to not work. Issue in the qt build system? (e.g. using libs/information/... from the already existing installation and not the currently running build)
2) Uninstalling qtcore/qtgui + reinstalling or installing them once with USE="-glib" seems to fix the issue.

Can 1) get fixed?
Can we get an einfo after building >=glib-2.36, that it might be needed to rebuild as described in 2), at least until a proper fix has been worked out?
Does anyone know this only is an issue with vlc? Are there any other apps that fail due to static vs local data in libglib? (if that's the root of this issue).
Is it possible to fix the issue inside vlc to keep people from running into this issue?
Comment 39 Sebastian Rose 2013-08-12 15:11:48 UTC
*** Bug 480702 has been marked as a duplicate of this bug. ***
Comment 40 Sebastian Rose 2013-08-12 15:14:13 UTC
(In reply to Franz Fellner from comment #38)
> As this seems to hit quite some people now:
> Are there any other apps
> that fail due to static vs local data in libglib? (if that's the root of
> this issue).

It hit me with Amarok, see Bug 480702
Comment 41 Stefan G. Weichinger 2013-08-13 09:06:09 UTC
(In reply to Captain Crutches from comment #35)
> Confirmed.  I did
> 
> >emerge --unmerge qtcore qtgui
> >USE="$USE -glib" emerge -a1v qtcore qtgui
> >emerge -av vlc
> 
> and VLC installed and ran fine, with no segfaults.  A subsequent
> 
> >emerge -auDNv world
> 
> to reset the flag (which only rebuilt qtcore and qtgui) and it still works. 
> Thank you!

Did the same and got a working VLC as well. Thanks so far.
Comment 42 Juergen Rose 2013-08-13 10:03:41 UTC
(In reply to Franz Fellner from comment #38)
> As this seems to hit quite some people now:
> 1) Simply rebuilding qtcore and qtgui seems to not work. Issue in the qt
> build system? (e.g. using libs/information/... from the already existing
> installation and not the currently running build)
> 2) Uninstalling qtcore/qtgui + reinstalling or installing them once with
> USE="-glib" seems to fix the issue.
> 
> Can 1) get fixed?
> Can we get an einfo after building >=glib-2.36, that it might be needed to
> rebuild as described in 2), at least until a proper fix has been worked out?
> Does anyone know this only is an issue with vlc? Are there any other apps
> that fail due to static vs local data in libglib? (if that's the root of
> this issue).
> Is it possible to fix the issue inside vlc to keep people from running into
> this issue?


'USE=-glib emerge qtcore qtgui' fails here with:


 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

Calculating dependencies... done!
[ebuild   R    ] dev-qt/qtcore-4.8.5  USE="-glib*" 
[ebuild   R    ] dev-qt/qtgui-4.8.5  USE="-glib*" 

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-qt/qtcore:4

  (dev-qt/qtcore-4.8.5::gentoo, ebuild scheduled for merge) pulled in by
    ~dev-qt/qtcore-4.8.5[aqua=,debug=,glib=,qt3support=] required by (dev-qt/qtgui-4.8.5::gentoo, ebuild scheduled for merge)

  (dev-qt/qtcore-4.8.5::gentoo, installed) pulled in by
    dev-qt/qtcore:4[glib] required by (sys-auth/polkit-qt-0.103.0::gentoo, installed)
    >=dev-qt/qtcore-4.6.0:4[glib] required by (media-libs/phonon-gstreamer-4.6.3::gentoo, installed)
    ~dev-qt/qtcore-4.8.5[aqua=,debug=,glib=,qt3support=] required by (dev-qt/qtgui-4.8.5::gentoo, installed)

dev-qt/qtgui:4

  (dev-qt/qtgui-4.8.5::gentoo, installed) pulled in by
    >=dev-qt/qtgui-4.6.0:4[glib] required by (media-libs/phonon-gstreamer-4.6.3::gentoo, installed)
    dev-qt/qtgui:4[glib] required by (sys-auth/polkit-qt-0.103.0::gentoo, installed)
    ~dev-qt/qtgui-4.8.5[aqua=,debug=,glib=,qt3support] required by (dev-qt/qtcore-4.8.5::gentoo, installed)

  (dev-qt/qtgui-4.8.5::gentoo, ebuild scheduled for merge) pulled in by
    ~dev-qt/qtgui-4.8.5[aqua=,debug=,glib=,qt3support] required by (dev-qt/qtcore-4.8.5::gentoo, ebuild scheduled for merge)


It might be possible to solve these slot collisions
by applying all of the following changes:
   - dev-qt/qtcore-4.8.5 (Change USE: +glib)
   - dev-qt/qtgui-4.8.5 (Change USE: +glib)


Any hint?
Comment 43 Sebastian Rose 2013-08-13 10:07:01 UTC
(In reply to Juergen Rose from comment #42)
> 'USE=-glib emerge qtcore qtgui' fails here with:
> 
> 
>  * IMPORTANT: 1 news items need reading for repository 'gentoo'.
>  * Use eselect news to read news items.
> 
> Calculating dependencies... done!
> [ebuild   R    ] dev-qt/qtcore-4.8.5  USE="-glib*" 
> [ebuild   R    ] dev-qt/qtgui-4.8.5  USE="-glib*" 
> 
> !!! Multiple package instances within a single package slot have been pulled
> !!! into the dependency graph, resulting in a slot conflict:
> 
> dev-qt/qtcore:4
> 
>   (dev-qt/qtcore-4.8.5::gentoo, ebuild scheduled for merge) pulled in by
>     ~dev-qt/qtcore-4.8.5[aqua=,debug=,glib=,qt3support=] required by
> (dev-qt/qtgui-4.8.5::gentoo, ebuild scheduled for merge)
> 
>   (dev-qt/qtcore-4.8.5::gentoo, installed) pulled in by
>     dev-qt/qtcore:4[glib] required by (sys-auth/polkit-qt-0.103.0::gentoo,
> installed)
>     >=dev-qt/qtcore-4.6.0:4[glib] required by
> (media-libs/phonon-gstreamer-4.6.3::gentoo, installed)
>     ~dev-qt/qtcore-4.8.5[aqua=,debug=,glib=,qt3support=] required by
> (dev-qt/qtgui-4.8.5::gentoo, installed)
> 
> dev-qt/qtgui:4
> 
>   (dev-qt/qtgui-4.8.5::gentoo, installed) pulled in by
>     >=dev-qt/qtgui-4.6.0:4[glib] required by
> (media-libs/phonon-gstreamer-4.6.3::gentoo, installed)
>     dev-qt/qtgui:4[glib] required by (sys-auth/polkit-qt-0.103.0::gentoo,
> installed)
>     ~dev-qt/qtgui-4.8.5[aqua=,debug=,glib=,qt3support] required by
> (dev-qt/qtcore-4.8.5::gentoo, installed)
> 
>   (dev-qt/qtgui-4.8.5::gentoo, ebuild scheduled for merge) pulled in by
>     ~dev-qt/qtgui-4.8.5[aqua=,debug=,glib=,qt3support] required by
> (dev-qt/qtcore-4.8.5::gentoo, ebuild scheduled for merge)
> 
> 
> It might be possible to solve these slot collisions
> by applying all of the following changes:
>    - dev-qt/qtcore-4.8.5 (Change USE: +glib)
>    - dev-qt/qtgui-4.8.5 (Change USE: +glib)
> 
> 
> Any hint?

Yup. Add the --nodeps (-O) option.
Comment 44 Juergen Rose 2013-08-13 10:21:42 UTC
Thanks Sebastion,

(In reply to Sebastian Rose from comment #43)
> (In reply to Juergen Rose from comment #42)
> > 'USE=-glib emerge qtcore qtgui' fails here with:
> > 

> > 
> > Any hint?
> 
> Yup. Add the --nodeps (-O) option.

I found in between that 'emerge -C phonon-gstreamer polkit-qt;   USE=-glib emerge -v1 qtcore qtgui' works, too.
Comment 45 Jason Lamb 2013-08-13 14:30:52 UTC
I just went through this process to rebuild vlc again, after failing again to emerge normally after my system's update to dev-libs/glib-2.36.3-r2. Here are the emerge commands that worked for my system;

emerge --unmerge qtcore qtgui
USE="-glib" emerge --oneshot --nodeps --verbose qtcore qtgui
emerge --verbose vlc
emerge --oneshot --verbose qtcore qtgui

For whatever reason, when I tried;

USE="$USE -glib" emerge --oneshot --nodeps --verbose qtcore qtgui

qtcore would emerge without issue, but qtgui failed to emerge.

Good Luck..
Comment 46 Captain Crutches 2013-08-13 17:52:15 UTC
(In reply to Sebastian Rose from comment #40)
> (In reply to Franz Fellner from comment #38)
> > As this seems to hit quite some people now:
> > Are there any other apps
> > that fail due to static vs local data in libglib? (if that's the root of
> > this issue).
> 
> It hit me with Amarok, see Bug 480702

Steam also seems to have begun segfaulting for me, but I tried the fix posted in #34 on that too and it didn't work.  It seems to check for updates and then crash, I'm not sure why.
Comment 47 SpanKY gentoo-dev 2013-08-14 21:42:54 UTC
here's another horrible way to hack around it: force vlc to link against gobject so that it always stays resident.  make sure to do it before autotools runs during the vlc emerge.  this way you don't have to rebuild qt and other random libs.

sed -i \
  -e '/^vlc_LDADD =/s:=:= -lgobject-2.0 -lglib-2.0:' \
  -e '/vlc_cache_gen_LDADD =/s:=:= -lgobject-2.0 -lglib-2.0:' \
  bin/Makefile.am
Comment 48 Gürkan 2013-08-17 08:47:12 UTC
Here is little more information from forums on this issue:

http://forums.gentoo.org/viewtopic-t-966546-highlight-.html

@SpanKY, your sed hack didn't work for me.
Comment 49 Martin DiViaio 2013-08-17 09:58:33 UTC
(In reply to Jason Lamb from comment #45)
> I just went through this process to rebuild vlc again, after failing again
> to emerge normally after my system's update to dev-libs/glib-2.36.3-r2. Here
> are the emerge commands that worked for my system;
> 
> emerge --unmerge qtcore qtgui
> USE="-glib" emerge --oneshot --nodeps --verbose qtcore qtgui
> emerge --verbose vlc
> emerge --oneshot --verbose qtcore qtgui
> 
> For whatever reason, when I tried;
> 
> USE="$USE -glib" emerge --oneshot --nodeps --verbose qtcore qtgui
> 
> qtcore would emerge without issue, but qtgui failed to emerge.
> 
> Good Luck..

I had the same issue with qtgui failing. Running the following fixed it for me:

USE="-glib" emerge --oneshot --jobs=1 --nodeps --verbose qtcore qtgui

You could also run the pacakages separately but you need to build qtcore first:
USE="-glib" emerge --oneshot --nodeps --verbose qtcore
USE="-glib" emerge --oneshot --nodeps --verbose qtgui
Comment 50 H.Habighorst 2013-08-20 21:18:53 UTC
GLIB 2.34 and recompiling VLC / QT solves the issue for me.

package.mask for glib-2.3.36 and dependant packages:

## glib => 2.34 and dependendant mask
>=dev-libs/glib-2.36.0
>=net-libs/glib-networking-2.36.0
>=dev-python/pygobject-3.8.0
>=dev-libs/gobject-introspection-1.36.0
>=dev-libs/gobject-introspection-common-1.36.0
>=net-libs/libsoup-2.40.0
>=net-libs/libsoup-gnome-2.40.0
>=x11-libs/gtk+-3.8.0
>=dev-util/gdbus-codegen-2.36.0

## ABI mismatch in fribidi package
=dev-libs/fribidi-0.19.5-r2

The package.mask can be incomplete...

Fribidi was masked due to ABI_X86 mismatch in the 0.19.5-r2 package.

Everything worked as usual afterwards.
Comment 51 Rémi Cardona (RETIRED) gentoo-dev 2013-08-21 08:59:34 UTC
(In reply to Cédric D. from comment #32)
> I have the same problem with VLC 2.0.7. It seems that the problem comes from
> glib 2.36 and the dynamic modules of VLC (at least libnotify_plugin.so and
> libsvg_plugin.so).

Confirming gobject-based plugins are the source of this issue. A quick ldd/sed check pointed me to the plugins I needed to disable :

    ldd /usr/lib/vlc/plugins/*/*.so | sed -rne "/^\/.*/ p ; /gobject/ p "

In my case USE="-libnotify -gnome -svg" were enough to get me a build of VLC. No qt rebuild was needed.

> In glib 2.36, the libgobject-2.0.so.0 deprecates functions
> g_type_init_with_debug_flags() and g_type_init() and uses an automatic
> constructor. This initialization creates/looks for some Quarks (association
> between string and integer identifier) using static strings as key; these
> Quarks are managed by the libglib-2.0.so.0.
> 
> When vlc-cache-gen starts, it loads and unloads plugins libnotify_plugin.so
> and libsvg_plugin.so which both (indirectly) depend on libgobject-2.0.so.0.
> When each plugin is loaded, the library libgobject-2.0.so.0 is also loaded,
> the constructor is called then the lib and the plugin are unloaded. However
> the libglib-2.0.so.0 seems to be kept between load and unload thus the
> Quarks are not destroyed. As they refers to static strings in
> libgobject-2.0.so.0, these pointers became dangling when this library is
> loaded at another location and this leads to segmentation fault.
> 
> I could run vlc-cache-gen by replacing g_quark_from_static_string() by
> g_quark_from_string() and g_intern_static_string() by g_intern_string() in
> the gobject library. I don't known if something can be done in vlc directly.

I've been googling around but I haven't found much of anything. I'll see if I can cook up a simple test case and open a bug upstream.

Cheers
Comment 52 Ilya Gordeev 2013-08-22 13:45:08 UTC
(In reply to Rémi Cardona from comment #51)
> I've been googling around but I haven't found much of anything. I'll see if
> I can cook up a simple test case and open a bug upstream.
Maybe my comment https://bugs.gentoo.org/show_bug.cgi?id=463558#c29 helps you
Comment 53 Oleh 2013-08-22 17:50:13 UTC
is glib required for qtcore/qtgui at all? any packages explicitly using qtcore[glib] or qtgui[glib]?
Comment 54 Gert Wollny 2013-08-25 19:12:42 UTC
(In reply to Oleg from comment #53)
> is glib required for qtcore/qtgui at all? any packages explicitly using
> qtcore[glib] or qtgui[glib]?

Yes, at least 

media-libs/phonon-gstreamer-4.6.3::gentoo, installed)
    dev-qt/qtgui:4[glib] required by (sys-auth/polkit-qt
Comment 55 Gert Wollny 2013-08-25 19:15:20 UTC
(In reply to Oleg from comment #53)
> is glib required for qtcore/qtgui at all? any packages explicitly using
> qtcore[glib] or qtgui[glib]?

Yes, at least:  

      media-libs/phonon-gstreamer-4.6.3
      sys-auth/polkit-qt-0.103.0
Comment 56 Aurelien Minet 2013-08-25 21:25:00 UTC
I have done some tests on vlc-cache-gen with .so files in modules, and I found that in my case that ".libs/libaccess_http_plugin.so" make vlc-cache-gen segfault.

USE="-kde -libnotify -svg -qt4 -gnome" isn't enough when I emerge vlc-2.0.7 on x86_64.
(
dev-libs/glib:            2.36.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
LDFLAGS="-Wl,-O1 -Wl,--as-needed")
Comment 57 Cédric Delmas 2013-08-28 08:02:30 UTC
I used another workaround for this problem which modify glib: I added the keyword "nodelete" when linking libgobject.so to prevent unload at runtime.

I do it by creating file /etc/portage/patches/dev-libs/glib/gobject-nodelete-keyword.patch with content:
diff -Nru a/gobject/Makefile.am b/gobject/Makefile.am
--- a/gobject/Makefile.am	2013-08-07 16:34:32.000000000 +0200
+++ b/gobject/Makefile.am	2013-08-28 09:20:56.446168756 +0200
@@ -52,6 +52,7 @@
 libgobjectincludedir = $(includedir)/glib-2.0/gobject
 libgobject_2_0_la_LDFLAGS = $(GLIB_LINK_FLAGS) \
   $(gobject_win32_res_ldflag) \
+  -Wl,-z,nodelete \
   -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
   -export-dynamic $(no_undefined)
 
then re-emerging glib.
Be careful: this patch is experimental; I have no enough knownledge in automake/autoconf and libtool to be sure that this modification is the nicest one.
Also it may not work on some platforms (I tested it only on x86_64 with GNU ld and Linux kernel).

Glib developpers said that unloading libgobject is unsupported thus they won't do anything. Maybe a Gentoo specific patch on glib could be done as it seems that this problem occurs also on other software.
Comment 58 Martin Dummer 2013-09-02 07:44:48 UTC
(In reply to Cédric D. from comment #57)
> I used another workaround for this problem which modify glib: I added the
> keyword "nodelete" when linking libgobject.so to prevent unload at runtime.


I can confirm that this patch for glib fixes the vlc emerge problem for me, too. Removing USEflag svg did not help. With this patch, vlc emerges with and without svg useflag.
Comment 59 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-09-02 08:51:24 UTC
*** Bug 483334 has been marked as a duplicate of this bug. ***
Comment 60 Rafał Mużyło 2013-09-02 14:41:37 UTC
*** Bug 483396 has been marked as a duplicate of this bug. ***
Comment 61 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-09-02 17:01:18 UTC
Cédric, thanks for tracking down the issue!

Since gobject has not supported unloadability for a long time, and now actively crashes after unload/reload, adding a nodelete patch would make sense - at least until vlc, amarok, etc. upstream developers fix their plugin code.

We just need to check in glib's configure that the linker does support the flag, because glib is a core system library that gets built on all sorts of platforms.
Comment 62 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-09-02 18:30:58 UTC
Fixed in glib-2.36.4-r1. Patch submitted upstream at https://bugzilla.gnome.org/show_bug.cgi?id=707298

+*glib-2.36.4-r1 (02 Sep 2013)
+
+  02 Sep 2013; Alexandre Rostovtsev <tetromino@gentoo.org> -glib-2.34.3.ebuild,
+  -glib-2.36.3-r1.ebuild, -glib-2.36.3-r2.ebuild, +glib-2.36.4-r1.ebuild,
+  -files/glib-2.36.3-revert-ext34.patch, +files/glib-2.36.4-znodelete.patch:
+  Fix segfaults in vlc and other applications that try to unload libgobject at
+  runtime (bug #405173, thanks to Cédric D. for finding a good solution). Drop
+  old ebuilds.
Comment 63 driedfruit 2014-05-13 16:08:15 UTC
I'm still experiencing this crash with vlc-2.1.4 and glib-2.38.2-r1

I see that the 'nodelete' patch is already in portage, doing USE="-libnotify -svg -xcb -xv" doesn't help either.

It might be a completely new bug, but the symptoms are the same: vls-cache-gen crashes during merge, running it from gdb produces the "file is not an executable" message. eselecting xorg-x11 vs nvidia-drivers doesn't change anything.
Comment 64 Alexandre Rostovtsev (RETIRED) gentoo-dev 2014-05-13 17:51:48 UTC
(In reply to driedfruit from comment #63)
> I'm still experiencing this crash with vlc-2.1.4 and glib-2.38.2-r1
> 
> I see that the 'nodelete' patch is already in portage, doing USE="-libnotify
> -svg -xcb -xv" doesn't help either.
> 
> It might be a completely new bug, but the symptoms are the same:
> vls-cache-gen crashes during merge, running it from gdb produces the "file
> is not an executable" message. eselecting xorg-x11 vs nvidia-drivers doesn't
> change anything.

Please get a gdb backtace from /usr/lib/vlc/vlc-cache-gen and open a new bug report.
Comment 65 Jeroen Roovers (RETIRED) gentoo-dev 2014-07-20 11:56:51 UTC
*** Bug 517546 has been marked as a duplicate of this bug. ***
Comment 66 Alessandro Di Federico 2014-07-20 13:37:44 UTC
The patch to add support for `-z nodelete` tests if the linker supports it in an unappropriate way:

---------- 8< ----------

+AC_ARG_ENABLE([znodelete],
+              [AS_HELP_STRING([--disable-znodelete],
+                              [avoid linking with -z,nodelete])],,
+              [SAVED_LDFLAGS="${LDFLAGS}"
+               AC_MSG_CHECKING([for -z,nodelete linker flag])
+               LDFLAGS=-Wl,-z,nodelete
+               AC_TRY_LINK([], [int main(void) { return 0; }],
+                           AC_MSG_RESULT(yes)
+                           enable_znodelete=yes,
+                           AC_MSG_RESULT(no)
+                           enable_znodelete=no)
+               LDFLAGS="${SAVED_LDFLAGS}"])

---------- 8< ----------

The second argument to AC_TRY_LINK is the function body, so there's no need to put "int main(void) ...", "return 0" is enough.

This is an issue because this approach introduces a nested function, which are a GNU extension to C, and are not supported e.g. by Clang.

This mistake probably originates from other parts of configure.ac which do the same, I'll open another bug for those.

Attached you can find a patch to the patch.
Comment 67 Alessandro Di Federico 2014-07-20 13:38:53 UTC
Created attachment 381134 [details, diff]
Patch to specify only the function body in AC_TRY_LINK
Comment 68 Paweł Stankowski 2014-11-16 01:17:06 UTC
Gnome Team, could you take a look at that patch and decide whether you want to use it? If so, maybe it would be valueable to inform upstream devs as they have already applied wrong patch.
Comment 69 Rémi Cardona (RETIRED) gentoo-dev 2014-11-16 08:06:12 UTC
This patch and a few others that are related are in 2.40.2. Could you give that version a try?
Comment 70 Rémi Cardona (RETIRED) gentoo-dev 2014-11-16 08:08:57 UTC
FTR, here's the patch in 2.40.2:

https://git.gnome.org/browse/glib/commit/?h=glib-2-40&id=24d26e0709d88c8f943bf79a61c55b712d500326
Comment 71 Paweł Stankowski 2014-11-16 14:20:11 UTC
So it makes sense to correct glib-2.36.4-znodelete.patch file that is still applied by older ebuilds, doesn't it?
Comment 72 Rémi Cardona (RETIRED) gentoo-dev 2014-11-16 14:34:26 UTC
(In reply to Paweł Stankowski from comment #71)
> So it makes sense to correct glib-2.36.4-znodelete.patch file that is still
> applied by older ebuilds, doesn't it?

2.40.0-r1 is stable. I'd rather push for the stabilization of 2.40.2 instead.

@gnome, what say you?
Comment 73 Pacho Ramos gentoo-dev 2014-11-16 15:54:29 UTC
Well, 2.40.2 will be stabilized as soon as I prepare the list with it and other packages from 3.12.x era :/
Comment 74 Pacho Ramos gentoo-dev 2015-01-02 12:29:08 UTC
Fixed version is now stable