Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 103118 - ERROR: media-gfx/sane-backends-1.0.16 failed
Summary: ERROR: media-gfx/sane-backends-1.0.16 failed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-20 03:33 UTC by Alexey Maximov
Modified: 2005-09-19 08:41 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Maximov 2005-08-20 03:33:08 UTC
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.
Comment 1 Alexey Maximov 2005-08-20 03:45:24 UTC
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

Comment 2 Kenyon Ralph 2005-08-20 16:27:06 UTC
Did you try taking off those CFLAGS after -02?
Comment 3 Piojo 2005-08-20 21:30:58 UTC
It's a problem with -ffast-math. Disable that CFLAG and try again. 
Comment 4 Alexey Maximov 2005-08-20 22:16:31 UTC
If you have a solution

you should strip this flag in ebuild
and update it in portage
for all peoples

good luck
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2005-08-21 04:53:52 UTC
(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).
Comment 6 Alexey Maximov 2005-08-21 06:36:44 UTC
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.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2005-08-21 12:51:09 UTC
(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
Comment 8 Patrick Kursawe (RETIRED) gentoo-dev 2005-08-22 03:44:00 UTC
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.
Comment 9 SpanKY gentoo-dev 2005-09-17 22:32:11 UTC
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
Comment 10 Patrick Kursawe (RETIRED) gentoo-dev 2005-09-19 08:41:24 UTC
Why don't people just leave their fingers off reserved names? :-)
Thanks SpanKY!