Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 614914 - media-gfx/gimp-9999 does not compile - error: redeclaration of enumerator ‘GIMP_ADD_WHITE_MASK’ and others
Summary: media-gfx/gimp-9999 does not compile - error: redeclaration of enumerator ‘GI...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sebastian Pipping
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on: 615144
Blocks:
  Show dependency tree
 
Reported: 2017-04-07 13:21 UTC by Miroslav Šulc
Modified: 2017-08-30 14:25 UTC (History)
0 users

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


Attachments
build.log (build.log,83.01 KB, text/x-log)
2017-04-07 13:21 UTC, Miroslav Šulc
Details
Remove enum collisions (0001-Remove-enum-collisions-with-libgimpbase-gimpcompaten.patch,8.47 KB, patch)
2017-04-08 22:19 UTC, Sebastian Pipping
Details | Diff
build.log: invert-svg.c:18:21: fatal error: gio/gio.h: No such file or directory (build.log,97.30 KB, text/x-log)
2017-04-09 14:20 UTC, Miroslav Šulc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Šulc gentoo-dev 2017-04-07 13:21:19 UTC
Created attachment 469386 [details]
build.log

it fails to compile already for several months

Portage 2.3.5 (python 2.7.13-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r3, 4.9.16-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.16-hardened-x86_64-Intel-R-_Core-TM-_i7-4700HQ_CPU_@_2.40GHz-with-gentoo-2.3
KiB Mem:    24570704 total,   6681332 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Fri, 07 Apr 2017 07:00:01 +0000
sh bash 4.4_p12
ld GNU ld (Gentoo 2.27 p1.0) 2.27
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.13::gentoo, 3.4.6::gentoo, 3.5.3::gentoo, 3.6.1::gentoo
dev-util/cmake:           3.7.2-r1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.24.2::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.27::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-vcs-ignore: true

fordfrog
    location: /usr/src/fordfrog.git
    masters: gentoo
    priority: 0

local
    location: /usr/local/portage
    masters: gentoo

cg
    location: /var/lib/layman/cg
    masters: gentoo
    priority: 50

proaudio
    location: /var/lib/layman/proaudio
    masters: gentoo
    priority: 50

stuff
    location: /var/lib/layman/stuff
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~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/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync 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://distfiles.gentoo.org"
LANG="cs_CZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/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 alsa amd64 berkdb bzip2 cdda cli cracklib crypt cups cxx dbus dri dssi dvb dvd exif ffmpeg flac gdbm gegl gif gphoto2 gsm gtk gtk3 hardened http2 iconv icu id3tag ipv6 jack jacksession jpeg justify ladspa lcms libass libnotify libproxy lilypond lv2 mad modplug modules mp3 mpeg mtp multilib musepack ncurses nls nptl ocr ogg opengl openmp opus pam pax_kernel pcre pdf pie png pulseaudio raw readline samba scanner seccomp session soundio speex ssl ssp startup-notification svg taglib theora tiff timidity tk tray truetype unicode urandom usb vaapi vdpau vorbis vpx vst wavpack webp x264 x265 xattr xinerama xtpax xv xvid zlib" ABI_X86="32 64" 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" APACHE2_MODULES="alias auth_basic authn_core authn_file authz_core authz_host authz_user deflate dir expires filter headers http2 include info log_config mime mime_magic negotiation proxy proxy_ajp rewrite setenvif socache_shmcb status unixd 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="evdev synaptics wacom" KERNEL="linux" L10N="cs cs-CZ en en-US en-UK" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="cs cs_CZ en en_US en_UK" NETBEANS_MODULES="*" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 python3_5 python3_6" RUBY_TARGETS="ruby21 ruby22 ruby23 ruby24" SANE_BACKENDS="genesys" USERLAND="GNU" VIDEO_CARDS="intel i915 i965 nouveau" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

media-gfx/gimp-9999::gentoo was built with the following:
USE="alsa pdf -aalib (-altivec) (-aqua) -debug -doc -gnome -jpeg2k -mng -openexr -postscript -python -smp -test -udev -webkit -wmf -xpm" ABI_X86="64" CPU_FLAGS_X86="mmx sse" LINGUAS="cs -am -ar -ast -az -be -bg -br -ca -ca@valencia -csb -da -de -dz -el -en_CA -en_GB -eo -es -et -eu -fa -fi -fr -ga -gl -gu -he -hi -hr -hu -id -is -it -ja -ka -kk -km -kn -ko -lt -lv -mk -ml -ms -my -nb -nds -ne -nl -nn -oc -pa -pl -pt -pt_BR -ro -ru -rw -si -sk -sl -sr -sr@latin -sv -ta -te -th -tr -tt -uk -vi -xh -yi -zh_CN -zh_HK -zh_TW" PYTHON_TARGETS="python2_7"
Comment 1 Sebastian Pipping gentoo-dev 2017-04-08 15:33:46 UTC
I can only offer limited support to a live ebuild of a project this size.


The issue is that something turns line

  CPPFLAGS="${CPPFLAGS} -DGIMP_DISABLE_DEPRECATED -DBABL_DISABLE_DEPRECATED -DGSEAL_ENABLE"

in configure.ac to line

  CPPFLAGS="${CPPFLAGS} $(/bin/true) $(/bin/true) $(/bin/true)"

in configure so -DGIMP_DISABLE_DEPRECATED is lost and libgimpbase/gimpbaseenums.h ends up defining conflicting constants.

Further inspection is needed.  Please be invited to join.


I have synced the ebuild a bit just now:
https://github.com/gentoo/gentoo/commit/75c44eb417349163391938b6e278f7a4f9c75dff
Comment 2 Miroslav Šulc gentoo-dev 2017-04-08 16:12:57 UTC
thank you for your response. i first tried to find the cause myself but i'm not c dev, i'm java dev so it's quite different environment so i failed to find even the cause that you found. i tried to revert the line manually after configure and then reconfigure but then configure complained about missing gegl (i have gegl-9999 merged). then i tried to grep configure script for CPPFLAGS= and this it returned:

# grep CPPFLAGS= configure
    save_CPPFLAGS=$CPPFLAGS
    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
    CPPFLAGS=$save_CPPFLAGS
      altivec_save_CPPFLAGS="$CPPFLAGS"
      CPPFLAGS="$altivec_save_CPPFLAGS $altivec_flag"
      CPPFLAGS="$altivec_save_CPPFLAGS"
  dinput_save_CPPFLAGS="$CPPFLAGS"
    CPPFLAGS="-I $with_directx_sdk/Include $CPPFLAGS"
    CPPFLAGS="$dinput_save_CPPFLAGS"
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
CPPFLAGS="$save_CPPFLAGS"
CPPFLAGS="${CPPFLAGS} $(/bin/true) $(/bin/true) $(/bin/true)"
  CPPFLAGS="${CPPFLAGS} $(/bin/true)"
  CPPFLAGS="${CPPFLAGS} $(/bin/true) $(/bin/true)"
  CPPFLAGS="${CPPFLAGS} $(/bin/true)"
CPPFLAGS="${CPPFLAGS} -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE"

so the problem is probably little bit larger. on my last attempt to merge i also noticed this:

GIT update -->
   repository:               https://git.gnome.org/browse/gimp
   updating from commit:     10f12bdcbd475b215a4d98a0db21c98debf872d5
   to commit:                68e15ad8c51b36630db31220d981435f0de2e972
 configure.ac | 53 ++++++++++++++++++++++++++++++-----------------------
 1 file changed, 30 insertions(+), 23 deletions(-)

so somebody touched the source file by it did not fix anything. the result is as grepped above.
Comment 3 Sebastian Pipping gentoo-dev 2017-04-08 16:25:19 UTC
Could it be your gegl-9999 is actually pre gegl-0.3.14?  Maybe reinstall gegl-9999 or gegl-0.3.14 and try again.

To understand it better: What is it that you need gimp-9999 for that 2.9.4-r2 is lacking?
Comment 4 Sebastian Pipping gentoo-dev 2017-04-08 22:19:43 UTC
Created attachment 469518 [details, diff]
Remove enum collisions

I found that gnome2_src_prepare calls to gnome2_disable_deprecation_warning which is where "$(/bin/true)" originates from.

With that patch attached, gimp-9999 compiles well for me.
I just added a call to epatch_user to the ebuild so if you copy the patch to /etc/portage/patches/media-gfx/gimp-9999/ it should be applied, works here.

https://github.com/gentoo/gentoo/commit/e586bf75cb8ab0ec05a41e8d03f3490fff292e80
Comment 5 Miroslav Šulc gentoo-dev 2017-04-09 08:06:05 UTC
to your question about using gimp-9999. i used to help with gimp translation to czech language so since then it became a habit though i do not have time for that anymore. also, i would not bother you with the bug but this issue is there already for several months and sooner or later you will package new version that will have this issue. i maintain netbeans ebuilds (~21 ebuilds) and i found out that it's easier for me to do daily updates because over time the changes might be so huge that i would be lost in it.

wrt your patch, it fixes the issue with the deprecation but it stops for me on another bug (idk if it is temporary issue as gimp tree being broken for now or it is an ebuild issue):

make[3]: Entering directory '/var/tmp/portage/media-gfx/gimp-9999/work/gimp-9999/tools'
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -DGIMP_APP_VERSION=\"2.9\" -DLOCALEDIR=\""/usr/share/locale"\" -DPREFIX=\""/usr"\" -DEXEC_PREFIX=\""/usr"\" -DBINDIR=\""/usr/bin"\" -DSBINDIR=\""/usr/sbin"\" -DLIBEXECDIR=\""/usr/libexec"\" -DDATADIR=\""/usr/share"\" -DDATAROOTDIR=\""/usr/share"\" -DSYSCONFDIR=\""/etc"\" -DSHAREDSTATEDIR=\""/usr/com"\" -DLOCALSTATEDIR=\""/var/lib"\" -DLIBDIR=\""/usr/lib64"\" -DINFODIR=\""/usr/share/info"\" -DMANDIR=\""/usr/share/man"\" -DGIMPPLUGINDIR=\""/usr/lib64/gimp/2.0"\" -DGIMPDATADIR=\""/usr/share/gimp/2.0"\" -DCC=\""x86_64-pc-linux-gnu-gcc"\" -DGIMPDIR=\""GIMP"\" -DGIMP_PLUGIN_VERSION=\""2.0"\" -I.. -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -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/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -march=native -O2 -pipe -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes  -Wmissing-declarations -Winit-self -Wpointer-arith  -Wmissing-format-attribute -Wformat-security -Wlogical-op -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type   -c gimptool.c
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -DGIMP_APP_VERSION=\"2.9\" -DLOCALEDIR=\""/usr/share/locale"\" -DPREFIX=\""/usr"\" -DEXEC_PREFIX=\""/usr"\" -DBINDIR=\""/usr/bin"\" -DSBINDIR=\""/usr/sbin"\" -DLIBEXECDIR=\""/usr/libexec"\" -DDATADIR=\""/usr/share"\" -DDATAROOTDIR=\""/usr/share"\" -DSYSCONFDIR=\""/etc"\" -DSHAREDSTATEDIR=\""/usr/com"\" -DLOCALSTATEDIR=\""/var/lib"\" -DLIBDIR=\""/usr/lib64"\" -DINFODIR=\""/usr/share/info"\" -DMANDIR=\""/usr/share/man"\" -DGIMPPLUGINDIR=\""/usr/lib64/gimp/2.0"\" -DGIMPDATADIR=\""/usr/share/gimp/2.0"\" -DCC=\""x86_64-pc-linux-gnu-gcc"\" -DGIMPDIR=\""GIMP"\" -DGIMP_PLUGIN_VERSION=\""2.0"\" -I.. -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -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/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -march=native -O2 -pipe -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes  -Wmissing-declarations -Winit-self -Wpointer-arith  -Wmissing-format-attribute -Wformat-security -Wlogical-op -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type   -c test-clipboard.c
invert-svg.c:18:21: fatal error: gio/gio.h: No such file or directory


it's not really an urgent issue for me but as you found out, gnome2_src_prepare is breaking the compilation, at least for now, maybe upstream resolves that soon.

thank you for your time and for maintaining gimp.
Comment 6 Sebastian Pipping gentoo-dev 2017-04-09 12:21:33 UTC
What we have here is going to affect the next release, true.
If working gimp-9999 helps with translating that's a motivation to keep it alive.


> invert-svg.c:18:21: fatal error: gio/gio.h: No such file or directory

Is that with the same set of use flags still?
I tried once more with the exact same flags and invert-svg.c was compiled without problems.

/usr/include/glib-2.0/gio/gio.h is part of dev-libs/glib which I bet you have around :)  The output you shared does contain -I/usr/include/glib-2.0 to make it work but is from other .c files than invert-svg.c.  Can you upload a full build log for the gio error case once more?

