[DRBD-user] problem compiling 0.7.3 on redhat 7.3 - 2.4.20-28.7smp

Lars Ellenberg lars.ellenberg at linbit.com
Mon Sep 6 11:38:24 CEST 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Sun, Sep 05, 2004 at 01:38:37PM -0700, Bob Yeaw wrote:
> Hi all.  I just grabbed drbd 0.7.3 and am trying to get it to compile
> on redhat 7.3 with kernel 2.4.20-28.7smp.  After preparing the kernel
> sources I run a make clean all in /usr/src/drbd-0.7.3/ and it fails
> with:
> 
> """
> In file included from drbd_worker.c:38:
> /usr/src/linux-2.4.20-28.7/include/linux/mm_inline.h:28: warning: initialization makes integer from pointer without a cast
> /usr/src/linux-2.4.20-28.7/include/linux/mm_inline.h:28: initializer element is not computable at load time
> make[3]: *** [drbd_worker.o] Error 1
> """


make sure you use a gcc-2.95 with 2.4 kernels.
(you never know. redhat tends to install a different default compiler
than needed to compile their kernels)

it probably helps, if you do it this way:
 (install gcc 295...)
 KERNEL_SOURCE=/usr/src/linux-2.4.20-28.7-or-something
 cd $KERNEL_SOURCE
 make mrproper
 cp configs/kernel-2.4.20-i686-smp.config .config # or 586, athlon, whatever
 make oldconfig ; make oldconfig
 make dep
 ( maybe: make vmlinux CC=/opt/wherever/gcc295/bin/gcc )
 ( maybe: make modules CC=/opt/wherever/gcc295/bin/gcc )
 cd $DRBDSRC/drbd
 make KDIR=$KERNEL_SOURCE CC=/opt/wherever/gcc295/bin/gcc

when that is done, you go to the drbd sources, and compile the drbd
module.

> 1) adding "#define DRBD_DISABLE_SENDPAGE" to drbd_config.h

you don't add that if its not already there.  if it is not already
there, then the drbd source code does not know about it.
if its there, you can comment it in or out. seemingly for 2.4 kernel, it
should be defined, until we sorted out in what way 2.4. sendpage works
different from the 2.6 one, or what else might be wrong.
probably just the page_count macro in 2.4 is not hugetlb aware, and not
CompoundPage aware, and some other things. it just won't work, so let
tcp_sendpage remain disabled for 2.4 kernels.
if you want more juice, use a 2.6 kernel.

so get a fresh svn checkout.
(that will probably already have the "adjust_config_h" magic fixed evern
for your kernel.)

btw, I _just now_ compiled current drbd svn against a redhat
2.4.20-28.7, and it did _just compiled_ as expected.
no further tweaking neccessary.

so, "works for me" ...
and did I already mention that I do not really care about 2.4 kernels?

hope this helped, anyways...


	Lars Ellenberg



More information about the drbd-user mailing list