emerge fails on this step: /usr/bin/vapigen-0.26 --library gcr-ui-3 --metadatadir ./ui --vapidir . --girdir . --pkg glib-2.0 --pkg gio-2.0 --pkg gck-1 --pkg gcr-3 --pkg gtk+-3.0 GcrUi-3.gir GcrUi-3.gir:1623.5-1625.58: error: `Gcr' already contains a definition for `UNLOCK_OPTION_IDLE' gcr-3.vapi:433.2-433.40: note: previous definition of `UNLOCK_OPTION_IDLE' was here public const string UNLOCK_OPTION_IDLE; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Generation failed: 1 error(s), 0 warning(s) /usr/share/vala/Makefile.vapigen:61: recipe for target 'gcr-ui-3.vapi' failed Reproducible: Always Steps to Reproduce: 1. emerge app-crypt/gcr-3.14.0
Created attachment 394134 [details] emerge info
Created attachment 394136 [details] emerge -pqv
Created attachment 394138 [details] build log
Created attachment 394140 [details] environment
searching online was rather fruitless. I did find these two pastebin entries with the same error but they are rather old so I'm guessing this is something about my environment/toolchain rather than code in gcr itself: http://pastebin.com/cXSRM97s http://pastebin.com/6aaYyDkG
I think it might be this: https://bugzilla.gnome.org/show_bug.cgi?id=720504
I tried to apply the patch mentioned in that bug report but it seems user patches are not supported for this package.
That patch is in upstream gcr since 2013 Maybe this is caused by the bug referenced in https://git.gnome.org/browse/gcr/patch/?id=58de2d787a31175b26687b9a228da0fb1cea5809
+ 20 Jan 2015; Pacho Ramos <pacho@gentoo.org> + +files/gcr-3.14.0-race-building.patch, -gcr-3.10.1.ebuild, gcr-3.14.0.ebuild: + Fix race building gdbus-codegen header and source, drop old + Please retry with this
I emerge --sync'd today and tried again and am still getting this error: g-ir-scanner: compile: cc -Wno-deprecated-declarations -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/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/freetype2 -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/p11-kit-1 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -fomit-frame-pointer -march=corei7 -O2 -pipe -ggdb3 -Wno-strict-aliasing -Wno-sign-compare -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/atk-1.0 -I/usr/include/p11-kit-1 -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/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -c -o /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/tmp-introspectW4KlY_/GcrUi-3.o /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/tmp-introspectW4KlY_/GcrUi-3.c g-ir-scanner: link: /bin/sh ./libtool --mode=link --tag=CC cc -o /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/tmp-introspectW4KlY_/GcrUi-3 -export-dynamic -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -fomit-frame-pointer -march=corei7 -O2 -pipe -ggdb3 -Wno-strict-aliasing -Wno-sign-compare -Wl,-O1 -Wl,--as-needed /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/tmp-introspectW4KlY_/GcrUi-3.o -L. libgcr-base-3.la libgcr-ui-3.la -Wl,--export-dynamic -lgmodule-2.0 -pthread -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lp11-kit libtool: link: cc -o /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/tmp-introspectW4KlY_/.libs/GcrUi-3 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -fomit-frame-pointer -march=corei7 -O2 -pipe -ggdb3 -Wno-strict-aliasing -Wno-sign-compare -Wl,-O1 -Wl,--as-needed /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/tmp-introspectW4KlY_/GcrUi-3.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -L. ./.libs/libgcr-base-3.so ./.libs/libgcr-ui-3.so /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/.libs/libgcr-base-3.so /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/.libs/libgck-1.so -lgthread-2.0 -lgcrypt -lgpg-error -lgmodule-2.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lp11-kit -pthread /usr/bin/g-ir-compiler --includedir=. --includedir=. GcrUi-3.gir -o GcrUi-3.typelib /usr/bin/vapigen-0.26 --library gcr-ui-3 --metadatadir ./ui --vapidir . --girdir . --pkg glib-2.0 --pkg gio-2.0 --pkg gck-1 --pkg gcr-3 --pkg gtk+-3.0 GcrUi-3.gir GcrUi-3.gir:1623.5-1625.58: error: `Gcr' already contains a definition for `UNLOCK_OPTION_IDLE' gcr-3.vapi:433.2-433.40: note: previous definition of `UNLOCK_OPTION_IDLE' was here public const string UNLOCK_OPTION_IDLE; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Generation failed: 1 error(s), 0 warning(s)
Attach new build.log please
Created attachment 396254 [details] build log
All this previous errors look strange to me (like something involving either gcc-4.9 or glibc) /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/<built-in>:33: syntax error, unexpected LONG in '#define __SIZE_TYPE__ long unsigned int' at 'long' /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/<built-in>:34: syntax error, unexpected OBJECT_MACRO, expecting identifier or '(' or '*' or ';' in '#define __PTRDIFF_TYPE__ long int' at '#define __PTRDIFF_TYPE__' /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/<built-in>:39: syntax error, unexpected OBJECT_MACRO, expecting identifier or '(' or '*' or ';' in '#define __CHAR16_TYPE__ short unsigned int' at '#define __CHAR16_TYPE__' /var/tmp/portage/app-crypt/gcr-3.14.0/work/gcr-3.14.0/<built-in>:40: syntax error, unexpected OBJECT_MACRO, expecting identifier or '(' or '*' or ';' in '#define __CHAR32_TYPE__ unsigned int' at '#define __CHAR32_TYPE__'
I am using gcc-4.9.2. Do you have any suggestions on what I can do?
Created attachment 396426 [details] build log
Created attachment 396428 [details] emerge info
Created attachment 396430 [details] emerge -pqv
Created attachment 396432 [details] environment
Created attachment 396434 [details] configure log
I had -ggdb3 enabled in CFLAGS/CXXFLAGS and this was the root cause. I changed it to -g using package.env and it compiled and emerged fine.
Looks like a gobject-introspection bug, applying this patch to gobject-introspection should work: https://git.gnome.org/browse/gobject-introspection/patch/?id=d2dce55c971fc44cc327818b0341eb89f1243db6
+*gobject-introspection-1.42.0-r1 (18 Feb 2015) + + 18 Feb 2015; Pacho Ramos <pacho@gentoo.org> + +files/gobject-introspection-1.42.0-cpp-flags.patch, + +gobject-introspection-1.42.0-r1.ebuild, -gobject-introspection-1.38.0.ebuild, + -gobject-introspection-1.40.0-r1.ebuild, -gobject-introspection-1.42.0.ebuild: + Scanner: don't pass certain debug level flags to cpp (from 'master'), drop old +