Summary: | dev-libs/libindicator-0.3.6 fails to build | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jean-Francis Roy <jeanfrancis> |
Component: | [OLD] GNOME | Assignee: | XFCE Team <xfce> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gnome |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Output of the command of comment #4
Output of the command of comment #7 Test for #include <math.h |
Description
Jean-Francis Roy
2010-03-31 18:22:04 UTC
I think this bug should be reassigned to XFCE team (but I didn't have this option when I filled the bug report... at least I didn't see it). (In reply to comment #0) > cc1: warnings being treated as errors > indicator-image-helper.c: In function ‘refresh_image’: > indicator-image-helper.c:79: error: implicit declaration of function > ‘round’ > indicator-image-helper.c:79: error: incompatible implicit declaration of > built-in function ‘round’ My first thought was that indicator-image-helper.c does not #include <math.h>, but I checked and it does. Perhaps there's something wrong with the glibc headers on your system. Try re-emerging sys-libs/glibc. If that fails, please run the following command as root and attach the output. cd /var/tmp/portage/dev-libs/libindicator-0.3.6/work/libindicator-0.3.6/libindicator && gcc -DHAVE_CONFIG_H -I. -I.. -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gio-unix-2.0/ -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -DG_LOG_DOMAIN=\"libindicator\" -E indicator-service-manager.c Here's that command again, but easier to copy-and-paste. cd /var/tmp/portage && \ cd dev-libs/libindicator-0.3.6 && \ cd work/libindicator-0.3.6/libindicator && \ gcc -DHAVE_CONFIG_H -I. -I.. \ -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include \ -I/usr/include/atk-1.0 -I/usr/include/cairo \ -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 \ -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 \ -I/usr/include/freetype2 -I/usr/include/libpng12 \ -I/usr/include/gio-unix-2.0/ -I/usr/include/dbus-1.0 \ -I/usr/lib64/dbus-1.0/include \ -DG_LOG_DOMAIN=\"libindicator\" \ -E indicator-service-manager.c Created attachment 226009 [details] Output of the command of comment #4 Still failing after reinstalling glibc. <math.h> is included as you said earlier... I attached the output of the command. Sorry, I'm tired. I copied and pasted the wrong filename into the command I gave you. The command should should have been: cd /var/tmp/portage && \ cd dev-libs/libindicator-0.3.6 && \ cd work/libindicator-0.3.6/libindicator && \ gcc -DHAVE_CONFIG_H -I. -I.. \ -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include \ -I/usr/include/atk-1.0 -I/usr/include/cairo \ -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 \ -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 \ -I/usr/include/freetype2 -I/usr/include/libpng12 \ -I/usr/include/gio-unix-2.0/ -I/usr/include/dbus-1.0 \ -I/usr/lib64/dbus-1.0/include \ -DG_LOG_DOMAIN=\"libindicator\" \ -E indicator-image-helper.c + 31 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> + libindicator-0.3.6.ebuild: + Don't build with -Werror wrt #312463 by Jean-Francis Roy. (In reply to comment #8) > + 31 Mar 2010; Samuli Suominen <ssuominen@gentoo.org> > + libindicator-0.3.6.ebuild: > + Don't build with -Werror wrt #312463 by Jean-Francis Roy. > Fixed then. But there's still something weird happening on Jean-Francis Roy's system. Why wouldn't #include <math.h> provide the prototype of round()? Perhaps something out of place in the include path? A rogue math.h? Help. I'll have nightmares. Created attachment 226055 [details] Output of the command of comment #7 Well, I just tested #include <math.h> in a small C program and it works fine... I'm clueless as well... Well, for the interested: GCC seems to default to -std=c89. Compiling with -std=c99 resolves the problem. I manually edited the makefile to change the following line : CC = x86_64-pc-linux-gnu-gcc to this: CC = x86_64-pc-linux-gnu-gcc -std=c99 I neved noticed this kind of error before and I'm surprised I'm the only one getting it...! Created attachment 226185 [details]
Test for #include <math.h
Chris, You might want to try to compile the test.c file I just attached on your machine. On an Ubuntu box (10.04 beta/rc/whathever), it compiles fine, but fails with -std=c89. It seems to default to c99. On my Gentoo box, it fails with no parameter, but compiles fine with -std=c99. I'd appreciate if you would confirm that it's not only my Gentoo box that defaults to -c89... :) (In reply to comment #14) > I'd appreciate if you would confirm that it's not only my Gentoo box that > defaults to -c89... :) It is just your box, works fine for me on stable x86. Strange. Using Funtoo unstable here, GCC 4.4.2. If someone could verify with GCC 4.4.2, I would be glad also. :-) (In reply to comment #14) > You might want to try to compile the test.c file I just attached on your > machine. On an Ubuntu box (10.04 beta/rc/whathever), it compiles fine, but > fails with -std=c89. It seems to default to c99. According to the gcc manpage, the default for C code is gnu89, which is c89 plus some GNU features (including the `round` function). So this should work, and it should be the default anyway: gcc -std=gnu89 -o test test.c (In reply to comment #17) > According to the gcc manpage, the default for C code is gnu89, which is c89 > plus some GNU features (including the `round` function). I meant to say: According to the gcc manpage, the default for C code is gnu89, which is c89 plus some _C99_ features (including the `round` function). Yep you're exactly right. I've open a bug report (bug #312711) about this...! The command you posted does not compile here... (with -std=gnu89). Very strange! |