Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 11092 - svgalib-1.9.16 ebuild fails with multiple (related) issues
Summary: svgalib-1.9.16 ebuild fails with multiple (related) issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Lowest normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
: 12788 (view as bug list)
Depends on:
Blocks: 11141 12788
  Show dependency tree
 
Reported: 2002-11-22 12:27 UTC by pee
Modified: 2005-05-05 06:14 UTC (History)
7 users (show)

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


Attachments
svgalib_helper patch (svgalib_helper-kernel2.5.patch,914 bytes, patch)
2003-04-13 00:58 UTC, Bedeox
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pee 2002-11-22 12:27:10 UTC
1. The ebuild will (silently) fail on the svgalib_helper line in the ebuild
   This is caught again later during the install process when make will bomb
   out trying to recompile to meet dependencies.

example: 

make[1]: Leaving directory `/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/doc'
(cd kernel/svgalib_helper ; make modules_install )
make[1]: Entering directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/kernel/svgalib_helper'
cc -D__KERNEL__ -DMODULE -Wall -O2  -I/usr/src/linux/include
-DSVGALIB_HELPER_MAJOR=209   -c -o main.o main.c
main.c:18:40: missing binary operator before '('
In file included from main.c:27:
/usr/src/linux/include/asm/irq.h:16:25: irq_vectors.h: No such file or directory
main.c: In function `svgalib_helper_ioctl':
main.c:295: warning: implicit declaration of function `request_irq'
main.c:312: warning: implicit declaration of function `free_irq'
main.c:115: warning: `i' might be used uninitialized in this function
main.c:400:41: missing binary operator before '('
main.c: In function `svgalib_helper_mmap':
main.c:403: structure has no member named `vm_offset'
main.c:412:41: missing binary operator before '('
main.c:421:41: missing binary operator before '('
main.c: In function `__initfn':
main.c:439: warning: implicit declaration of function `devfs_register_chrdev'
main.c:519: warning: implicit declaration of function `devfs_unregister_chrdev'
make[1]: *** [main.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/kernel/svgalib_helper'
make: *** [installmodule] Error 2

!!! ERROR: media-libs/svgalib-1.9.16 failed.
!!! Function src_install, Line 48, Exitcode 2
!!! (no error message)

2. svga helper does not build at least with 2.5.4X kernels
===/usr/src/linux/include/asm/irq.h:
#include <linux/config.h>
#include <linux/sched.h>
/* include comes from machine specific directory */
#include "irq_vectors.h"
^^^--- in this case this is /usr/src/linux/arch/i386/mach-generic (on my machine)

This hack to src_compile() will fix it
(line 88 or so)
        make INCLUDEDIR="/usr/src/linux/include
-I/usr/src/linux/arch/i386/mach-generic" \
                -C kernel/svgalib_helper || die


3. svga_helper will still fail ;) 

FIX:
need to add  #include <linux/version.h> to kernel/svga_helper/main.c

edit ebuild and add:

        cd ${S}; epatch ${FILESDIR}/${P}-m.diff

to src_unpack(), and then add this small patch to the files directory

root@nipplehead svgalib # more files/svgalib-1.9.16-m.diff 
--- svgalib-1.9.16/kernel/svgalib_helper/main.c 2002-07-26 13:58:31.000000000 +0000
+++ svgalib-1.9.16/kernel/svgalib_helper/main.c 2002-11-22 18:12:44.000000000 +0000
@@ -15,6 +15,7 @@
 #include <linux/sched.h>
 #include <linux/wait.h>
 
+#include <linux/version.h>
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 #include "kernel25compat.h"
 #endif
Comment 1 SpanKY gentoo-dev 2002-11-22 12:51:20 UTC
what kernel are you running 
 
also, please check your /usr/src/linux/ to make sure everything is setup 
Comment 2 pee 2002-11-22 13:05:10 UTC
Kernel is either dev-sources 2.5.48, or fresh bitkeeper and yes
/usr/src/linux is setup.

