[DRBD-user] Trouble Compiling 8.3.0 module

Jason Bennett jbennett at gcftech.com
Mon Feb 16 05:08:34 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.


I recompiled my kernel with CONFIG_CONNECTOR support and it seemed to
work just fine though I still had to skip the "Preparing the kernel
source tree" section.

Cheers

Jason


-----Original Message-----
From: drbd-user-bounces at lists.linbit.com
[mailto:drbd-user-bounces at lists.linbit.com] On Behalf Of Jason Bennett
Sent: Sunday, February 15, 2009 8:35 PM
To: drbd-user at lists.linbit.com
Subject: [DRBD-user] Trouble Compiling 8.3.0 module

Hi there,

I've been trying to compile DRBD 8.3.0 as a kernel module on a couple of
crux linux server without much luck.  I'm running Crux 2.5

I tried on one server by following the instructions for "preparing
kernel source tree" and got the following:

:sudo make clean all
make[1]: Entering directory `/home/jason/drbd-8.3.0/user'
rm -f drbdadm_scanner.c drbdmeta_scanner.c
rm -f drbdsetup drbdadm drbdmeta drbdmeta_unfinished_rewrite *.o
rm -f drbd_buildtag.c drbd_strings.c
rm -f *~
make[1]: Leaving directory `/home/jason/drbd-8.3.0/user'
make[1]: Entering directory `/home/jason/drbd-8.3.0/scripts'
Makefile:48: No special distribution INITD
Makefile:49: setting INITD=/etc/init.d/ according to LSB
rm -f *~
rm -f datadisk
make[1]: Leaving directory `/home/jason/drbd-8.3.0/scripts'
make[1]: Entering directory `/home/jason/drbd-8.3.0/documentation'
To clean the documentation: make doc-clean
make[1]: Leaving directory `/home/jason/drbd-8.3.0/documentation'
make[1]: Entering directory `/home/jason/drbd-8.3.0/drbd'
rm -rf .tmp_versions
rm -f *.[oas] *.ko .*.cmd .*.d .*.tmp *.mod.c .*.flags .depend .kernel*
make[1]: Leaving directory `/home/jason/drbd-8.3.0/drbd'
rm -f *~
rm -rf dist
make -C drbd drbd_buildtag.c
make[1]: Entering directory `/home/jason/drbd-8.3.0/drbd'
make[1]: Leaving directory `/home/jason/drbd-8.3.0/drbd'
make[1]: Entering directory `/home/jason/drbd-8.3.0/user'
flex -s -odrbdadm_scanner.c drbdadm_scanner.fl
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_scanner.o
drbdadm_scanner.c
drbdadm_scanner.c: In function 'yy_get_next_buffer':
drbdadm_scanner.c:2896: warning: comparison between signed and unsigned
drbdadm_scanner.fl: At top level:
drbdadm_scanner.c:3039: warning: 'input' defined but not used
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_parser.o
drbdadm_parser.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_main.o drbdadm_main.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_adjust.o
drbdadm_adjust.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdtool_common.o
drbdtool_common.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_usage_cnt.o
drbdadm_usage_cnt.c
cp ../drbd/drbd_buildtag.c drbd_buildtag.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbd_buildtag.o drbd_buildtag.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_minor_table.o
drbdadm_minor_table.c
gcc -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_main.o
drbdadm_adjust.o drbdtool_common.o drbdadm_usage_cnt.o drbd_buildtag.o
drbdadm_minor_table.o
gcc -g -O2 -c -W -Wall -I../drbd -fno-strict-aliasing   -c -o drbdmeta.o
drbdmeta.c
flex -s -odrbdmeta_scanner.c drbdmeta_scanner.fl
gcc -g -O2 -c -W -Wall -I../drbd -fno-strict-aliasing   -c -o
drbdmeta_scanner.o drbdmeta_scanner.c
drbdmeta_scanner.c: In function 'yy_get_next_buffer':
drbdmeta_scanner.c:1319: warning: comparison between signed and unsigned
drbdmeta_scanner.fl: At top level:
drbdmeta_scanner.c:1466: warning: 'input' defined but not used
gcc -o drbdmeta drbdmeta.o drbdmeta_scanner.o drbdtool_common.o
drbd_buildtag.o
gcc -g -O2 -c -W -Wall -I../drbd -I/lib/modules/2.6.27.8/build/include
-fno-strict-aliasing   -c -o drbdsetup.o drbdsetup.c
cp ../drbd/drbd_strings.c drbd_strings.c
gcc -g -O2 -c -W -Wall -I../drbd -I/lib/modules/2.6.27.8/build/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 `/home/jason/drbd-8.3.0/user'
make[1]: Entering directory `/home/jason/drbd-8.3.0/scripts'
Makefile:48: No special distribution INITD
Makefile:49: setting INITD=/etc/init.d/ according to LSB
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jason/drbd-8.3.0/scripts'
make[1]: Entering directory `/home/jason/drbd-8.3.0/documentation'
To (re)make the documentation: make doc
make[1]: Leaving directory `/home/jason/drbd-8.3.0/documentation'

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


If I prepared the tree first, it removes the utsrelease.h and version.h
files from include/linux so I decided to try on another server without
running the "preparing kernel source tree" and got further along, but
stopped at:

:sudo make clean all
make[1]: Entering directory `/home/jason/drbd-8.3.0/user'
rm -f drbdadm_scanner.c drbdmeta_scanner.c
rm -f drbdsetup drbdadm drbdmeta drbdmeta_unfinished_rewrite *.o
rm -f drbd_buildtag.c drbd_strings.c
rm -f *~
make[1]: Leaving directory `/home/jason/drbd-8.3.0/user'
make[1]: Entering directory `/home/jason/drbd-8.3.0/scripts'
Makefile:48: No special distribution INITD
Makefile:49: setting INITD=/etc/init.d/ according to LSB
rm -f *~
rm -f datadisk
make[1]: Leaving directory `/home/jason/drbd-8.3.0/scripts'
make[1]: Entering directory `/home/jason/drbd-8.3.0/documentation'
To clean the documentation: make doc-clean
make[1]: Leaving directory `/home/jason/drbd-8.3.0/documentation'
make[1]: Entering directory `/home/jason/drbd-8.3.0/drbd'
rm -rf .tmp_versions
rm -f *.[oas] *.ko .*.cmd .*.d .*.tmp *.mod.c .*.flags .depend .kernel*
make[1]: Leaving directory `/home/jason/drbd-8.3.0/drbd'
rm -f *~
rm -rf dist
make -C drbd drbd_buildtag.c
make[1]: Entering directory `/home/jason/drbd-8.3.0/drbd'
make[1]: Leaving directory `/home/jason/drbd-8.3.0/drbd'
make[1]: Entering directory `/home/jason/drbd-8.3.0/user'
flex -s -odrbdadm_scanner.c drbdadm_scanner.fl
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_scanner.o
drbdadm_scanner.c
drbdadm_scanner.c: In function 'yy_get_next_buffer':
drbdadm_scanner.c:2896: warning: comparison between signed and unsigned
drbdadm_scanner.fl: At top level:
drbdadm_scanner.c:3039: warning: 'input' defined but not used
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_parser.o
drbdadm_parser.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_main.o drbdadm_main.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_adjust.o
drbdadm_adjust.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdtool_common.o
drbdtool_common.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_usage_cnt.o
drbdadm_usage_cnt.c
cp ../drbd/drbd_buildtag.c drbd_buildtag.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbd_buildtag.o drbd_buildtag.c
gcc -g -O2 -c -W -Wall -I../drbd   -c -o drbdadm_minor_table.o
drbdadm_minor_table.c
gcc -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_main.o
drbdadm_adjust.o drbdtool_common.o drbdadm_usage_cnt.o drbd_buildtag.o
drbdadm_minor_table.o
gcc -g -O2 -c -W -Wall -I../drbd -fno-strict-aliasing   -c -o drbdmeta.o
drbdmeta.c
flex -s -odrbdmeta_scanner.c drbdmeta_scanner.fl
gcc -g -O2 -c -W -Wall -I../drbd -fno-strict-aliasing   -c -o
drbdmeta_scanner.o drbdmeta_scanner.c
drbdmeta_scanner.c: In function 'yy_get_next_buffer':
drbdmeta_scanner.c:1319: warning: comparison between signed and unsigned
drbdmeta_scanner.fl: At top level:
drbdmeta_scanner.c:1466: warning: 'input' defined but not used
gcc -o drbdmeta drbdmeta.o drbdmeta_scanner.o drbdtool_common.o
drbd_buildtag.o
gcc -g -O2 -c -W -Wall -I../drbd -I/lib/modules/2.6.27.8/build/include
-fno-strict-aliasing   -c -o drbdsetup.o drbdsetup.c
cp ../drbd/drbd_strings.c drbd_strings.c
gcc -g -O2 -c -W -Wall -I../drbd -I/lib/modules/2.6.27.8/build/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 `/home/jason/drbd-8.3.0/user'
make[1]: Entering directory `/home/jason/drbd-8.3.0/scripts'
Makefile:48: No special distribution INITD
Makefile:49: setting INITD=/etc/init.d/ according to LSB
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jason/drbd-8.3.0/scripts'
make[1]: Entering directory `/home/jason/drbd-8.3.0/documentation'
To (re)make the documentation: make doc
make[1]: Leaving directory `/home/jason/drbd-8.3.0/documentation'

        Userland tools build was successful.
