[DRBD-user] building drbd-8.2 from git for linux < 2.6.29 (e.g. linux 2.6.27)

Raoul Bhatia [IPAX] r.bhatia at ipax.at
Sat Jan 31 18:50:46 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.


building drbd-8.2 from git for the long maintained 2.6.27 kernel series
results in the following error:

> /usr/bin/make -C drbd KERNEL_SOURCES=/root/src/linux- MODVERSIONS=detect \
> KERNEL=linux- KDIR=/root/src/linux- 2>&1|less
> make: Entering directory `/usr/src/modules/drbd/drbd'
>     Calling toplevel makefile of kernel source tree, which I believe is in
>     KDIR=/root/src/linux-
> test -f ../scripts/adjust_drbd_config_h.sh && \
>          KDIR=/root/src/linux- O= /bin/bash ../scripts/adjust_drbd_config_h.sh
> make: [kbuild] Error 1 (ignored)
> /usr/bin/make -C /root/src/linux- SUBDIRS=/usr/src/modules/drbd/drbd  modules
> make[1]: Entering directory `/root/src/linux-'
>   CC [M]  /usr/src/modules/drbd/drbd/drbd_buildtag.o
>   CC [M]  /usr/src/modules/drbd/drbd/drbd_main.o
> In file included from /usr/src/modules/drbd/drbd/drbd_main.c:52:
> include/linux/swab.h:47: error: redefinition of ‘___swab16’
> include/linux/byteorder/swab.h:65: error: previous definition of ‘___swab16’ was here
> include/linux/swab.h:58: error: redefinition of ‘___swab32’
> include/linux/byteorder/swab.h:69: error: previous definition of ‘___swab32’ was here
> include/linux/swab.h:69: error: redefinition of ‘___swab64’
> include/linux/byteorder/swab.h:75: error: previous definition of ‘___swab64’ was here
> In file included from /usr/src/modules/drbd/drbd/drbd_main.c:52:
> include/linux/swab.h:109:1: warning: "__swab16" redefined
> In file included from include/linux/byteorder/little_endian.h:12,
>                  from include/asm/byteorder.h:79,
>                  from include/asm-generic/bitops/le.h:5,
>                  from include/asm-generic/bitops/ext2-non-atomic.h:4,
>                  from include/asm/bitops.h:451,
>                  from include/linux/bitops.h:17,
>                  from include/linux/kernel.h:15,
>                  from include/linux/cache.h:4,
>                  from include/asm/pda.h:7,
>                  from include/asm/current.h:19,
>                  from include/asm/processor.h:15,
>                  from include/linux/prefetch.h:14,
>                  from include/linux/list.h:6,
>                  from include/linux/module.h:9,
>                  from /usr/src/modules/drbd/drbd/drbd_main.c:29:


the reason for this is a commented define in drbd_config.h since [1][2]


which *should* get fixed by a call to ../scripts/adjust_drbd_config_h.sh
which was commented out of ./debian/rules:108 way back in 2006 (or so).

for me, living on debian, simply uncommenting this line resolved the
module-assistant build issue. maybe there is a more elegant way to
handle this (e.g. passing some CFLAGS).

i just spend some time on searching for the cause - so hopefully i can
save the time of others..


DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia at ipax.at
Technischer Leiter

IPAX - Aloy Bhatia Hava OEG         web.          http://www.ipax.at
Barawitzkagasse 10/2/2/11           email.            office at ipax.at
1190 Wien                           tel.               +43 1 3670030
FN 277995t HG Wien                  fax.            +43 1 3670030 15

More information about the drbd-user mailing list