svgalib 1.9.17 - release 4 exits after compiling /var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper/main.c Reproducible: Always Steps to Reproduce: just compiling svgalib-1.9.17-r3 Actual Results: compile error : 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 -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -c -o main.o main.c In file included from main.c:24: kernel26compat.h:17: error: redefinition of `irqreturn_t' /usr/src/linux/include/linux/interrupt.h:16: error: `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: just no errors kernel : vanilla-sources 2.4.24 with 2.4.21 kernel headers Gentoo : 1.4 updated to every last package In file /var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper/kernel26compat.h # if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23) typedef void irqreturn_t; # endif In this, the typedef should be applied when kernel_version is less than 2,4,23. With me, it should never be defined, while it is present in de kernelheaders and this is in /usr/src/linux/include/linux/interrupt.h:16 My emerge --info Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.24) ================================================================= System uname: 2.4.24 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.13 distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] Autoconf: sys-devel/autoconf-2.58 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -mcpu=pentium3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -mcpu=pentium3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs buildpkg ccache distcc sandbox" GENTOO_MIRRORS="ftp://ftp.nluug.nl/pub/os/Linux/distr/gentoo" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb cdr crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"
A little tweak that helps the package compile : Open file /usr/src/linux-2.4.24/include/linux/interrupt.h and comment out and search for : /* For 2.6.x compatibility */ typedef void irqreturn_t; Then comment out the typedef and recompile the package, it should be ok now.
*** Bug 41558 has been marked as a duplicate of this bug. ***
Thanks, this helps! Where should we send this fix to?
Created attachment 25710 [details, diff] Patch Can you please try this patch to files/svgalib-1.9.17-linux2.6.patch, and uncomment the change in your kernel sources? Since we don't control the upstream kernel sources, patching those isn't the way to go. Thanks!
Still getting In file included from main.c:24: kernel26compat.h:17: error: redefinition of `irqreturn_t' /usr/src/linux/include/linux/interrupt.h:16: error: `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!
Created attachment 25734 [details, diff] Patch Hmm, sorry, it seems that I got the direction the wrong way round on the first patch. #> cd /usr/portage/media-libs/svgalib/files #> patch -p0 < /path/to/this/patch
patching file svgalib-1.9.17-linux2.6.patch Hunk #1 FAILED at 121. Hunk #2 FAILED at 140. 2 out of 2 hunks FAILED -- saving rejects to file svgalib-1.9.17-linux2.6.patch.rej
Created attachment 25758 [details, diff] svgalib-1.9.17-linux2.6.patch Hmm, strange. Perhaps just replacing that file with this one might be easier... This compiles fine with 2.4 headers and 2.4.24 sources at this end. Thanks!
It works, thanks! Now someone needs to fix it in Portage ;-)
Fixed patch is now in CVS, should hit Portage within an hour. Thanks!