Bug 38403 - media-libs/svgalib-1.9.17-r3 failure in automatic builds
Bug#: 38403 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: vapier@gentoo.org Reported By: spider@gentoo.org
Component: Library
URL: 
Summary: media-libs/svgalib-1.9.17-r3 failure in automatic builds
Keywords:  
Status Whiteboard: 
Opened: 2004-01-16 07:23 0000
Description:   Opened: 2004-01-16 07:23 0000
builds are all done in a chroot from a clean system, this means that there is
no kernel built (there are full kernel sources installed )  and that
/lib/modules/  is completely empty. 

This environment fits where a user is when they do a stage3 install ,
necessarily so to get binaries done.

make: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/threeDKit'
make: Entering directory
`/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper'
Makefile:10: *** INCLUDEDIR is not set up correctly.  Stop.
make: Leaving directory
`/var/tmp/portage/svgalib-1.9.17-r3/work/svgalib-1.9.17/kernel/svgalib_helper'


Basically the Makefile tries to use /lib/modules/`uname -r`  to build the
kernel helper.  It would work far better and more reliably if this was
repatched to always use /usr/src/linux (Makefile patch)

This would also mean that theres some more form of consistency so you can
actually build all modules for a kernel before you reboot into it.

------- Comment #1 From SpanKY 2004-01-16 16:12:45 0000 -------
the ebuild does this:

make INCLUDEDIR="/usr/src/linux/include" -C kernel/svgalib_helper \
        clean all || die "Failed to build kernel module!"

then the patch is this:
+ifndef INCLUDEDIR
+INCLUDEDIR = /lib/modules/$(shell uname -r)/build/include
+endif

so i guess could you test to see if changing the '/lib/modules/$(shell uname -r)/build/include' to '/usr/src/linux/include' really makes a difference ?
you get that error because of this bit of code:

MODVER = $(shell grep CONFIG_MODVERSIONS $(INCLUDEDIR)/linux/autoconf.h 2>/dev/null)
 ifeq ($(MODVER),)
    @echo INCLUDEDIR is not set up correctly
    exit 1
 endif

which to me says the kernel isnt setup yet

------- Comment #2 From Spider (RETIRED) 2004-01-16 17:16:13 0000 -------
true, the kernel isn't setup at that time, just installed.  Frankly I'd want to
be able to disable the kernel part of the library as we never package any
kernel binaries, so packages that depend on it will be hopelessly broken for
all time...

For now, disabling svgalib (USE=-svga) and removing all packages that depend on
it from the regressiontesting seems to be the only solution , and the one I
have opted for. This however feels very suboptimal.

------- Comment #3 From SpanKY 2004-01-17 19:53:13 0000 -------
ok, i checked on gentoo-dev for perhaps splitting of kernel/userspace packages
into their parts and was informed of the previous reason this did not happen
... dependency tracking hell

svgalib needs a kernel that is semi-built in order to work

------- Comment #4 From SpanKY 2004-01-17 19:55:41 0000 -------
actually i lied, i'll just wrap the kernel module building with 'if [ ! `use
build` ] ; then'

i guess if there are any bugs past that you get to pick it up ;)

------- Comment #5 From Spider (RETIRED) 2004-01-17 20:07:17 0000 -------
well, thats quite enough to make it work. thanks :)

------- Comment #6 From SpanKY 2004-01-17 20:09:36 0000 -------
`env USE=build emerge svgalib` and you should be set