Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390979 - ERROR: x11-libs/gtk+-2.24.8-r1 failed (compile phase)
Summary: ERROR: x11-libs/gtk+-2.24.8-r1 failed (compile phase)
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-19 00:47 UTC by James Steven Supancic III
Modified: 2011-12-17 15:13 UTC (History)
0 users

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


Attachments
emerge --info (gtk+-2.24.8-r1-info,5.25 KB, text/plain)
2011-11-19 00:48 UTC, James Steven Supancic III
Details
the log which contains the error.... (build.log,115.43 KB, text/plain)
2011-11-19 00:51 UTC, James Steven Supancic III
Details
ebuild environment file (environment,246.69 KB, text/plain)
2011-11-19 00:53 UTC, James Steven Supancic III
Details
gobject-introspection build log: fails during revdep-rebuild... (gobject-introspection-0.10.8-build.log,21.54 KB, text/plain)
2011-11-19 19:36 UTC, James Steven Supancic III
Details
gobject-introspection built with -sandbox. (gobject-introspection-0.10.8-nosandbox-build.log,65.68 KB, text/plain)
2011-11-20 01:18 UTC, James Steven Supancic III
Details
libreport failing to build when install abrt. (libreport-2.0.7-build.log,59.27 KB, text/plain)
2011-11-20 05:28 UTC, James Steven Supancic III
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Steven Supancic III 2011-11-19 00:47:27 UTC
gtk+-2.24.8-r1 won't build (stable gtk+-2.24.5 has the same problem). 
In addition to the attached output, 
"g-ir-scanner[12085]: segfault at cf353830 ip 00007fed753c2424 sp 00000000cf353838 error 6 in libsandbox.so[7fed753bb000+11000]" 
appears in dmesg.

Reproducible: Always

Steps to Reproduce:
emerge gtk+

Actual Results:  
emake failed

Expected Results:  
gtk+ emerged
Comment 1 James Steven Supancic III 2011-11-19 00:48:18 UTC
Created attachment 293053 [details]
emerge --info
Comment 2 James Steven Supancic III 2011-11-19 00:51:05 UTC
Created attachment 293055 [details]
the log which contains the error....
Comment 3 James Steven Supancic III 2011-11-19 00:53:19 UTC
Created attachment 293057 [details]
ebuild environment file
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-19 16:27:59 UTC
What version of dev-libs/glib are you using?
Comment 5 James Steven Supancic III 2011-11-19 19:34:46 UTC
I'm using dev-libs/glib-2.30.2. I tried going back to an earlier version (dev-libs/glib-2.30.1-r2) but it didn't help.

I ran python-updater and revdep-rebuild last night. Revdep-rebuild crashes with the same error while building dev-libs/gobject-introspection-0.10.8.