Best, Sebastian
Comment 7 Miroslav Šulc gentoo-dev 2017-04-09 14:20:10 UTC
Created attachment 469542 [details]
build.log: invert-svg.c:18:21: fatal error: gio/gio.h: No such file or directory

thanks for response. attaching the build.log. and yes, i have that file on my system:

$ equery files glib | grep "gio/gio\.h$"
/usr/include/glib-2.0/gio/gio.h

# equery list glib
 * Searching for glib ...
[IP-] [  ] dev-libs/glib-2.50.3-r1:2

i re-emerged glib and then tried to emerge gimp again but it fails the same way.
Comment 8 Sebastian Pipping gentoo-dev 2017-04-09 16:05:04 UTC
Thanks for the new log, that helped!


This line for you

  gcc -o invert-svg invert-svg.c

is this line for me:

  gcc -o invert-svg invert-svg.c -lgio-2.0 -lgobject-2.0 -lglib-2.0 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include

That is because the file is compile using

  invert-svg$(BUILD_EXEEXT): invert-svg.c
	$(CC_FOR_BUILD) -o $@ $< $(NATIVE_GLIB_LIBS) $(NATIVE_GLIB_CFLAGS)

and configure only fills in NATIVE_GLIB_* properly with --enable-vector-icons which happened to slip through for me, despite requesting your use flags.  I would have needed USE="....... -vector-icons" more, I suppose.


To summarize:

 * Try USE=vector-icons for a workaround

 * We have something more worth reporting upstream.  Will do in a sec.
Comment 9 Sebastian Pipping gentoo-dev 2017-04-09 16:12:20 UTC
That new bug report, for the record:
https://bugzilla.gnome.org/show_bug.cgi?id=781098
Comment 10 Miroslav Šulc gentoo-dev 2017-04-09 17:14:25 UTC
exactly as you wrote, thanks a ton! i have the latest greatest gimp again :-)
Comment 11 Sebastian Pipping gentoo-dev 2017-04-09 17:59:43 UTC
Glad to hear!

I'll keep the bug open a bit more until GIMP_DISABLE_DEPRECATED has been addressed on way or another.
Comment 12 Sebastian Pipping gentoo-dev 2017-08-30 14:25:32 UTC
Fixed for everyone now:
https://github.com/gentoo/gentoo/commit/f77a6f6f98e8b134706bf90cdf2de7e046b2eab0