Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379897 - x11-libs/gtk+-3.0.x uses G_CONST_RETURN in headers
Summary: x11-libs/gtk+-3.0.x uses G_CONST_RETURN in headers
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 19:29 UTC by Seth Shelnutt
Modified: 2011-09-26 12:20 UTC (History)
1 user (show)

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


Attachments
Build log (dev-libs:libunique-3.0.2:20110819-191839.log,86.07 KB, text/plain)
2011-08-19 21:01 UTC, Seth Shelnutt
Details
backport upstream gdk G_CONST_RETURN removal patch to gtk+-3.0.12 (gtk+-3.0.12-gdk-G_CONST_RETURN.patch,7.88 KB, patch)
2011-08-20 01:22 UTC, Alexandre Rostovtsev (RETIRED)
Details | Diff
backport upstream gtk G_CONST_RETURN removal patch to gtk+-3.0.12 (gtk+-3.0.12-gtk-G_CONST_RETURN.patch,89.60 KB, patch)
2011-08-20 01:22 UTC, Alexandre Rostovtsev (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seth Shelnutt 2011-08-19 19:29:20 UTC
dev-libs/libunique-3.0.2 fails to compile. It spits out errors on header files for gtk+.

Reproducible: Always

Steps to Reproduce:
1. Start a fresh install
2. Unmask gnome 3 deps
3. Install dev-libs/linunique-3.0.2
Actual Results:  
libunique-3.0.2 fails to build

Expected Results:  
libunique-3.0.2 should compile fine

emerge --info =dev-libs/libunique-3.0.2
Portage 2.3-r4 (default/linux/amd64/2008.0/desktop, gcc-4.4.5, glibc-2.11.3-r0, 3.0.1-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.0.1-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_330_@_1.60GHz-with-gentoo-2.1.8
Portage Tree: /usr/portage
Portage HEAD: 9eb4410a14d1fb61157aa307f6e09644829a23a0 /usr/portage/.git/refs/heads/funtoo.org
app-shells/bash:          4.2_p10
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.1-r1
dev-util/cmake:           2.8.5-r2
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1.8-r2
sys-apps/openrc:          0.8.3-r2
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.20.1
sys-devel/gcc:            4.4.5
sys-devel/gcc-config:     1.4.1
sys-devel/libtool:        2.4-r3
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.11.3
Repositories: gentoo gnome local
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 skype-eula google-talkplugin"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -mtune=generic"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
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/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages mini-manifest news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gnome /usr/local/portage"
SYNC="git://github.com/funtoo/portage-mini-2010.git"
SYNC_USER="root"
USE="X a52 aac aacaalib acl acpi alac alsa amd64 apm atmo autoipd avahi bash-completion battstat bazaar berkdb bindist bluetooth branding btrfs bzip2 cairo cdda cdr cjk cli connection-sharing consolekit cpudetection cracklib crypt cups curl cvs cxx darchs dbus dc1394 device-mapper dhcpcd dirac disk-partition dri dts dvb dvd dvdr dvdread emboss encode esd evdev exif extras faac fam fat fbcon ffmpeg firefox fjvu flac flash fontconfig fortran fuse fvi gd gda gdbm gdu ggi gif gimp git gnome gnome-keyring gnutls gpm gstreamer gtk gtk3 hddtemp hfs httpd iconv id3tag intel introspection ipv6 java jfs jpeg jpeg2k ladspa lame lcms ldap libeoffice libnotify libsamplerate libv4l2 lirc lm_sensors lua lzma mad mercurial midi mmx mng modplug modules mono mozilla mozilla-firefox mp3 mp4 mpeg mudflap multilib musepack nautilus ncurses networkmanager nls nptl nptlonly nsplugin ntfs ogg openal opengl openmp openvg pam pango pcre pdf perl png policykit ppds pppd print pulseaudio python python2 qt3 qt3support qt4 raster readline reiser4 reiserfs resolvconf samba scanner sdl sensord session skins smbsharemodes smp spell sse sse2 sse3 ssl ssse3 startup-notification subversion svg swat sysfs syslog taglib tbb tcpd theora threads tiff truetype twolame udev unicode upnp usb v4l2 vaaoi vaapi vcdx vlc vlm vorbis wavpack weather wiki winbind wine wma-fixed wmf x264 xcb xfs xinerama xml xorg xosd xulrunner xv xvid zlib zsh-completion zvbi" 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="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" 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" INPUT_DEVICES="synaptics trackpad evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia v4l2" 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, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC_UMASK


emerge -pqv =dev-libs/libunique-3.0.2
[ebuild  NS   ] dev-libs/libunique-3.0.2 [1.1.6-r1] USE="introspection -debug -doc -test" 


Complete build log:
http://pastebin.com/nFRabHcJ
Comment 1 Nirbheek Chauhan (RETIRED) gentoo-dev 2011-08-19 19:59:29 UTC
Please attach the build.log to the bug (bzip it if it's too large). pastebins are not persistent sources of information.

Also, 

SYNC="git://github.com/funtoo/portage-mini-2010.git"

You're not using Gentoo, are you? Please verify with your distro that the problem is not on their end.
Comment 2 Seth Shelnutt 2011-08-19 21:01:55 UTC
Created attachment 283947 [details]
Build log
Comment 3 Seth Shelnutt 2011-08-19 21:04:23 UTC
(In reply to comment #1)
> Please attach the build.log to the bug (bzip it if it's too large). pastebins
> are not persistent sources of information.
> 
> Also, 
> 
> SYNC="git://github.com/funtoo/portage-mini-2010.git"
> 
> You're not using Gentoo, are you? Please verify with your distro that the
> problem is not on their end.

I discussed this on the funtoo irc, and its a gentoo ebuild, pulled from the gentoo repos. No one else had any issues with it, so I decided to file a bug report here. I apologize though if I shouldn't have filed a bug report.
Comment 4 Nirbheek Chauhan (RETIRED) gentoo-dev 2011-08-19 21:16:52 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > You're not using Gentoo, are you? Please verify with your distro that the
> > problem is not on their end.
> 
> I discussed this on the funtoo irc, and its a gentoo ebuild, pulled from the
> gentoo repos. No one else had any issues with it, so I decided to file a bug
> report here. I apologize though if I shouldn't have filed a bug report.

Sorry, but we can't help you with this. As far as I know, no one in the GNOME team is familiar with the setup of Funtoo, nor do we know what problems mixing Gentoo ebuilds with Funtoo packages can cause.

We can't help you with a system we don't understand, sorry.
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-08-19 22:51:22 UTC
This bug is valid, but has it nothing to do with libunique (or with Funtoo).

The issue is that Gentoo is shipping fundamental libraries (gtk+, pango, etc.) with G_CONST_RETURN in public headers, and that causes problems for people who are using glib-2.29.x and building a package that for whatever reason added -DG_DISABLE_DEPRECATED to its CFLAGS. And although it may be tempting to ignore problems caused by bleeding-edge glib versions, these issues will crop up again and again in September when glib-2.30 is officially released and people start to upgrade. IMHO, we should just fix fundamental libraries in the tree to be glib-2.29 compatible.

Incidentally, Seth, if you just want to build gnome3 with a minimum of problems, you should temporarily downgrade to glib-2.28.x; otherwise, you will run into build errors like this one on every third or fourth package.
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-08-20 01:22:02 UTC
Created attachment 283965 [details, diff]
backport upstream gdk G_CONST_RETURN removal patch to gtk+-3.0.12

The G_CONST_RETURN issue was fixed in gtk+-2.24.5 and in the gtk+-3.1.x releases, but remains in the 3.0.x series. Here is a backport of first G_CONST_RETURN removal patch to gtk+-3.0.12. The second patch will follow below.

With the two patches applied, gtk+-3.0.12 builds fine under glib-2.29.16 and does not have G_CONST_RETURN macro in public headers.
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-08-20 01:22:22 UTC
Created attachment 283967 [details, diff]
backport upstream gtk G_CONST_RETURN removal patch to gtk+-3.0.12
Comment 8 Rafał Mużyło 2011-08-20 16:50:01 UTC
What's actually to fix (if anything at all - last time I've checked mixing stable and unstable wasn't exactly supported) are (as usual) the packages that add G*_DISABLE_DEPRECATED (and similar) flags into release tarballs.
Comment 9 Pacho Ramos gentoo-dev 2011-09-12 15:41:04 UTC
(In reply to comment #6)
> Created attachment 283965 [details, diff]
> backport upstream gdk G_CONST_RETURN removal patch to gtk+-3.0.12
> 
> The G_CONST_RETURN issue was fixed in gtk+-2.24.5 and in the gtk+-3.1.x
> releases, but remains in the 3.0.x series. Here is a backport of first
> G_CONST_RETURN removal patch to gtk+-3.0.12. The second patch will follow
> below.
> 
> With the two patches applied, gtk+-3.0.12 builds fine under glib-2.29.16 and
> does not have G_CONST_RETURN macro in public headers.

(In reply to comment #7)
> Created attachment 283967 [details, diff]
> backport upstream gtk G_CONST_RETURN removal patch to gtk+-3.0.12

Have you send both patches to upstream for including them in 3.0 branch?
Comment 10 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-09-12 19:50:18 UTC
(In reply to comment #9)
> Have you send both patches to upstream for including them in 3.0 branch?

Done: https://bugzilla.gnome.org/show_bug.cgi?id=658854
Comment 11 Pacho Ramos gentoo-dev 2011-09-26 12:20:02 UTC
+*gtk+-3.0.12-r1 (26 Sep 2011)
+
+  26 Sep 2011; Pacho Ramos <pacho@gentoo.org> +gtk+-3.0.12-r1.ebuild,
+  +files/gtk+-3.0.12-use-const.patch:
+  Use const instead G_CONST_RETURN, bug #379897 by Alexandre Rostovtsev.
+