localhost ~ # emerge -pv media-gfx/sane-backends These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild U ] media-gfx/sane-backends-1.0.16 [1.0.15-r3] +gphoto2 -ipv6 +usb +v4l 0 kB i686-pc-linux-gnu-gcc -c -march=i686 -pipe -fomit-frame-pointer -O2 -ftracer -f fast-math -fweb -frename-registers -W -Wall -DHAVE_CONFIG_H -I. -I. -I../include -I../include -DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share -DPATH_SANE_LOCK_DIR=/var/lib -DV_MAJOR=1 -DV_MINOR=0 -I/usr/include/gphoto2 -D BACKEND_NAME=canon630u -DLIBDIR=/usr/lib/sane canon630u.c -fPIC -DPIC -o .libs/ canon630u.o In file included from canon630u.c:67: canon630u-common.c:69:1: warning: "USB_DIR_OUT" redefined In file included from canon630u.c:62: ../include/sane/sanei_usb.h:161:1: warning: this is the location of the previous definition In file included from /usr/include/math.h:382, from canon630u-common.c:60, from canon630u.c:67: /usr/include/bits/mathinline.h: In function `tan': /usr/include/bits/mathinline.h:421: error: parse error before "__attribute__" /usr/include/bits/mathinline.h:421: error: `__value2' undeclared (first use in t his function) /usr/include/bits/mathinline.h:421: error: (Each undeclared identifier is report ed only once /usr/include/bits/mathinline.h:421: error: for each function it appears in.) /usr/include/bits/mathinline.h: In function `tanf': /usr/include/bits/mathinline.h:421: error: parse error before "__attribute__" /usr/include/bits/mathinline.h:421: error: `__value2' undeclared (first use in t his function) /usr/include/bits/mathinline.h: In function `tanl': /usr/include/bits/mathinline.h:421: error: parse error before "__attribute__" /usr/include/bits/mathinline.h:421: error: `__value2' undeclared (first use in t his function) canon630u.c: At top level: canon630u.c:312: warning: dereferencing type-punned pointer will break strict-al iasing rules canon630u.c:415: warning: dereferencing type-punned pointer will break strict-al iasing rules canon630u.c:458: warning: dereferencing type-punned pointer will break strict-al iasing rules canon630u.c:502: warning: dereferencing type-punned pointer will break strict-al iasing rules canon630u.c:546: warning: dereferencing type-punned pointer will break strict-al iasing rules make[1]: *** [canon630u.lo] Error 1 make[1]: Leaving directory `/var/tmp/portage/sane-backends-1.0.16/work/sane-back ends-1.0.16/backend' make: *** [all-recursive] Error 1 !!! ERROR: media-gfx/sane-backends-1.0.16 failed. !!! Function src_compile, Line 97, Exitcode 2 Reproducible: Always Steps to Reproduce: 1. 2. 3.
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5.20050722-r0, 2.6.12-gentoo-r8 i686) ================================================================= System uname: 2.6.12-gentoo-r8 i686 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.12.0_pre6 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.3.4-r1, 2.4.1-r1 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6 sys-devel/binutils: 2.16.91.0.2 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS=" -march=i686 -pipe -fomit-frame-pointer -O2 -ftracer -ffast-math -fweb -frename-registers" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS=" -march=i686 -pipe -fomit-frame-pointer -O2 -ftracer -ffast-math -fweb -frename-registers -fvisibility-inlines-hidden" DISTDIR="/media/hda8/gentoo/distfiles" FEATURES="autoconfig buildpkg ccache distlocks prelink sandbox sfperms strict strip" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" LANG="ru_RU.UTF-8" LDFLAGS=" -Wl,-O1 -Wl,--sort-common -Wl,--enable-new-dtags " LINGUAS="ru" MAKEOPTS="-j1" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X acl acpi alsa apache2 bash-completion bzip2 cjk crypt cups curl dbus dvdr exif firefox gif gnome gnutls gpm gsm gtk2 hal javascript jpeg logrotate mad mailwrapper mmx moznocompose moznoirc moznomail mp3 ncurses nls nptl oggvorbis opengl oss pam pam_console pic png readline samba slang socks5 sse ssl svg tiff truetype unicode xprint xv zlib linguas_ru userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL
Did you try taking off those CFLAGS after -02?
It's a problem with -ffast-math. Disable that CFLAG and try again.
If you have a solution you should strip this flag in ebuild and update it in portage for all peoples good luck
(In reply to comment #4) > If you have a solution > > you should strip this flag in ebuild > and update it in portage > for all peoples You've been told multiple times to disable the stupid -ffast-math flag b/c it breaks things (also see man gcc).
so, make patch for your software, please or declare it, public - my software is not compatible with -ffast-math I have compiled all my distro with this flag, but only this software seems to be incompatible. Correct the error, plesea. currently the portage havent feature per package cflags pleaze fix.
(In reply to comment #6) > so, make patch for your software, please > or declare it, public - my software is not compatible with -ffast-math sane-backends is a Gentoo software? I must have missed something - its homepage is http://www.sane-project.org/ ;p
I also think that you should not globally enable -ffast-math, that's just begging for trouble. But for the case nobody noticed, the error is not in a sane-backends file but in a glibc header. /usr/include/bits/mathinline.h: In function `tan': /usr/include/bits/mathinline.h:421: error: parse error before "__attribute__" So perhaps toolchain should better decide what to do with this bug.
at any rate, this is a bug in sane-backends, not in glibc sane/sanei_backend.h has this: #define __unused__ __attribute__((unused)) when you include math.h with -O# and -ffast-math, glibc defines some inline math functions, such as tan, in bits/mathinline.h however, the aforementioned #define screws it up because the glibc definition says: register long double __value2 __attribute__ ((__unused__)); \ so after we apply all the preprocessor macros, we end up with: register long double __value2 __attribute__ (( __attribute__ ((unused)) )); the fix is to run something like s/__unused__/__sane_unused__/ on the source code
Why don't people just leave their fingers off reserved names? :-) Thanks SpanKY!