Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 355377 - sys-cluster/drbd-kernel fails with newer kernels
Summary: sys-cluster/drbd-kernel fails with newer kernels
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 00:14 UTC by John Sennesael
Modified: 2011-02-18 11:41 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Sennesael 2011-02-18 00:14:20 UTC
Emerging sys-cluster/drbd-kernel with newer kernels will fail. Also, the module has been merged with the mainline linux kernel recently, making this ebuild obsolete for newer kernels.

The ebuild however, does not check the kernel version and should return a proper error message when trying to build with a kernel that already includes the drbd module.

A list of kernel versions that already include DRBD can be found here: http://www.drbd.org/download/mainline/

Seems like a check for >=2.6.33 would work.



Reproducible: Always

Steps to Reproduce:
1. Emerge sys-cluster/drbd-kernel on a kernel newer than 2.6.33
2. Observe errors.


Actual Results:  
In file included from /var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1/drbd/drbd_bitmap.c:31:
/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1/drbd/drbd_int.h: In function 'drbd_md_flush':
/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1/drbd/drbd_int.h:2512: warning: passing argument 2 of 'blkdev_issue_flush' makes integer from pointer without a cast
include/linux/blkdev.h:930: note: expected 'gfp_t' but argument is of type 'void *'
/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1/drbd/drbd_int.h:2512: error: too few arguments to function 'blkdev_issue_flush'
make[3]: *** [/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1/drbd/drbd_bitmap.o] Error 1
make[2]: *** [_module_/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1/drbd] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.36-gentoo-r5'
make: *** [kbuild] Error 2
emake failed
 * ERROR: sys-cluster/drbd-kernel-8.3.8.1 failed:
 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  -j1 KDIR=/usr/src/linux O=/lib/modules/2.6.36-gentoo-r5/build default
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 7695:  Called linux-mod_src_compile
 *   environment, line 6863:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CROSS_COMPILE=${CHOST}-                               LDFLAGS=\"$(get_abi_LDFLAGS)\"                                           ${BUILD_FIXES}                                          ${BUILD_PARAMS}               ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 * 
 * If you need support, post the output of 'emerge --info =sys-cluster/drbd-kernel-8.3.8.1',
 * the complete build log and the output of 'emerge -pqv =sys-cluster/drbd-kernel-8.3.8.1'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/temp/environment'.
 * S: '/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1'

>>> Failed to emerge sys-cluster/drbd-kernel-8.3.8.1, Log file:

>>>  '/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/temp/build.log'

 * Messages for package sys-cluster/drbd-kernel-8.3.8.1:

 * ERROR: sys-cluster/drbd-kernel-8.3.8.1 failed:
 *   Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CROSS_COMPILE=i686-pc-linux-gnu- LDFLAGS=  -j1 KDIR=/usr/src/linux O=/lib/modules/2.6.36-gentoo-r5/build default
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 7695:  Called linux-mod_src_compile
 *   environment, line 6863:  Called die
 * The specific snippet of code:
 *               eval "emake HOSTCC=\"$(tc-getBUILD_CC)\"                                               CROSS_COMPILE=${CHOST}-                               LDFLAGS=\"$(get_abi_LDFLAGS)\"                                           ${BUILD_FIXES}                                          ${BUILD_PARAMS}               ${BUILD_TARGETS} " || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}";
 * 
 * If you need support, post the output of 'emerge --info =sys-cluster/drbd-kernel-8.3.8.1',
 * the complete build log and the output of 'emerge -pqv =sys-cluster/drbd-kernel-8.3.8.1'.
 * This ebuild is from an overlay: '/usr/local/portage/'
 * The complete build log is located at '/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/temp/environment'.
 * S: '/var/tmp/portage/sys-cluster/drbd-kernel-8.3.8.1/work/drbd-8.3.8.1'

 * IMPORTANT: 5 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


Expected Results:  
A warning message mentioning that you're building with too new of a kernel, also mentioning that these newer kernels already include DRBD.

( CONFIG_BLK_DEV_DRBD option )
Comment 1 Ultrabug gentoo-dev 2011-02-18 11:41:28 UTC
Hi John, thanks for reporting this.

+  18 Feb 2011; Ultrabug <ultrabug@gentoo.org> drbd-kernel-8.3.8.1.ebuild:
+  Add kernel >=2.6.33 blocker
+

I've fixed the ebuild accordingly in main tree, closing bug.

Regards