Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38883 - media-libs/svgalib-1.9.17-r3 does not compile against gs-sources-2.4.23_pre8-r2 with gcc 3.2.3-r3
Summary: media-libs/svgalib-1.9.17-r3 does not compile against gs-sources-2.4.23_pre8-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Bob Johnson (RETIRED)
URL:
Whiteboard:
Keywords:
: 39432 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-20 21:32 UTC by Sigurd Hogsbro
Modified: 2004-01-26 09:08 UTC (History)
4 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 Sigurd Hogsbro 2004-01-20 21:32:07 UTC
Build of svgalib fails on 2.4.23 kernel installed from gs-sources ebuild.

Reproducible: Always
Steps to Reproduce:
1. emerge media-libs/svgalib-1.9.17-r3
2.
3.

Actual Results:  
make: Entering directory
`/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper'
rm -f *.ko *.o *~ core .depend *.bak *.orig
gcc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE  -nostdinc -iwithprefix include
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper/include
-I. -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default
-DSVGALIB_HELPER_MAJOR=209 -M *.c > .depend
gcc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE  -nostdinc -iwithprefix include
-I/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper/include
-I. -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default
-DSVGALIB_HELPER_MAJOR=209  -c -o main.o main.c
In file included from main.c:24:
kernel26compat.h:17: redefinition of `irqreturn_t'
/usr/src/linux/include/linux/interrupt.h:16: `irqreturn_t' previously declared here
make: *** [main.o] Error 1
make: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper'
 
!!! ERROR: media-libs/svgalib-1.9.17-r3 failed.
!!! Function src_compile, Line 59, Exitcode 2
!!! Failed to build kernel module!


Expected Results:  
Completed build

This is similar to the bug already fixed for other 2.4 kernel-builds. I did not
find a fix for gs-sources.
Comment 1 Sigurd Hogsbro 2004-01-20 21:33:46 UTC
Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.23_pre7-gss)
=================================================================
System uname: 2.4.23_pre7-gss i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.10
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /opt/tomcat/conf /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/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/ ftp://ftp.easynet.nl/mirror/gentoo/ http://ftp.easynet.nl/mirror/gentoo/ http://gentoo.oregonstate.edu/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X X509 alsa apache2 apm arts autofs avi berkdb bonobo crypt cups debug directfb doc dvd encode esd faad fbcon flac foomaticdb gdbm gif gnome gpm gtk gtk2 guile imap imlib java jpeg ldap libg++ libwww mad maildir mbox mikmod motif mozilla mpeg mysql ncurses net-snmp nls oggvorbis opengl openssh oss pam pdflib perl png ppds python quicktime readline samba sdl slang spell ssl svga tcpd tetex tiff truetype usb x86 xine xml xml2 xmms xv zeo zlib video_cards_i810"
Comment 2 Sigurd Hogsbro 2004-01-20 21:35:33 UTC
sys-kernel/linux-headers-2.4.19-r1
Comment 3 STefan 2004-01-21 14:30:41 UTC
As I already mentioned at another bugreport:

The redefinition

"kernel26compat.h:17: redefinition of `irqreturn_t'"

is done in gentoo patch, svgalib-1.9.17-linux2.6.patch, this error doesn't occur on my 

sh-2.05b# grep -r 'irqreturn_t' *
svgalib-1.9.17-linux2.6.patch:+typedef void irqreturn_t;
svgalib-1.9.17-linux2.6.patch:+static irqreturn_t vsync_interrupt(int irq, void *dev_id, struct pt_regs *regs)
sh-2.05b#

So I guess there is a little bug in svgalib-1.9.17-linux2.6.patch

Can the guy who is responsible for that patch fix it his code and then update the patch, with out testing -->I think this should work

In  svgalib-1.9.17-linux2.6.patch there is a define


+typedef void irqreturn_t;

to fix the redefinition it should be:

#ifdef irqreturn_t
#undef irqreturn_t
typedef void irqreturn_t;
Comment 4 Tim Yamin (RETIRED) gentoo-dev 2004-01-21 15:04:06 UTC
You shouldn't do that. That support in the patch is there for a purpose, so the patch needs to be done in interrupts.h in the kernel sources: 2.4 sources should *not* use 2.6-like headers internally which is what we are getting here. Until these headers are in the vanilla patch, the patch should be kept-as is for the irqreturn_t part. As a result, the following lines need to go or be commented in interrupt.h

--
/* For 2.6.x compatibility */
typedef void irqreturn_t;
#define IRQ_NONE
#define IRQ_HANDLED
#define IRQ_RETVAL(x)
--

Secondly, you can't #undef things unless they are #defined: that's [ typedef void irqreturn_t; ] which is a language construct so it won't work...
Comment 5 STefan 2004-01-21 16:07:39 UTC
 "Secondly, you can't #undef things unless they are #defined: that's [ typedef void irqreturn_t; ] which is a language construct so it won't work."

*Grrr*

Yeah you are right, what an insane Idea, I haven't been writing any C code for some time.
For the last 6 month I have been coding in perl java and delphi.

Shame on me :-)
Comment 6 Heinrich Wendel (RETIRED) gentoo-dev 2004-01-26 03:41:56 UTC
*** Bug 39432 has been marked as a duplicate of this bug. ***
Comment 7 Tim Yamin (RETIRED) gentoo-dev 2004-01-26 09:08:51 UTC
Okay, since vanilla 2.4.23 has this in I've updated the patch in CVS to ignore irqreturn_t on > 2.4.23 kernels... If you ``emerge sync'' [ rsync delays are up to one hour! ] then things should compile properly.