Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 624960 - x11-libs/gtk+:3 - wayland optionality concerns
Summary: x11-libs/gtk+:3 - wayland optionality concerns
Status: IN_PROGRESS
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PullRequest
: 736974 811372 (view as bug list)
Depends on:
Blocks: gnome-3.36 gnome-3.30
  Show dependency tree
 
Reported: 2017-07-14 09:09 UTC by poncho
Modified: 2021-12-08 10:31 UTC (History)
8 users (show)

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


Attachments
build.log (build.log,56.10 KB, text/x-log)
2017-07-14 09:09 UTC, poncho
Details

Note You need to log in before you can comment on or make changes to this bug.
Description poncho 2017-07-14 09:09:04 UTC
Created attachment 484330 [details]
build.log

gnome-base/gnome-control-center fails to build without wayland:

libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gsettings-desktop-schemas -I../../ -DG_LOG_DOMAIN=\"common-cc-panel\" -DPANEL_ID=\"common\" -pthread -I/usr/include/gnome-desktop-3.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/gsettings-desktop-schemas -I/usr/include/gudev-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -march=native -O2 -pipe -c gsd-device-manager-x11.c  -fPIC -DPIC -o .libs/gsd-device-manager-x11.o
gsd-device-manager-udev.c:27:28: fatal error: gdk/gdkwayland.h: No such file or directory

gnome-base/gnome-control-center:
USE="bluetooth colord cups gnome-online-accounts networkmanager v4l -debug -ibus -kerberos -wayland" ABI_X86="(64)" INPUT_DEVICES="-wacom"
CFLAGS="-march=native -O2 -pipe -std=gnu11"


Portage 2.3.6 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.4.0, glibc-2.23-r4, 4.12.0 x86_64)
=================================================================
System uname: Linux-4.12.0-x86_64-Intel-R-_Core-TM-_i7-4770K_CPU_@_3.50GHz-with-gentoo-2.3
KiB Mem:    16348184 total,   7063604 free
KiB Swap:   15624188 total,  15624188 free
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.28 p1.2) 2.28
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.28-r2::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

mozilla
    location: /var/portage/layman/mozilla
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/mozilla.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/portage/layman/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

gentoo
    location: /var/portage/tree
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo.git
    priority: 1000

poncho
    location: /var/portage/local/poncho-overlay
    sync-type: git
    sync-uri: git://github.com/MeisterP/poncho-overlay.git
    masters: gentoo
    priority: 1050

torbrowser
    location: /var/portage/local/torbrowser-overlay
    sync-type: git
    sync-uri: git://github.com/MeisterP/torbrowser-overlay.git
    masters: gentoo
    priority: 1050

Installed sets: @kernels
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA FraunhoferFDK AdobeFlash-11.x PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/firefox/browser/searchplugins/google.xml /usr/share/gnupg/qualified.txt /usr/share/thumbnailers/ffmpegthumbnailer.thumbnailer"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --ask --jobs=9 --load-average=8 --verbose"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo 	http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo 	http://distfiles.gentoo.org"
INSTALL_MASK=" /etc/init.d"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 -l8"
PKGDIR="/var/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi aften alac alsa amd64 argyllcms bash-completion berkdb bluetooth bluray bzip2 cairo cdda cdio cdr cdrdao cli colord cracklib crypt cryptsetup css cue cups cxx dbus device-mapper dirac dri drm dts dvd dvdr egl emboss encode evo exif fam fdk ffmpeg firefox flac fontconfig fortran gif glamor gles2 gnome gnome-keyring gnome-online-accounts gstreamer gtk gtk3 gtkstyle iconv id3tag introspection ipv6 jpeg kate kms lame lcms libass libnotify libproxy libsecret libtiger mad matroska mng modules mp3 mp4 mpeg multilib nautilus ncurses networkmanager nls nptl nss nvenc nvidia ogg opengl openmp opus pam pango pcre pdf png policykit postscript ppds pulseaudio qt3support quicktime raw readline rtmp schroedinger sdl seccomp session smp sndfile speex spell ssl startup-notification svg systemd tcpd theora threads tiff tracker truetype udev udisks unicode upower usb v4l vaapi vdpau vorbis vpx wav wavpack webp x264 x265 xattr xcb xinerama xml xmp xps xv xvid zlib zsh-completion" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput roccat_arvo roccat_konepure" KERNEL="linux" L10N="en en_US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" 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"
USE_PYTHON="2.7"
Unset:  CC, CPPFLAGS, CTARGET, CXX, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mart Raudsepp gentoo-dev 2017-07-14 09:13:58 UTC
3.24.2-optional-wayland.patch must be incomplete then apparently
Comment 2 poncho 2017-07-14 09:18:40 UTC
include <gdk/gdkwayland.h> was introduced here:

https://git.gnome.org/browse/gnome-control-center/commit/panels/common/gsd-device-manager-udev.c?h=gnome-3-24&id=8f9259ac06db4c2830fa9e79227bb56abdee86ca

not sure whether just reverting this commit is the right solution though.
Comment 3 Mart Raudsepp gentoo-dev 2017-07-15 04:19:19 UTC
I've added a patch that should fix this, but I'm still concerned about the wayland optionality stuff we have here:

* If gtk+[wayland] is present, then those codepaths still get used in gnome-control-center and probably other gnome modules due to GDK_WINDOWING_WAYLAND being defined. Our optional-wayland patch here doesn't force GDK_WINDOWING_WAYLAND to undefined, so if you compile gnome-control-center with USE=-wayland but gtk+ happens to be compiled with USE=wayland, it'll still use gdkwayland stuff to some extent, probably thus falling over after gtk+ is recompiled without wayland (as the deps would allow). In fact, I couldn't reproduce the problem or test the fix because of that, as I have gtk+[wayland] - gnome-control-center[-wayland] worked fine for me.

* Even with --disable-wayland for our patch passed, I see wacom panel still have -lwayland and co stuff in its LIBS

We should think about GDK_WINDOWING_WAYLAND handling for all of GNOME, or maybe consider it's time to hard require wayland to not bother with any of this - at least it's not a plethora of X libs and wayland is the future or something...


Re-titling the bug for this, but please test if the gdkwayland fix works for you. You should see a "3.24.2-fix-without-gdkwayland.patch" getting applied if your rsync is caught up.


commit f5563dcc576c5a36e990b2d74eafa7e7809cafe7
Author: Mart Raudsepp <leio@gentoo.org>
Date:   Sat Jul 15 07:12:49 2017 +0300

    gnome-base/gnome-control-center: Fix compilation with USE=-wayland without gtk+[wayland]
    
    Gentoo-bug: 624960
    Package-Manager: Portage-2.3.5, Repoman-2.3.2

 gnome-base/gnome-control-center/files/3.24.2-fix-without-gdkwayland.patch | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 gnome-base/gnome-control-center/gnome-control-center-3.24.2.ebuild        |  2 ++
 2 files changed, 49 insertions(+)