This is a 2.5 issues, so im mostly just posting so people know what to expect.
Comment 3 Javier Marcet 2002-11-23 22:27:29 UTC
I had first committed svgalib-1.9.16.ebuild to bugzilla with the kernel module's 
installation removed. 
This is a personal preference, i.e. I don't like kernel modules to be bundled within 
ebuilds, since I usually have more than one kernel to boot from, and/or update it 
regularly. This seems to be the case for you, pee, too. 
I just remembered this now and came to bugzilla to post the modified ebuild. 
Fortunately, Martin Schlemmer, who finally committed the ebuild to the official 
portage tree, added the kernel module back before doing so. 
 
Thanks Martin for noticing it and pee for the fix to compile the module on 
development kernels. 
 
Also, what do you think about the option to isolate the kernel modules from 
standard ebuilds? 
 
What I do now is having a folder in /usr/src where I keep a copy of all the kernel 
module's sources which come with different ebuilds, e.g. mplayer, svgalib, ... 
In addition I comment out the module installation in the corresponding ebuild. 
This way, I can emerge/unmerge those packages without deleting the module 
from the kernel tree and at the same time I can have various kernels with their 
own modules, which I have to build manually whenever I compile a new kernel. 
 
Probably, some other approach, to do it more elegantly might be interesting to 
add. 
 
Comments, ideas, flames? 
Comment 4 Daniel Nielsen 2002-11-24 11:07:28 UTC
Hi! 

the svgalib-1.9.16 fails for me too. I'm running gentoo-sources 2.4.19-r9, an
1.4rc machine with all the latest packages (well, almost), and
ACCEPT_KEYWORDS="~x86"

the build fails... And grepping through the output i get the following
interesting  points.

[output]

make[1]: Entering directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/sharedlib'
ln: `../src/svgalib_helper.h': File exists
make[1]: *** [.depend.src] Error 1
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/sharedlib'

[more output]

make: Entering directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/kernel/svgalib_helper'
cc -D__KERNEL__ -DMODULE -Wall -O2  -I/usr/src/linux/include
-DSVGALIB_HELPER_MAJOR=209 -M *.c > .depend
In file included from /usr/src/linux/include/linux/sched.h:30,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from /usr/src/linux/include/asm/pci.h:32,
                 from /usr/src/linux/include/linux/pci.h:614,
                 from interrupt.c:1:
/usr/src/linux/include/linux/grsecurity.h:12:26: linux/grdefs.h: No such file or
directory
/usr/src/linux/include/linux/grsecurity.h:43:25: linux/grmsg.h: No such file or
directory
In file included from /usr/src/linux/include/linux/sched.h:30,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/src/linux/include/linux/grsecurity.h:12:26: linux/grdefs.h: No such file or
directory
/usr/src/linux/include/linux/grsecurity.h:43:25: linux/grmsg.h: No such file or
directory
In file included from main.c:19:
kernel25compat.h:1:1: warning: "minor" redefined
In file included from /usr/src/linux/include/linux/fs.h:16,
                 from /usr/src/linux/include/linux/capability.h:17,
                 from /usr/src/linux/include/linux/binfmts.h:6,
                 from /usr/src/linux/include/linux/sched.h:10,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/include/linux/kdev_t.h:81:1: warning: this is the location of the previous
definition
make: *** [.depend] Error 1
make: Leaving directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/kernel/svgalib_helper'

[more output]

cc -Wall -Wstrict-prototypes -march=athlon-tbird -O3 -pipe
-I/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/inclu
de -I/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/gl    -c -o mkcur.o mkcur.c
cc -o buildcsr   mkcur.o -lvgagl -lvga
mkcur.o(.text+0x244): In function `main':
: undefined reference to `vga_setcursorimage'
mkcur.o(.text+0x250): In function `main':
: undefined reference to `vga_selectcursor'
mkcur.o(.text+0x3fb): In function `main':
: undefined reference to `vga_setcursorposition'
mkcur.o(.text+0x407): In function `main':
: undefined reference to `vga_showcursor'
mkcur.o(.text+0x41e): In function `main':
: undefined reference to `vga_showcursor'
mkcur.o(.text+0x49e): In function `main':
: undefined reference to `vga_showcursor'
mkcur.o(.text+0x591): In function `main':
: undefined reference to `vga_setcursorimage'
mkcur.o(.text+0x59d): In function `main':
: undefined reference to `vga_selectcursor'
mkcur.o(.text+0x605): In function `main':
: undefined reference to `vga_initcursor'
mkcur.o(.text+0x63f): In function `main':
: undefined reference to `vga_setcursorimage'
mkcur.o(.text+0x64b): In function `main':
: undefined reference to `vga_selectcursor'
mkcur.o(.text+0x6c6): In function `main':
: undefined reference to `vga_setcursorimage'
mkcur.o(.text+0x836): In function `main':
: undefined reference to `vga_initcursor'
mkcur.o(.text+0x8ec): In function `setcursor':
: undefined reference to `vga_setcursorimage'
mkcur.o(.text+0x90b): In function `setcursor':
: undefined reference to `vga_setcursorimage'
mkcur.o(.text+0x913): In function `setcursor':
: undefined reference to `vga_selectcursor'
mkcur.o(.text+0x972): In function `setcursor':
: undefined reference to `vga_initcursor'
collect2: ld returned 1 exit status
make[1]: *** [buildcsr] Error 1
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/demos'

[more output]

(cd kernel/svgalib_helper ; make modules_install )
make[1]: Entering directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/kernel/svgalib_helper'
cc -D__KERNEL__ -DMODULE -Wall -O2  -I/usr/src/linux/include
-DSVGALIB_HELPER_MAJOR=209   -c -o main.o main.c
In file included from /usr/src/linux/include/linux/sched.h:29,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/include/linux/fs_struct.h: In function `set_fs_root':
/usr/include/linux/fs_struct.h:34: `current' undeclared (first use in this function)
/usr/include/linux/fs_struct.h:34: (Each undeclared identifier is reported only once
/usr/include/linux/fs_struct.h:34: for each function it appears in.)
In file included from /usr/src/linux/include/linux/sched.h:29,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/include/linux/fs_struct.h: In function `set_fs_pwd':
/usr/include/linux/fs_struct.h:57: `current' undeclared (first use in this function)
In file included from /usr/src/linux/include/linux/sched.h:30,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/src/linux/include/linux/grsecurity.h:12:26: linux/grdefs.h: No such file or
directory
/usr/src/linux/include/linux/grsecurity.h:43:25: linux/grmsg.h: No such file or
directory
In file included from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/src/linux/include/linux/sched.h: At top level:
/usr/src/linux/include/linux/sched.h:171: warning: type mismatch with previous
implicit declaration
/usr/include/linux/fs_struct.h:62: warning: previous implicit declaration of
`preempt_schedule'
/usr/src/linux/include/linux/sched.h:171: warning: `preempt_schedule' was
previously implicitly declared to return `in
t'
In file included from main.c:19:
kernel25compat.h:1:1: warning: "minor" redefined
In file included from /usr/src/linux/include/linux/fs.h:16,
                 from /usr/src/linux/include/linux/capability.h:17,
                 from /usr/src/linux/include/linux/binfmts.h:6,
                 from /usr/src/linux/include/linux/sched.h:10,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/include/linux/kdev_t.h:81:1: warning: this is the location of the previous
