When I attempt to update to KDE-3.1.5, I get the following during the compilation of svgalib-1.9.17-r3 (upgrading from 1.4.3-r4): make: Entering directory `/hyperspace/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/hyperspace/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 -M *.c > .depend gcc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE -nostdinc -iwithprefix include -I/hyperspace/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 main.c:90: parse error before "vsync_interrupt" main.c: In function `svgalib_helper_ioctl': main.c:317: warning: passing arg 2 of `request_irq_R0c60f2e0' from incompatible pointer type main.c:321: warning: passing arg 2 of `request_irq_R0c60f2e0' from incompatible pointer type distcc[9889] ERROR: compile on localhost failed make: *** [main.o] Error 1 make: Leaving directory `/hyperspace/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! I just started using distcc and ccache so I tried disabling distcc and ccache and I still recieved the same error. My laptop upgraded successfully to 1.9.17-r3, however I have a different kernel (2.4.20-gentoo-r5), processor (P3), and video card (Rage-M1) installed on the laptop. Reproducible: Always Steps to Reproduce: 1. emerge --update kde 2. 3. Actual Results: svgalib upgrade failed to compile Expected Results: emerge should have completed successfully Here is my emerge info: Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.4.23_pre8-gss) ================================================================= System uname: 2.4.23_pre8-gss i586 AMD-K6(tm) 3D processor Gentoo Base System version 1.4.3.10 distcc 2.11.1 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=i586 -O2 -fomit-frame-pointer -m3dnow -mmmx -funroll-loops -pipe" CHOST="i586-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="-march=i586 -O2 -fomit-frame-pointer -m3dnow -mmmx -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc fixpackages sandbox" GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://128.213.5.34/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ ftp://lug.mtu.edu/gentoo/source http://adelie.polymtl.ca/ http://mirror.tucdemonic.org/gentoo/ http://gentoo.mirrors.pair.com/ http://cudlug.cudenver.edu/gentoo/ http://oss.redundant.com/pub/gentoo http://gentoo.noved.org/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/hyperspace/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://babylon5/gentoo-portage" USE="3dnow X acl alsa apm arts avi berkdb crypt cups doc dvd encode foomaticdb gdbm gif gpm imlib jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png pnp python qt quicktime readline samba sdl slang spell ssl svga tcpd tetex truetype trusted usb x86 xinerama xml2 xmms xv zlib"
this isnt a games lib martin
what kernel version and what linux-headers version are you using (what is in /usr/src/linux) ?
I currently have the same problem, using vanilla 2.4.24, breaks down at exactly the same position what i was wondering about is, that he applied the svgalib-1.9.17-linux2.6 patch, when i'm using the 2.4.24 kernel, just an idea?
Edit the file /usr/portage/media-libs/svgalib/svgalib-1.9.17-r3.ebuild Look for the Line's: epatch ${FILESDIR}/{P}-linux2.6.patch epatch ${FILESDIR}/{P}-modversions_h.patch and comment out the two line's. Now emerge svgalib. This is a workaround for me because i have the same Problem with Vanilla Sources 2.4.24.
Kernel is v2.4.23_pre8-gss with Linux-headers v2.4.19-r1... I noticed that if I do an "emerge -Dp --update kde" then emerge adds a couple upgrades (graphviz, lcms, libvorbis, openmotif, and docbook-xsl-stylesheets) and two downgrades of foomatic (foomatic-filters-3.0.0.20031018 [20031018] and foomatic-db-engine-3.0.0.20031018 [20031018]) before svgalib... don't know if this has any bearing on the current issue with svgalib not compiling, however I thought I would throw this into the mix... am going to try running the above emerge and see what happens...
p.s sorry about the run on line of text... also you probably wanted to know I am using the sources-gss kernel...
Well, the "emerge -D --update kde" didn't work. svgalib still did not compile, threw the same error. I haven't had the chance to try the work around Sahle posted, I'll give it a try and let you know.
Commenting out the 2.6 patch and the modversions_h patch did the job... Going back and looking at some of the other bug reports for the svgalib, it seems there is something in the 2.6 patch which is causing the compile to break in the 2.4 kernels... Is there some way to make the ebuild say "if kernel > 2.4 then apply 2.6_patch"?
plasmaroo: whats the status of the kernels for this ?
If the linux2.6.patch and modversions_h.patch are not needed for anything except the 2.6 kernels then maybe the following code added to the svgalib-1.9.17-r3.ebuild file would help... I've done some limited testing on the code to make sure it works, however I'm new to ebuilds so I may be wrong about it being functional: # Get it to work with kernel 2.6 if [ `echo \`uname -r\` |grep -c -E [2][.][6][:alnum:]*` = 1 ] ; then epatch ${FILESDIR}/${P}-linux2.6.patch fi # Get modversions.h include right if we have CONFIG_MODVERSIONS set. if [ `echo \`uname -r\` |grep -c -E [2][.][6][:alnum:]*` = 1 ] ; then epatch ${FILESDIR}/${P}-modversions_h.patch fi
The workaround worked great. How can the gentoo developers assume when 2.4 is in the stable branche that stable users are using 2.6 kernel? However, thanks to Christian Sahle and Steven Fox i've a working svgalib now. Thank you two. // G
Mike: Agh, evil irqreturn_t problems again because of more buggy kernels. Georg: I can't reproduce that here. What headers are you using? Steven: The problem occurs because you're using 2.4.23_pre8 which is 132119 in "include/linux/version.h", the same as 2.4.23-release; but the headers are out-of-sync for that kernel release. We can't do anything about that, because if we change the code check to 2.4.24 then those using 2.4.23-release will get problems. If you upgrade gs-sources; that should go away.
Thanks for the info, plasmaroo. I tried "emerge -p --update gs-sources" and portage came back with nothing to update. This is probably due to the fact I updated the gs-sources to 2.4.25_pre6 after I applied the "fix" for this bug because the sources showed up as available after my servers scheduled emerge sync. I tried to emerge svgalib-1.9.17-r3 without the fix and received the exact same error again. After my server performed it's scheduled emerge sync yesterday, I noticed new linux-headers (2.4.19 upgrading to 2.4.21) available, so I went ahead and upgraded the headers and re-emerged glibc. I tried re-emerging svgalib with the same results. The solution seems to be to add a way to not install the linux2.6.patch and modversion_h.patch (because this patch fails without the 2.6 patch) in 2.4.x kernels. As far as I can tell, there is nothing in the modversion_h.patch which is needed for 2.4.x kernels. Is this correct? If so, can the ebuild fix be added to the svgalib ebuild? All it does is check to see if they are using a 2.6.x kernel, if so then it runs the linux2.6.patch and modversions_h.patch files. Otherwise, it skips these two patches. I appreciate how responsive you guys have been to this issue and just want to say thank you SpanKY, Christian, and plasmaroo for all your help so far.
Steven: I was finally able to reproduce this and this is now fixed in CVS inside the patch. The problem seems to be that the userspace headers were being pulled in for the module but the version that was returned was that of the kernel, getting things not included when they should have been because of this "irqreturn_t" mess. Thanks for all your help in tracking this down!
question since this keeps popping up with different kernels ... could you give me an example of the 'broken' header and the 'good' header ? i've just been letting plasmaroo handle these fixes and never actually looked into it myself ... it seems like if i put in a little pkg_setup() magic to detect the broken header (ala the sysctl.h check by glibc) it would make people's lives easier
Mike: Note that there isn't a broken or a fixed - they're just different and things need to be able to cope with both, and preferably 2.4+2.6 or 2.6+2.4 kernel+header combinations as well which is what svgalib should hopefully handle now. So please don't do any scary pkg_setup magic which scares users off and bug me instead if something's broken :-) Here you go anyway: -- # Somewhere in include/linux/interrupt.h for > 2.4.22 && >= 2.6.0 # NOT in <= 2.4.22 -- /* For 2.6.x compatibility */ typedef void irqreturn_t; #define IRQ_NONE #define IRQ_HANDLED #define IRQ_RETVAL(x) --