Bug 184720 - sys-cluster/drbd-8.0.5 fails to compile when KBUILD_OUTPUT is used
Bug#: 184720 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: ha-cluster@gentoo.org Reported By: natanael.copa@gmail.com
Component: Ebuilds
URL: 
Summary: sys-cluster/drbd-8.0.5 fails to compile when KBUILD_OUTPUT is used
Keywords:  
Status Whiteboard: 
Opened: 2007-07-09 11:53 0000
Description:   Opened: 2007-07-09 11:53 0000
gcc -g -O2 -c -W -Wall -I../drbd -I/usr/src/linux/include -fno-strict-aliasing 
 -c -o drbd_strings.o drbd_strings.c
gcc -o drbdsetup drbdsetup.o drbdtool_common.o drbd_buildtag.o drbd_strings.o
make[1]: Leaving directory
`/var/tmp/portage/sys-cluster/drbd-8.0.4/work/drbd-8.0.4/user'
make[1]: Entering directory
`/var/tmp/portage/sys-cluster/drbd-8.0.4/work/drbd-8.0.4/scripts'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/var/tmp/portage/sys-cluster/drbd-8.0.4/work/drbd-8.0.4/scripts'
make[1]: Entering directory
`/var/tmp/portage/sys-cluster/drbd-8.0.4/work/drbd-8.0.4/documentation'
To (re)make the documentation: make doc
make[1]: Leaving directory
`/var/tmp/portage/sys-cluster/drbd-8.0.4/work/drbd-8.0.4/documentation'

        Userland tools build was successful.
Could not determine uts_release
make: *** [module] Error 1

!!! ERROR: sys-cluster/drbd-8.0.4 failed.

------- Comment #1 From Natanael Copa 2007-07-09 11:54:44 0000 -------
This fixes it. I dont know if the change is needed for 2.4 kernels since i dont
have one to test on.

--- drbd-8.0.4.ebuild.orig      2007-07-09 11:51:16 +0000
+++ drbd-8.0.4.ebuild   2007-07-09 11:52:05 +0000
@@ -39,10 +39,10 @@
        linux_chkconfig_present

        if kernel_is 2 6; then
-               emake -j1 KDIR=${KERNEL_DIR} || die "compile problem"
+               emake -j1 KDIR=${KERNEL_DIR} O=${KBUILD_OUTPUT} || die "compile
problem"
        else
                cp -R /usr/src/linux-${KV} ${WORKDIR}
-               emake -j1 KDIR=/${WORKDIR}/linux-${KV} || die "compile problem"
+               emake -j1 KDIR=/${WORKDIR}/linux-${KV} O=${KBUILD_OUTPUT} ||
die "compile problem"
        fi
 }


------- Comment #2 From Natanael Copa 2007-08-16 13:03:09 0000 -------
Is this a big issue to fix?

------- Comment #3 From Christian Zoffoli 2007-08-16 16:35:00 0000 -------
Fixed in cvs, thanks.