Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 37081 - linux-headers-2.6.0: redefinition of struct timespec
Summary: linux-headers-2.6.0: redefinition of struct timespec
Status: VERIFIED DUPLICATE of bug 31285
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-03 02:35 UTC by Udo Beckmann
Modified: 2004-01-04 13:18 UTC (History)
1 user (show)

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


Attachments
/usr/include/time.h (time.h,12.68 KB, text/plain)
2004-01-04 08:53 UTC, Udo Beckmann
Details
/usr/include/linux/time.h (time.h,12.55 KB, text/plain)
2004-01-04 08:54 UTC, Udo Beckmann
Details
/usr/include/sys/time.h (time.h,6.27 KB, text/plain)
2004-01-04 08:55 UTC, Udo Beckmann
Details
/var/tmp/portage/ffmpeg-0.4.7/work/ffmpeg-0.4.7/grab.c (grab.c,54 bytes, text/plain)
2004-01-04 09:02 UTC, Udo Beckmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Udo Beckmann 2004-01-03 02:35:01 UTC
when compiling media-video/avifile-0.7.38.20030710 or media-video/ffmpeg-0.4.7
I get the error messages listed below
==============================================================================
In file included from /usr/include/linux/videodev2.h:16,
from /usr/include/linux/videodev.h:8,
from
grab.c:32: /usr/include/linux/time.h:11: redefinition of `struct timespec'
make[2]: *** [grab.lo] Error 1
==============================================================================
Instead media-video/ffmpeg-0.4.8 compiles without problems.

If I replace "#ifndef _timespec_defined" with "#ifndef __timespec_defined"
in /usr/include/linux/time.h then avifile-0.7.38.2003071 also compiles without
problems

But this trick does not work for ffmpeg-0.4.7. The compiler still complains 
about duplicate definitions of struct timezone itimerval and itimerspec.


Reproducible: Always
Steps to Reproduce:




emerge info 
Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 
2.6.0-gentoo-r1) 
================================================================= 
System uname: 2.6.0-gentoo-r1 i686 AMD Athlon(tm) XP 2500+ 
Gentoo Base System version 1.4.3.10 
ccache version 2.3 [enabled] 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo 
http://ftp.uni-erlangen.de/pub/mirrors/gentoo 
ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo 
http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ 
ftp://ftp.uninett.no/pub/linux/Gentoo" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="3dfx 3dnow 3ds S3TC X X509 Xaw3d acpi acpi4linux alsa apache2 arts avi 
berkdb caps cdr crypt cups curl dga dv encode ext-zlib faad fbcon fbdev 
foomaticdb freetype fs gd gd-external gdbm gif glut gphoto2 gpm gtk gtk2 
imagemagick imlib innodb ipv6 java javascript jdepend jikes joystick jpeg js 
jython kde ladcca lcms ldap libwww lids mad maildir mbox mcal mikmod 
mldonkeypango mmx motif mozilla mpeg mysql ncurses nls nvidia oav oci8 odbc 
oggvorbis opengl oss pam parse-clocks pdflib perl php pic plotutils png pnp 
ppds prelude python qt quicktime readline regexp samba scanner sdl slang speedo 
speex spell sse ssl stencil-buffer svga tcltk tcpd tetex threads tiff transcode 
truetype type1 usb wmf x86 xfs xml2 xmms xv zlib linguas_de"
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2004-01-03 03:30:43 UTC
Avifile is also now fixed. Make sure you've got linux-headers-2.6.0, ebuild CVS revision 1.2 and avifile-0.7.38.20030710, ebuild CVS revision 1.8.


*** This bug has been marked as a duplicate of 31285 ***
Comment 2 Udo Beckmann 2004-01-04 02:10:02 UTC
avifile-0.7.38.20030710 now compiles on my system but ffmpeg-0.4.7
is still broken.
Comment 3 Tim Yamin (RETIRED) gentoo-dev 2004-01-04 06:23:19 UTC
Hmm - what error do you get with ffmpeg?
Comment 4 Udo Beckmann 2004-01-04 06:32:07 UTC
# emerge -pv ffmpeg
.....
[ebuild     UD] media-video/ffmpeg-0.4.7 [0.4.8] +mmx +encode +oggvorbis -doc +faad -dvd -static +sdl +imlib +truetype

# emerge --oneshot ffmpeg
.....
gcc -mcpu=athlon-xp -O3 -pipe -fomit-frame-pointer -Wall -g -I.. -I/var/tmp/portage/ffmpeg-0.4.7/work/ffmpeg-0.4.7 -I/var/tmp/portage/ffmpeg-0.4.7/work/ffmpeg-0.4.7/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o grab.o grab.c
In file included from grab.c:25:
/usr/include/sys/time.h:58: redefinition of `struct timezone'
/usr/include/sys/time.h:95: parse error before numeric constant
/usr/include/sys/time.h:109: redefinition of `struct itimerval'
In file included from grab.c:26:
/usr/include/time.h:160: redefinition of `struct itimerspec'
make[1]: *** [grab.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/ffmpeg-0.4.7/work/ffmpeg-0.4.7/libavformat'
make: *** [lib] Error 2

!!! ERROR: media-video/ffmpeg-0.4.7 failed.
!!! Function src_compile, Line 56, Exitcode 2
!!! make failed.
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2004-01-04 07:46:40 UTC
Hmm - something is very wrong somewhere and it doesn't look like the linux-headers are to blame.

Can you please attach:-

/usr/include/time.h
/usr/include/linux/time.h
/usr/include/sys/time.h
/var/tmp/portage/ffmpeg-0.4.8/work/ffmpeg-0.4.8/libavformat/grab.c
Comment 6 Udo Beckmann 2004-01-04 08:53:55 UTC
Created attachment 23140 [details]
/usr/include/time.h
Comment 7 Udo Beckmann 2004-01-04 08:54:32 UTC
Created attachment 23141 [details]
/usr/include/linux/time.h
Comment 8 Udo Beckmann 2004-01-04 08:55:06 UTC
Created attachment 23142 [details]
/usr/include/sys/time.h
Comment 9 Udo Beckmann 2004-01-04 09:02:45 UTC
Created attachment 23143 [details]
/var/tmp/portage/ffmpeg-0.4.7/work/ffmpeg-0.4.7/grab.c

I'm adding grab.c of (the actual stable) ffmpeg-0.4.7 (not of ffmpeg-0.4.8 as
requested) because ffmpeg-0.4.8 compiles without problems (See my initial error
description)
Comment 10 Tim Yamin (RETIRED) gentoo-dev 2004-01-04 10:22:29 UTC
Ah, I was looking at the wrong version - that helps. I've patched 0.4.7, just sync your tree and it should compile without any problems. Thanks, closing bug.
Comment 11 Udo Beckmann 2004-01-04 13:18:21 UTC
all fine now, Thanks!