Comment 4 poncho 2017-07-15 06:20:59 UTC
(In reply to Mart Raudsepp from comment #3)
> Re-titling the bug for this, but please test if the gdkwayland fix works for
> you. You should see a "3.24.2-fix-without-gdkwayland.patch" getting applied
> if your rsync is caught up.

The fixed patch works for me, thanks :)
Comment 5 Gilles Dartiguelongue gentoo-dev 2017-08-17 22:53:20 UTC
*** Bug 627966 has been marked as a duplicate of this bug. ***
Comment 6 Michael Cook 2017-08-17 23:55:38 UTC
This issue just bit me. What should I mask so I can safe downgrade gnome so I can reboot?
Comment 7 unheatedgarage 2017-08-18 04:43:41 UTC
(In reply to Michael Cook from comment #6)
> This issue just bit me. What should I mask so I can safe downgrade gnome so
> I can reboot?

Running ~amd64, I've been getting errors since we got Gnome 3.24--setting wayland globally fixed the problem for me.
Comment 8 unheatedgarage 2017-08-18 05:15:42 UTC
Also, I had to apply this patch: 

https://bugs.gentoo.org/show_bug.cgi?id=627960#c4
Comment 9 Gilles Dartiguelongue gentoo-dev 2017-08-18 07:56:09 UTC
Issue still exists in 3.24.3. I'll have a look.
Comment 10 Gilles Dartiguelongue gentoo-dev 2017-08-18 22:39:18 UTC
(In reply to Mart Raudsepp from comment #3)
> I've added a patch that should fix this, but I'm still concerned about the
> wayland optionality stuff we have here:
> 
> * If gtk+[wayland] is present, then those codepaths still get used in
> gnome-control-center and probably other gnome modules due to
> GDK_WINDOWING_WAYLAND being defined. Our optional-wayland patch here doesn't
> force GDK_WINDOWING_WAYLAND to undefined, so if you compile
> gnome-control-center with USE=-wayland but gtk+ happens to be compiled with
> USE=wayland, it'll still use gdkwayland stuff to some extent, probably thus
> falling over after gtk+ is recompiled without wayland (as the deps would
> allow). In fact, I couldn't reproduce the problem or test the fix because of
> that, as I have gtk+[wayland] - gnome-control-center[-wayland] worked fine
> for me.
> 
> * Even with --disable-wayland for our patch passed, I see wacom panel still
> have -lwayland and co stuff in its LIBS
> 
> We should think about GDK_WINDOWING_WAYLAND handling for all of GNOME, or
> maybe consider it's time to hard require wayland to not bother with any of
> this - at least it's not a plethora of X libs and wayland is the future or
> something...

Actually, digging into this I remember I made clutter & co USE=wayland locked to the value of gtk+ due to this.
Comment 11 Leho Kraav (:macmaN @lkraav) 2017-09-17 18:27:22 UTC
> or maybe consider it's time to hard require wayland to not bother with any of this

Yes. Think of all the other useful stuff that could be done with the time/energy it takes to provide clearly difficult to implement options, such as `USE=-wayland`. Could make sense if we had enough manpower or it was technically trivial. Both pre-conditions evaluate to a strictly typed `false` value. 

Looking forward to reaching 3.26 sometime soon.
Comment 12 Mart Raudsepp gentoo-dev 2018-01-08 18:42:27 UTC
Retitling to be more about the gdkx.h issue as already meant. This is now regarding globally for GDK_WINDOWING_X11 guards, not just about gnome-control-center.
I also removed gnome-terminal gtk+[X] dep for now, as it works fine with pure wayland and we have users that want it for such purpose. The problem is the changing of this on gtk+ after the fact, and not only just for gnome-terminal or gnome-control-center.

Could use a USE subslot, eh. gtk+:3[X:=,wayland:=] or something without exposing it in IUSE - rebuild if the USE flag setting changes :D
Comment 13 Rick Harris 2018-06-14 21:57:38 UTC
Can we please get this added to the app-i18n/ibus ebuilds as x11-libs/gtk+:3[=wayland] DEPENDs.

app-i18n/ibus suffers from the same problem and must be (re-)built to correspond with gtk+:3 'wayland' USE state.

Example break:
1. USE=wayland emerge -1 x11-libs/gtk+:3 app-i18n/ibus
2. USE=-wayland emerge -1 x11-libs/gtk+:3

* Updating gtk3 input method module cache ...
Cannot load module /usr/lib64/gtk-3.0/3.0.0/immodules/im-ibus.so: /usr/lib64/gtk-3.0/3.0.0/immodules/im-ibus.so: undefined symbol: gdk_wayland_display_get_type
Comment 14 Yaroslav Isakov 2020-08-24 21:50:52 UTC
*** Bug 736974 has been marked as a duplicate of this bug. ***
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-03 22:09:18 UTC
*** Bug 811372 has been marked as a duplicate of this bug. ***