make[1]: Entering directory `/home/jason/drbd-8.3.0/drbd'

    Calling toplevel makefile of kernel source tree, which I believe is
in
    KDIR=/lib/modules/2.6.27.8/build

test -f ../scripts/adjust_drbd_config_h.sh && \
         KDIR=/lib/modules/2.6.27.8/build O= /bin/bash
../scripts/adjust_drbd_config_h.sh
/lib/modules/2.6.27.8/build ~/drbd-8.3.0/drbd
~/drbd-8.3.0/drbd

  Using unmodified drbd_config.h

make -C /lib/modules/2.6.27.8/build SUBDIRS=/home/jason/drbd-8.3.0/drbd
modules
make[2]: Entering directory `/usr/src/linux-2.6.27.8'
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_buildtag.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_bitmap.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_proc.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_worker.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_receiver.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_req.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_actlog.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/lru_cache.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_main.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_strings.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/drbd_nl.o
  CC [M]  /home/jason/drbd-8.3.0/drbd/connector.o
/home/jason/drbd-8.3.0/drbd/connector.c:33:2: error: #error "drbd
backported connector.c compiled against kernel connector.h will not
work"
/home/jason/drbd-8.3.0/drbd/connector.c:34:2: error: #error "enable
CONFIG_CONNECTOR in your kernel and try again"
/home/jason/drbd-8.3.0/drbd/connector.c: In function 'cn_call_callback':
/home/jason/drbd-8.3.0/drbd/connector.c:149: error: 'struct work_struct'
has no member named 'pending'
/home/jason/drbd-8.3.0/drbd/connector.c:149: error: 'struct work_struct'
has no member named 'pending'
/home/jason/drbd-8.3.0/drbd/connector.c:175: error: 'struct work_struct'
has no member named 'pending'
/home/jason/drbd-8.3.0/drbd/connector.c:177: error: incompatible types
in assignment
/home/jason/drbd-8.3.0/drbd/connector.c:178: error: 'struct work_struct'
has no member named 'timer'
/home/jason/drbd-8.3.0/drbd/connector.c: In function 'cn_init':
/home/jason/drbd-8.3.0/drbd/connector.c:457: warning: assignment from
incompatible pointer type
/home/jason/drbd-8.3.0/drbd/connector.c:473: warning: passing argument 1
of 'netlink_kernel_create' makes pointer from integer without a cast
/home/jason/drbd-8.3.0/drbd/connector.c:473: warning: passing argument 3
of 'netlink_kernel_create' makes integer from pointer without a cast
/home/jason/drbd-8.3.0/drbd/connector.c:473: warning: passing argument 4
of 'netlink_kernel_create' from incompatible pointer type
/home/jason/drbd-8.3.0/drbd/connector.c:473: error: too few arguments to
function 'netlink_kernel_create'
make[3]: *** [/home/jason/drbd-8.3.0/drbd/connector.o] Error 1
make[2]: *** [_module_/home/jason/drbd-8.3.0/drbd] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.27.8'
make[1]: *** [kbuild] Error 2
make[1]: Leaving directory `/home/jason/drbd-8.3.0/drbd'
make: *** [module] Error 2

Any suggestions?

Thanks much!

Jason
_______________________________________________
drbd-user mailing list
drbd-user at lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user



More information about the drbd-user mailing list