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

Bob Yeaw byeaw at widevine.com
Sun Sep 5 22:38:37 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.


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
"""

I read another report of this problem in the archives for this list, which seemed to be resolved by changing kernels.  Unfortunately this is not an option for me.   Any ideas as to how to resolve this?

Here's what I have tried so far:

1) adding "#define DRBD_DISALE_SENDPAGE" (or "#define DRBD_DISABLE_SENDPAGE") to drbd_config.h
2) starting over and using 'make mrproper' in the kernel source
3) changing line drbd/drbd_main.c:940
         */
//      if ( (page_count(page) < 1) || PageSlab(page) ) {
        if ( 1 ) {
                /* e.g. XFS meta- & log-data is in slab pages, which have a

4) keeping "HAVE_MM_INLINE_H" undefined in drbd_config.h (by editing scripts/adjust_drbd_config_h.sh).  This did allow for a successful compile, but then during operation it blows up:

"""
Secondary/Secondary --> Primary/Secondary
I am(P): 1:00000002:00000001:00000001:00000001:11
Peer(S): 0:00000001:00000001:00000001:00000001:01
drbd0_receiver [1376]: cstate Connected --> WFBitMapS
drbd0_receiver [1376]: cstate WFBitMapS --> SyncSource
Resync started as SyncSource (need to sync 106552768 KB [26638192 bits set]).
Unable to handle kernel NULL pointer dereference at virtual address 00000014
printing eip:
c0206e9a
*pde = 00000000
Oops: 0002
...
Call Trace:   [<c012109b>] do_softirq [kernel] 0x6b (0xf5cf5ebc))
[<f89b6b33>] drbd_send [drbd] 0xd3 (0xf5cf5ed4))
[<c02076c9>] tcp_sendpage [kernel] 0xb9 (0xf5cf5ee8))
[<f89b647f>] _drbd_send_page [drbd] 0xff (0xf5cf5f10))
[<f89b69b6>] drbd_send_block [drbd] 0x136 (0xf5cf5f38))
[<f89b3e5f>] drbd_rs_complete_io [drbd] 0x6f (0xf5cf5f70))
[<f89aa65b>] w_e_end_rsdata_req [drbd] 0xbb (0xf5cf5f84))
[<f89ab375>] drbd_worker [drbd] 0x1c5 (0xf5cf5fa4))
[<f89b54c6>] drbd_thread_setup [drbd] 0x96 (0xf5cf5fdc))
[<c0107266>] arch_kernel_thread [kernel] 0x26 (0xf5cf5ff0))
[<f89b5430>] drbd_thread_setup [drbd] 0x0 (0xf5cf5ff8))
"""

or 

"""
worker terminated
kmem_cache_destroy: Can't free all objects c4652afc
kmem_cache_destroy(drbd_request_cache) FAILED
drbd: module cleanup done.
cciss/c0d0:
cciss/c0d0:
------------[ cut here ]------------
kernel BUG at slab.c:815!
invalid operand: 0000
...
Call Trace:   [<f89b7601>] drbd_create_mempools [drbd] 0x31 (0xf62e5ed8))
[<f89c1d2c>] .rodata.str1.1 [drbd] 0x11ac (0xf62e5edc))
[<f89b7be1>] init_module [drbd] 0x161 (0xf62e5ef4))
[<c011dc25>] sys_init_module [kernel] 0x555 (0xf62e5f2c))
[<f89a4060>] drbd_buildtag [drbd] 0x0 (0xf62e5f58))
[<c0108be3>] system_call [kernel] 0x33 (0xf62e5fc0))
"""


Any help would be appreciated!




btw; Here's more output from the failed build attempt:

[root at dl380r03-rh73-drbd2 drbd-0.7.3]# rpm -qa | grep gcc
gcc-g77-2.96-110
gcc-c++-2.96-110
gcc-2.96-110

make clean all

...snip...

test -x ../scripts/adjust_drbd_config_h.sh && \
 KDIR=/lib/modules/2.4.20-28.7smp/build ../scripts/adjust_drbd_config_h.sh
  
  Adjusted drbd_config.h:
  --- ./linux/drbd_config.h.orig        Sun Sep  5 00:42:18 2004
  +++ ./linux/drbd_config.h     Sun Sep  5 00:42:18 2004
  @@ -52 +52 @@
  -//#define HAVE_MM_INLINE_H
  +#define HAVE_MM_INLINE_H
  
make -C /lib/modules/2.4.20-28.7smp/build SUBDIRS=/usr/src/drbd-0.7.3/drbd  modules
make[2]: Entering directory `/usr/src/linux-2.4.20-28.7'
make -r -f tmp_include_depends all
make[3]: Entering directory `/usr/src/linux-2.4.20-28.7'
make[3]: Circular /usr/src/linux-2.4.20-28.7/include/asm/smplock.h <- /usr/src/linux-2.4.20-28.7/include/linux/interrupt.h dependency dropped.
make[3]: Circular /usr/src/linux-2.4.20-28.7/include/linux/netfilter_ipv4/ip_conntrack_helper.h <- /usr/src/linux-2.4.20-28.7/include/linux/netfilter_ipv4/ip_conntrack.h dependency dropped.
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/src/linux-2.4.20-28.7'
make -C  /usr/src/drbd-0.7.3/drbd CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.20-28.7/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.20-28.7/include/linux/modversions.h" MAKING_MODULES=1 modules
make[3]: Entering directory `/usr/src/drbd-0.7.3/drbd'

...snip...

gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-28.7/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.20-28.7/include/linux/modversions.h -I/usr/src/drbd-0.7.3/drbd  -nostdinc -iwithprefix include -DKBUILD_BASENAME=drbd_worker  -c -o drbd_worker.o drbd_worker.c
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[3]: Leaving directory `/usr/src/drbd-0.7.3/drbd'
make[2]: *** [_mod_/usr/src/drbd-0.7.3/drbd] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.20-28.7'
make[1]: *** [kbuild] Error 2
make[1]: Leaving directory `/usr/src/drbd-0.7.3/drbd'
make: *** [all] Error 2


thanks,

-bob

CONFIDENTIALITY NOTICE:  The information in this electronic mail transmission contains confidential information intended only for the use of the individual or entity named above.  If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copy of the transmission is strictly prohibited.



More information about the drbd-user mailing list