Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41553 - while compiling svgalib 1.9.17 r3 it exits with description below
Summary: while compiling svgalib 1.9.17 r3 it exits with description below
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Tim Yamin (RETIRED)
URL:
Whiteboard:
Keywords:
: 41558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-14 04:56 UTC by oosterwoud
Modified: 2004-02-17 17:41 UTC (History)
1 user (show)

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


Attachments
Patch (svgalib-2.4.24.patch,1.09 KB, patch)
2004-02-16 04:21 UTC, Tim Yamin (RETIRED)
Details | Diff
Patch (svgalib-2.4.24.patch,1.10 KB, patch)
2004-02-16 17:43 UTC, Tim Yamin (RETIRED)
Details | Diff
svgalib-1.9.17-linux2.6.patch (svgalib-1.9.17-linux2.6.patch,37.71 KB, patch)
2004-02-17 04:41 UTC, Tim Yamin (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description oosterwoud 2004-02-14 04:56:20 UTC
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"
Comment 1 oosterwoud 2004-02-14 05:06:57 UTC
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.
Comment 2 Florian Effenberger 2004-02-16 00:50:25 UTC
*** Bug 41558 has been marked as a duplicate of this bug. ***
Comment 3 Florian Effenberger 2004-02-16 00:51:24 UTC
Thanks, this helps! Where should we send this fix to?
Comment 4 Tim Yamin (RETIRED) gentoo-dev 2004-02-16 04:21:50 UTC
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!
Comment 5 Florian Effenberger 2004-02-16 06:24:10 UTC
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!
Comment 6 Tim Yamin (RETIRED) gentoo-dev 2004-02-16 17:43:18 UTC
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
Comment 7 Florian Effenberger 2004-02-17 01:39:47 UTC
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
Comment 8 Tim Yamin (RETIRED) gentoo-dev 2004-02-17 04:41:31 UTC
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!
Comment 9 Florian Effenberger 2004-02-17 06:09:18 UTC
It works, thanks!
Now someone needs to fix it in Portage ;-)
Comment 10 Tim Yamin (RETIRED) gentoo-dev 2004-02-17 17:41:00 UTC
Fixed patch is now in CVS, should hit Portage within an hour. Thanks!