[DRBD-user] Drbd 8.3.6 module compilation problem

Marian Schmotzer marian.schmotzer at centire.com
Wed Dec 9 13:28:28 CET 2009

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


Hi everyone
I found problem with compilation drbd kernel module version 8.3.6 on one
of our systems. System is xen domU with kernel 2.6.18-r12 . 
After deeper look into problem i found that module can be compiled
without xen compatibility flag set in kernel source, or if xen
compatible kernel is set it can be compiled without SMP flag set (if one
procesor configuration is set). With combination of these flags it is
not possible to compile it. I found that problem is in including APIC
definitions. To explain if i put #define CONFIG_X86_LOCAL_APIC into drbd
c files, stage1 of compilation is finished successfully. I cannot add it
into header files because local header files are included after kernel
ones(or is some included into all of c files before kernel ones ? )
Here is my traceback.

Traceback:
    Calling toplevel makefile of kernel source tree, which I believe is
in
    KDIR=/lib/modules/2.6.18-xen-r12/source

test -f ../scripts/adjust_drbd_config_h.sh && \
         KDIR=/lib/modules/2.6.18-xen-r12/source
O=/lib/modules/2.6.18-xen-r12/build /bin/bash ../scripts/adjust_drbd_config_h.sh
/lib/modules/2.6.18-xen-r12/source ~/drbd-8.3.6/drbd
~/drbd-8.3.6/drbd

  Using unmodified drbd_config.h

make -C /lib/modules/2.6.18-xen-r12/source
O=/lib/modules/2.6.18-xen-r12/build SUBDIRS=/root/drbd-8.3.6/drbd
modules
make[1]: Entering directory `/usr/src/linux-2.6.18-xen-r12'
  CC [M]  /root/drbd-8.3.6/drbd/drbd_buildtag.o
In file included from include/linux/smp.h:18,
                 from include/linux/sched.h:63,
                 from include/linux/module.h:9,
                 from include/net/sock.h:46,
                 from include/linux/connector.h:101,
                 from /root/drbd-8.3.6/drbd/linux/drbd.h:30,
                 from /root/drbd-8.3.6/drbd/drbd_buildtag.c:2:
include/asm/smp.h: In function 'hard_smp_processor_id':
include/asm/smp.h:76: warning: implicit declaration of function
'GET_APIC_ID'
include/asm/smp.h:76: error: 'APIC_BASE' undeclared (first use in this
function)
include/asm/smp.h:76: error: (Each undeclared identifier is reported
only once
include/asm/smp.h:76: error: for each function it appears in.)
include/asm/smp.h:76: error: 'APIC_ID' undeclared (first use in this
function)
include/asm/smp.h: In function 'cpu_present_to_apicid':
include/asm/smp.h:111: error: 'BAD_APICID' undeclared (first use in this
function)
include/asm/smp.h: In function 'logical_smp_processor_id':
include/asm/smp.h:134: warning: implicit declaration of function
'GET_APIC_LOGICAL_ID'
include/asm/smp.h:134: error: 'APIC_BASE' undeclared (first use in this
function)
include/asm/smp.h:134: error: 'APIC_LDR' undeclared (first use in this
function)
make[3]: *** [/root/drbd-8.3.6/drbd/drbd_buildtag.o] Error 1
make[2]: *** [_module_/root/drbd-8.3.6/drbd] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.18-xen-r12'
make: *** [kbuild] Error 2





More information about the drbd-user mailing list