Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312463 - dev-libs/libindicator-0.3.6 fails to build
Summary: dev-libs/libindicator-0.3.6 fails to build
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: XFCE Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-31 18:22 UTC by Jean-Francis Roy
Modified: 2010-10-26 10:43 UTC (History)
1 user (show)

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


Attachments
Output of the command of comment #4 (libindicator.txt,383.29 KB, text/plain)
2010-03-31 20:36 UTC, Jean-Francis Roy
Details
Output of the command of comment #7 (libindicator.txt,1.37 MB, text/plain)
2010-04-01 02:30 UTC, Jean-Francis Roy
Details
Test for #include <math.h (test.c,115 bytes, text/plain)
2010-04-01 21:18 UTC, Jean-Francis Roy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Francis Roy 2010-03-31 18:22:04 UTC
dev-libs/libindicator has just been bumped to 0.3.6 by the XFCE Team (see bug #310077), but fails to build on my box.

Reproducible: Always

Steps to Reproduce:
1. emerge libindicator
2.
3.

Actual Results:  
/bin/sh ../libtool --silent --tag=CC   --mode=compile x86_64-pc-linux-gnu-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\" -Wall -Werror -march=core2 -O2 -pipe -c -o libindicator_la-indicator-service-manager.lo `test -f 'indicator-service-manager.c' || echo './'`indicator-service-manager.c
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’


Expected Results:  
libindicator should compile correctly.

# emerge --info
Portage 2.2_rc67 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.2, glibc-2.9_p20081201-r2, 2.6.33-gentoo x86_64)
=================================================================
System uname: Linux-2.6.33-gentoo-x86_64-Intel-R-_Core-TM-2_CPU_T5600_@_1.83GHz-with-gentoo-2.1.6
Timestamp of tree: Wed, 31 Mar 2010 05:30:23 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.5-r1
dev-util/cmake:      2.8.1
sys-apps/baselayout: 2.1.6
sys-apps/openrc:     0.6.0
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc:       4.4.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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 /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=3.0 --with-bdeps y"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_CA.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
MAKEOPTS="-j3 -l3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sunrise /var/lib/layman/gnome /var/lib/layman/x11 /usr/local/portage/local-overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alac alsa amd64 berkdb bluetooth branding bzip2 cairo cblas cddb cdr cleartype cli consolekit corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr dvdread eds emboss encode evo exif faac fam ffmpeg firefox flac fortran gallium gdbm gif gnome gpm gsl gstreamer gtk hal iconv ipv6 irc jabber jpeg kde lame lapack latex lcms ldap libnotify mad mikmod mmx mng modules mp3 mp4 mpeg msn mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png ppds pppd pulseaudio python qt3support qt4 quicktime readline reflection sdl semantic-desktop session sip spell spl sse sse2 ssl startup-notification subversion svg sysfs tcpd thunar tiff truetype type1 unicode usb vorbis wavpack webkit x264 xcb xml xorg xscreensaver xulrunner xv xvid zlib" 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 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" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard joystick synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau" 
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jean-Francis Roy 2010-03-31 18:23:16 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).
Comment 2 Chris Coleman 2010-03-31 19:15:39 UTC
(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.
Comment 3 Chris Coleman 2010-03-31 19:38:53 UTC
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
Comment 4 Chris Coleman 2010-03-31 19:45:06 UTC
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
Comment 5 Jean-Francis Roy 2010-03-31 20:36:23 UTC
Created attachment 226009 [details]
Output of the command of comment #4
Comment 6 Jean-Francis Roy 2010-03-31 20:37:05 UTC
Still failing after reinstalling glibc. <math.h> is included as you said earlier... I attached the output of the command.
Comment 7 Chris Coleman 2010-03-31 20:56:21 UTC
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
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2010-03-31 21:22:45 UTC
+  31 Mar 2010; Samuli Suominen <ssuominen@gentoo.org>
+  libindicator-0.3.6.ebuild:
+  Don't build with -Werror wrt #312463 by Jean-Francis Roy.
Comment 9 Chris Coleman 2010-03-31 21:48:21 UTC
(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.
Comment 10 Jean-Francis Roy 2010-04-01 02:30:49 UTC
Created attachment 226055 [details]
Output of the command of comment #7
Comment 11 Jean-Francis Roy 2010-04-01 02:34:43 UTC
Well, I just tested #include <math.h> in a small C program and it works fine... I'm clueless as well...
Comment 12 Jean-Francis Roy 2010-04-01 02:42:25 UTC
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...!
Comment 13 Jean-Francis Roy 2010-04-01 21:18:31 UTC
Created attachment 226185 [details]
Test for #include <math.h
Comment 14 Jean-Francis Roy 2010-04-01 21:21:31 UTC
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... :)
Comment 15 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-04-01 21:26:22 UTC
(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. 

Comment 16 Jean-Francis Roy 2010-04-01 21:35:38 UTC
Strange. Using Funtoo unstable here, GCC 4.4.2. If someone could verify with GCC 4.4.2, I would be glad also. :-)
Comment 17 Chris Coleman 2010-04-02 01:45:36 UTC
(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
Comment 18 Chris Coleman 2010-04-02 03:55:00 UTC
(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).
Comment 19 Jean-Francis Roy 2010-04-02 16:18:02 UTC
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!