My system is seriously messed up :-( 

glib has the following use flags set:
[ebuild   R   ~] dev-libs/glib-2.30.2  USE="static-libs -debug -doc -fam (-selinux) -systemtap -test -utils -xattr" 0 kB
Should any of those be changed?
Comment 6 James Steven Supancic III 2011-11-19 19:36:55 UTC
Created attachment 293129 [details]
gobject-introspection build log: fails during revdep-rebuild...

A lot of things aren't building anymore... could this be a glib bug and not a gtk+ bug?
Comment 7 James Steven Supancic III 2011-11-19 23:08:54 UTC
I found a solution. I emerge gtk+ and gobject-introspection with the following command:
FEATURES="-sandbox" emerge -av1 gtk+ gobject-introspection
Note, the "-sandbox" part is very important. 
Does this mean that my bug is caused by sandbox (It occurs with 2.4 and 2.5) and not glib or gtk+?
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-19 23:53:45 UTC
This error:
/usr/include/glib-2.0/glib/gthread.h:347: syntax error, unexpected '{' in '  if ((gpointer) (__extension__ ({ G_STATIC_ASSERT (sizeof *(value_location) == sizeof (gpointer)); __sync_synchronize (); (gpointer) *(value_location); })) != ((void *)0))' at '{'

should be theoretically impossible, and indicates something very wrong with your glib, gobject-introspection, or gcc.

First of all, make sure that you don't have a local, manually installed version of glib or gobject-introspection hanging around in your /usr/local.

Second, try rebuilding dev-libs/glib and dev-libs/gobject-introspection, and see if afterwards you can rebuild gtk+.

(In reply to comment #7)
> Note, the "-sandbox" part is very important.

Building with "-sandbox" is dangerous: it would allow a buggy build system to (over)write arbitrary files on your hard drive with no record of it happening. After you had rebuilt glib and gobject-introspection, if gtk+ builds with "-sandbox" but does not build normally, please attach the build logs for both cases. (You can save the complete build log for a successful emerge by adding "keeptemp" to FEATURES.)
Comment 9 James Steven Supancic III 2011-11-20 01:18:46 UTC
Created attachment 293153 [details]
gobject-introspection built with -sandbox.

I rebuilt gcc, glibc, and glib. But I still can't build gobject-introspection without "-sandbox". I've already posted the build.log which occurs when gobject-introspection fails to build in the sandbox. I've attached to this commend a new build.log which shows gobject-introspection correctly building without the sandbox. (FEATURES="-sandbox keeptemp" emerge -av1 gobject-introspection).
Comment 10 James Steven Supancic III 2011-11-20 01:35:13 UTC
When I build gobject-introspection-0.10.8 with sandbox the build fails (g-ir-scanner segfaults). When I build gobject-introspection-0.10.8 with -sandbox the build succeeds. This is clearly a problem with the sandbox package (it shouldn't produce different behavior?) 

Should I post another bug related to sys-apps/sandbox or rename this one?
Comment 11 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-20 03:29:41 UTC
(In reply to comment #10)
> This is clearly a problem with the sandbox package
> (it shouldn't produce different behavior?)

No. If something doesn't build in the sandbox, in 99.9% of cases, it's not a bug in the sandbox, but either in the package that fails to build or in the tools that are used to build it.

Also, the log when building with -sandbox apparently shows the same broken behavior (syntax errors in /usr/include/glib-2.0/glib/gthread.h:347). In other words, the build completes, but the introspection bindings that it installs are likely corrupt.

I find the following message in the log suspicious:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libffi.so.5, needed by /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../lib64/libgio-2.0.so, may conflict with libffi.so.4

What package do you have that installed libffi.so.4? (I hope you haven't tried unmasking the libffi USE flag on sys-devel/gcc)

Please emerge gentoolkit (if you haven't already) and post the output of "gentoolkit -f libffi.so.4".
Comment 12 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-20 03:31:36 UTC
(In reply to comment #11)
> Please emerge gentoolkit (if you haven't already) and post the output of
> "gentoolkit -f libffi.so.4".

I apologize, bad typo. Meant to say "post the output of equery b libffi.so.4"
Comment 13 James Steven Supancic III 2011-11-20 03:51:38 UTC
It seems libffi.so.4 is provided by gcc but libffi.so.5 is provided by the libffi package...

equery b libffi.so.5
app-emulation/emul-linux-x86-baselibs-20110928 (/usr/lib32/libffi.so.5 -> libffi.so.5.0.10)
dev-libs/libffi-3.0.10 (/usr/lib64/libffi.so.5 -> libffi.so.5.0.10)

equery b libffi.so.4
sys-devel/gcc-4.4.6-r1 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.6/32/libffi.so.4 -> libffi.so.4.0.1)
sys-devel/gcc-4.4.6-r1 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.6/libffi.so.4 -> libffi.so.4.0.1)
sys-devel/gcc-4.5.2 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/libffi.so.4 -> libffi.so.4.0.1)
sys-devel/gcc-4.5.2 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/32/libffi.so.4 -> libffi.so.4.0.1)
sys-devel/gcc-4.6.0 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/32/libffi.so.4 -> libffi.so.4.0.1)
sys-devel/gcc-4.6.0 (/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.0/libffi.so.4 -> libffi.so.4.0.1)

Despite the fact that libffi is provided by gcc, I don't have the libffi use flag set for gcc:
Installed versions:  4.4.6-r1(4.4)!s(10:11:19 PM 10/21/2011)(fortran gcj gtk mudflap multilib nls nptl objc objc++ openmp -altivec -bootstrap -build -doc -fixed-point -graphite -hardened -libffi -multislot -nocxx -nopie -nossp -objc-gc -test -vanilla) 4.5.2(4.5)!s(05:48:45 PM 12/31/2010)(fortran gcj gtk mudflap multilib nls nptl objc objc++ openmp -altivec -bootstrap -build -doc -fixed-point -graphite -hardened -libffi -lto -multislot -n32 -n64 -nocxx -nopie -nossp -objc-gc -test -vanilla) 4.6.0(4.6)!s(09:21:57 PM 10/21/2011)(fortran gcj gtk mudflap multilib nls nptl objc objc++ openmp -altivec -bootstrap -build -doc -fixed-point -go -graphite -hardened -libffi -multislot -nocxx -nopie -nossp -objc-gc -test -vanilla)

I have GCC 4.6 installed for my own work, but gcc-config shows that Gentoo should be using gcc-4.5.2.
Comment 14 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-20 04:41:44 UTC
I was wrong on two counts.

First, gcc installs a copy of libffi.so.4 for gcj's use if built with USE="gcj -libffi"; this should not affect gobject-introspection.
Second, it seems that the "/usr/include/glib-2.0/glib/gthread.h:347: syntax error" message is always printed when using gobject-introspection with glib-2.30.2, and is (probably) not dangerous.

In other words, I now think that neither of these error messages explain the segmentation fault when building with -sandbox.

Before turning to app-admin/abrt, I would like to suggest another quick check.

Try:
1. emerge -1 python:2.7
2. eselect python set python2.7

and see whether you still get the same error in gtk+.
Comment 15 James Steven Supancic III 2011-11-20 05:28:44 UTC
Created attachment 293177 [details]
libreport failing to build when install abrt.

Gentoo has worked well for years on this system. But now, suddenly, everything is falling apart. I'm really interested in knowing why, else I'd just reinstall. 

I get the same errors (gtk+ fails to build in the same way) after recompiling python and eselecting. 

I tried to install abrt but libreport-2.0.7 (its prereq) fails to build as well (I've attached the build.log). Should I open a new bug for this?
Comment 16 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-20 06:10:54 UTC
> event_xml_parser.c: In function 'load_event_description_from_file':
> event_xml_parser.c:452:5: warning: implicit declaration of function 'setlocale'
> event_xml_parser.c:452:39: error: 'LC_ALL' undeclared (first use in this function)
> event_xml_parser.c:452:39: note: each undeclared identifier is reported only once for each function it appears in

libreport's event_xml_parser.c #includes internal_libreport.h
libreport's internal_libreport.h #includes config.h if HAVE_CONFIG_H is defined, and according to your log, it's defined.
config.h defines ENABLE_NLS if nls is used by configure - and it is used by configure (the log says "checking whether to use NLS... yes")
libreport's internal_libreport.h #includes <libintl.h> if ENABLE_NLS is defined, and according to the above argument, it must be defined.
glibc's libintl.h #includes <locale.h>
glibc's locale.h declares setlocale and LC_ALL.

In other words, this error should be impossible :/

I apologize, but I must conclude that something went seriously wrong with your system, something that is beyond my ability to diagnose.

At this point, I can only suggest that you search for other sources of help, or perhaps try rebuilding all of your installed packages in a new stage3 chroot (doing "emerge --buildpkg" in the chroot, then copying the .tbz2 binary package files out of the chroot's /usr/portage/packages/All/ to your main system, and installing them on the main system using "emerge --usepkgonly").
Comment 17 Pacho Ramos gentoo-dev 2011-11-20 11:19:23 UTC
I guess you are always getting the same error messages when trying to rebuild broken packages, if, in the other hand, they fail in different ways, maybe you have a hardware problem :/
Comment 18 Pacho Ramos gentoo-dev 2011-12-08 11:10:07 UTC
(In reply to comment #17)
> I guess you are always getting the same error messages when trying to rebuild
> broken packages, if, in the other hand, they fail in different ways, maybe you
> have a hardware problem :/

Any news on this strange issue?
Comment 19 James Steven Supancic III 2011-12-08 15:53:37 UTC
I'm fairly certain it's a software issue because it always fails in exactly the same way and this machine has been vary reliable. 

It appears other users have experienced this same issue (http://forums.gentoo.org/viewtopic-t-897374-start-0.html) and it was resolved by upgrading to gcc-4.6.2. I'm not a big GNOME user so I'll just wait for gcc-4.6.2 to stabilize before I resume using programs which require gtk+ to be built with introspection. In the meanwhile, disabling introspection and rebuilding world is a workaround for most applications.
Comment 20 Pacho Ramos gentoo-dev 2011-12-08 15:57:09 UTC
(In reply to comment #19)
> I'm fairly certain it's a software issue because it always fails in exactly the
> same way and this machine has been vary reliable. 
> 
> It appears other users have experienced this same issue
> (http://forums.gentoo.org/viewtopic-t-897374-start-0.html) and it was resolved
> by upgrading to gcc-4.6.2. I'm not a big GNOME user so I'll just wait for
> gcc-4.6.2 to stabilize before I resume using programs which require gtk+ to be
> built with introspection. In the meanwhile, disabling introspection and
> rebuilding world is a workaround for most applications.

If it's a problem with gcc, maybe it could be workarounded by using a different -march value instead of "native", or using "-O2" instead of nothing :-/
Comment 21 Pacho Ramos gentoo-dev 2011-12-17 15:13:53 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > I'm fairly certain it's a software issue because it always fails in exactly the
> > same way and this machine has been vary reliable. 
> > 
> > It appears other users have experienced this same issue
> > (http://forums.gentoo.org/viewtopic-t-897374-start-0.html) and it was resolved
> > by upgrading to gcc-4.6.2. I'm not a big GNOME user so I'll just wait for
> > gcc-4.6.2 to stabilize before I resume using programs which require gtk+ to be
> > built with introspection. In the meanwhile, disabling introspection and
> > rebuilding world is a workaround for most applications.
> 
> If it's a problem with gcc, maybe it could be workarounded by using a different
> -march value instead of "native", or using "-O2" instead of nothing :-/