definition
make[1]: *** [main.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.16/work/svgalib-1.9.16/kernel/svgalib_helper'
make: *** [installmodule] Error 2

!!! ERROR: media-libs/svgalib-1.9.16 failed.
!!! Function src_install, Line 48, Exitcode 2
!!! (no error message)


The funny thing is, that I have no grsecurity compiled in at all!
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-11-24 18:04:38 UTC
Could be an option to disable the module support, as myself have had a few
issues to get it to
work with some boxes.  I however left it as is to check user responce (it is
after all marked
unstable).
Comment 6 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-03 11:59:25 UTC
Javier, I dont have the time, so cant really test it, but is it possible for
1.9.16 to work without the kernel module ?
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-27 15:29:19 UTC
I see that they still did not have that included in svgalib-1.9.17, although
relevant bits have now moved to kernel/svgalib_helper/kernel25compat.h itself.

Is this still an issue for 1.9.17 ?
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-28 13:25:13 UTC
*** Bug 12788 has been marked as a duplicate of this bug. ***
Comment 9 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-29 16:22:03 UTC
Ok, svgalib-1.9.17-r1 should work fine with kernel 2.5.
Comment 10 Patrik Kullman 2002-12-30 11:23:24 UTC
gunzipping manpages in man8
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/doc'
(cd kernel/svgalib_helper ; make modules_install )
/bin/sh: line 1: [: /usr/src/linux/include: binary operator expected
grep: invalid option -- /
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
make[1]: Entering directory
`/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/kernel/svgalib_helper'
Makefile:6: *** commands commence before first target.  Stop.
make[1]: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/kernel/svgalib_helper'
make: *** [installmodule] Error 2

!!! ERROR: media-libs/svgalib-1.9.17-r1 failed.
!!! Function src_install, Line 96, Exitcode 2
!!! (no error message)
Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2002-12-31 15:13:22 UTC
Ok, I should not be so lazy, patched the Makefile and removed the hack.
Here is the ChangeLog entry:

-------------------------------
  31 Dec 2002; Martin Schlemmer <azarah@gentoo.org> svgalib-1.9.17-r1.ebuild :
  Ok, I should not be lazy, patch Makefile in svga_helper module, as my
  previous hack seems to fail for some people ... (bug #11092).
Comment 12 Patrik Kullman 2003-01-02 04:53:18 UTC
Solved for me.
Comment 13 Mikki 2003-01-06 20:18:38 UTC
make: Entering directory
`/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/kernel/svgalib_helper'
cc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE -Wall   -I/usr/src/linux/include
-DSVGALIB_HELPER_MAJOR=209 -M *.c > .depend
In file included from /usr/src/linux/include/linux/fs.h:334,
                 from /usr/src/linux/include/linux/capability.h:17,
                 from /usr/src/linux/include/linux/binfmts.h:5,
                 from /usr/src/linux/include/linux/sched.h:9,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from /usr/src/linux/include/asm/pci.h:32,
                 from /usr/src/linux/include/linux/pci.h:610,
                 from interrupt.c:1:
/usr/src/linux/include/linux/xfs_fs_i.h:39: linux/vnode.h: No such file or directory
In file included from /usr/src/linux/include/linux/fs.h:385,
                 from /usr/src/linux/include/linux/capability.h:17,
                 from /usr/src/linux/include/linux/binfmts.h:5,
                 from /usr/src/linux/include/linux/sched.h:9,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from /usr/src/linux/include/asm/pci.h:32,
                 from /usr/src/linux/include/linux/pci.h:610,
                 from interrupt.c:1:
/usr/src/linux/include/linux/quota.h:138: linux/dqblk_v1.h: No such file or
directory
In file included from /usr/src/linux/include/linux/fs.h:334,
                 from /usr/src/linux/include/linux/capability.h:17,
                 from /usr/src/linux/include/linux/binfmts.h:5,
                 from /usr/src/linux/include/linux/sched.h:9,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/src/linux/include/linux/xfs_fs_i.h:39: linux/vnode.h: No such file or directory
In file included from /usr/src/linux/include/linux/fs.h:385,
                 from /usr/src/linux/include/linux/capability.h:17,
                 from /usr/src/linux/include/linux/binfmts.h:5,
                 from /usr/src/linux/include/linux/sched.h:9,
                 from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from main.c:4:
/usr/src/linux/include/linux/quota.h:138: linux/dqblk_v1.h: No such file or
directory
make: *** [.depend] Error 1
make: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/kernel/svgalib_helper'

!!! ERROR: media-libs/svgalib-1.9.17-r1 failed.
!!! Function src_compile, Line 41, Exitcode 2
!!! Failed to build kernel module!
Comment 14 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-07 15:40:12 UTC
Would help if we knew what kernel version ...
Comment 15 Mikki 2003-01-08 21:07:32 UTC
Stand by. It looks like I may have done an emerge -u on my kernel sources, and
/usr/src/linux is still pointing to the old (patched) version, which portage
decided to clean out. Doh!

Mikki
Comment 16 Mikki 2003-01-09 00:32:57 UTC
Yup, that was it. Works fine for me now...

Sorry about that.
Comment 17 Henti Smith 2003-01-22 07:52:28 UTC
Found the same problem with svgalib-1.9.17-r1.
Problem solved once /usr/src/linux is linked to latest kernel and 
run make menu/x/config and saved kernel

Henti 
Comment 18 Diego Liziero 2003-03-02 10:23:26 UTC
Again a kernel version issue.

---
Linux nuovo.casa.it 2.5.47-ac5 #3 Fri Nov 15 23:36:40 CET 2002 i686 Pentium II (Klamath) GenuineIntel GNU/Linux

!!! ERROR: media-libs/svgalib-1.9.17-r1 failed.
!!! Function check_kernel, Line 54, Exitcode 1
!!! Cannot find kernel includes!
---

check_kernel is looking for /usr/src/linux/include/asm/mach-{default|generic}
but in kenerl 2.5.47 there is none of them.

Probably they are just in newer kernels.

The point is that
I've tried also with the stable 2.4.20 includes, but check_kernel checks
the major.minor version of the running kernel instead
of getting it from version.h

That is to compile svgalib I should reboot the computer with 2.4.20
otherwise I can't.

Should this be considered a bug?
Comment 19 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-03 13:10:38 UTC
Its changes to the api, not missing dirs.  If you look, you do have a
include/asm/mach-default with 2.5.58 and later i think.

----------------------------------------
nosferatu root # ls /usr/src/linux/include/asm/mach-default/ -ld
drwxrwxr-x    2 1046     101          4096 Feb 24 21:06 /usr/src/linux/include/asm/mach-default/
nosferatu root # uname -r
2.5.63bk2
nosferatu root # 
----------------------------------------

The actual error:

----------------------------------------
gcc -O2 -DLINUX -Dlinux -D__KERNEL__ -DMODULE -Wall   -I/usr/src/linux/include -I/usr/src/linux/include/asm/mach-default -DSVGALIB_HELPER_MAJOR=209   -c -o main.o main.c
main.c: In function `svgalib_helper_ioctl':
main.c:298: warning: implicit declaration of function `request_irq'
main.c:315: warning: implicit declaration of function `free_irq'
main.c:109: warning: `i' might be used uninitialized in this function
main.c: In function `svgalib_helper_open':
main.c:338: warning: `_MOD_INC_USE_COUNT' is deprecated (declared at /usr/src/linux/include/linux/module.h:462)
main.c: In function `svgalib_helper_release':
main.c:344: warning: `__MOD_DEC_USE_COUNT' is deprecated (declared at /usr/src/linux/include/linux/module.h:437)
main.c: In function `init_module':
main.c:442: warning: implicit declaration of function `devfs_register_chrdev'
main.c:457: warning: implicit declaration of function `devfs_register_series'
main.c:461: warning: implicit declaration of function `devfs_auto_unregister'
main.c:515: `EXPORT_NO_SYMBOLS' undeclared (first use in this function)
main.c:515: (Each undeclared identifier is reported only once
main.c:515: for each function it appears in.)
main.c:522: warning: implicit declaration of function `devfs_unregister_chrdev'
make: *** [main.o] Error 1
-----------------------------------------

Like I said, API changes ...
Comment 20 Diego Liziero 2003-03-03 15:31:17 UTC
I know, and what about checking the installed kernel sources instead
of the running kernel? At least people running kernel 2.5 can compile it
installing a 2.4 without needing a 2.4 kernel running.

Here's the patch.

--- svgalib-1.9.17-r1.ebuild    2003-03-03 20:57:48.000000000 +0100
+++ new/svgalib-1.9.17-r1.ebuild        2003-03-03 21:23:54.000000000 +0100
@@ -35,8 +35,8 @@
                                                                                                                             
 check_kernel() {
                                                                                                                             
-       local KV_MAJOR="`uname -r | cut -d. -f1`"
-       local KV_MINOR="`uname -r | cut -d. -f2`"
+       local KV_MAJOR="`sed -n -e 's/^VERSION = \([0-9]*\)$/\1/p'  /usr/src/linux/Makefile`"
+       local KV_MINOR="`sed -n -e 's/^PATCHLEVEL = \([0-9]*\)$/\1/p'  /usr/src/linux/Makefile`"
        export INCLUDEDIR="/usr/src/linux/include"
                                                                                                                             
        # Are we running kernel 2.5 ?

----
Comment 21 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-05 14:58:47 UTC
Ok, so how is going to get it compiled, but not being able to load the module
anyhow going to help you ?
Comment 22 Diego Liziero 2003-03-05 18:31:07 UTC
Good point.

Now there is just one check if the running kernel is a 2.4 or a 2.5
and if it's a 2.5, the INCLUDEDIR is set for kernels >=2.5.58
(assuming that the include dir asm/mach-* is there with those versions).

But there is NO check if the /usr/src/linux/ is the one
of the running kernel.

So my patch didn't change things so much.
If you like more I can just add the check of the sublevel for 2.5.* like that:

----
--- svgalib-1.9.17-r1.ebuild    2003-03-03 20:57:48.000000000 +0100
+++ new2/svgalib-1.9.17-r1.ebuild       2003-03-06 00:13:36.000000000 +0100
@@ -37,10 +37,11 @@
         
        local KV_MAJOR="`uname -r | cut -d. -f1`"
        local KV_MINOR="`uname -r | cut -d. -f2`"
+       local KV_SUBLEVEL="`uname -r|sed -n -e 's/[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/p'`"
        export INCLUDEDIR="/usr/src/linux/include"
  
-       # Are we running kernel 2.5 ?
-       if [ "${KV_MAJOR}${KV_MINOR}" -gt "24" ]
+       # Are we running kernel 2.5 > 2.5.57 ?
+       if [ "${KV_MAJOR}${KV_MINOR}" -gt "24" -a $(KV_SUBLEVEL) -gt "57" ]
        then
                # Setup the proper mach include directory ...
                if [ -d ${INCLUDEDIR}/asm/mach-default ]
----

This way it works also for my 2.5.47, but there is still no check if the
module is built for the running kernel.

In my opinion it makes no sense to set the include path of the
installed kernel according to the one that is currently running
without knowing if they are the same.
Comment 23 Bedeox 2003-04-13 00:52:51 UTC
Here is a dumb patch for svgalib_helper (seems to work...)
Comment 24 Bedeox 2003-04-13 00:58:48 UTC
Created attachment 10577 [details, diff]
svgalib_helper patch

This is a dumb patch, but seems to work.
Comment 25 Matt Chorman 2003-04-17 15:14:14 UTC
Bedeox, your patch work wonderfully for the devfs stuff, but it fails with what looks like an 
improper usage of grep: 
 
make: Entering directory `/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/threeDKit' 
rm -f lib3dkit.a 
ar rcs lib3dkit.a 
make: Leaving directory `/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/threeDKit' 
/bin/sh: line 1: [: /usr/src/linux/include: binary operator expected 
grep: invalid option -- / 
Usage: grep [OPTION]... PATTERN [FILE]... 
Try `grep --help' for more information. 
make: Entering directory 
`/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/kernel/svgalib_helper' 
Makefile:6: *** commands commence before first target.  Stop. 
make: Leaving directory 
`/var/tmp/portage/svgalib-1.9.17-r1/work/svgalib-1.9.17/kernel/svgalib_helper' 
 
!!! ERROR: media-libs/svgalib-1.9.17-r1 failed. 
!!! Function src_compile, Line 77, Exitcode 2 
!!! Failed to build kernel module! 
 
Comment 26 Nep Enthe 2003-04-22 10:44:51 UTC
I'm getting same error as well, using development-souces with latest kernel patch from linuxhq.com

Get same error:

!!! ERROR: media-libs/svgalib-1.9.17-r1 failed. 
!!! Function src_compile, Line 77, Exitcode 2 
!!! Failed to build kernel module! 
 
Comment 27 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-04 13:54:45 UTC
svgalib-1.9.17-r2 should fix all these (note only for 2.6 kernel).
Comment 28 Walt Shekrota 2005-05-05 05:58:30 UTC
2.6.11-r6 kernel
2005.0 new install (emerge w/ no options used)
fails on emerge of lib3d kit
topmost error looks like ...

install -c-m 755 -o root -g bin so.lib3dkit.1.9.19 /var/tmp/portage/svgalib-1.9.19-r3/image//usr/lib/lib3dkit.so.1.9.19

install: invalid option -- -

==
this error seem to have been around a while?
How do I get past it within the realm of gentoo?
-Walt
Comment 29 Walt Shekrota 2005-05-05 06:14:20 UTC
2.6.11-r6 kernel
2005.0 new install (emerge w/ no options used)
fails on emerge of lib3d kit
topmost error looks like ...

install -c-m 755 -o root -g bin so.lib3dkit.1.9.19 /var/tmp/portage/svgalib-1.9.19-r3/image//usr/lib/lib3dkit.so.1.9.19

install: invalid option -- -

==
this error seem to have been around a while?
How do I get past it within the realm of gentoo?
-Walt