[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


hi,

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-2.6.27.13 MODVERSIONS=detect \
> KERNEL=linux-2.6.27.13 KDIR=/root/src/linux-2.6.27.13 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-2.6.27.13
> 
> test -f ../scripts/adjust_drbd_config_h.sh && \
>          KDIR=/root/src/linux-2.6.27.13 O= /bin/bash ../scripts/adjust_drbd_config_h.sh
> make: [kbuild] Error 1 (ignored)
> /usr/bin/make -C /root/src/linux-2.6.27.13 SUBDIRS=/usr/src/modules/drbd/drbd  modules
> make[1]: Entering directory `/root/src/linux-2.6.27.13'
>   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]

> //#define HAVE_LINUX_BYTEORDER_SWABB_H

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

cheers,
raoul

[1]
http://git.drbd.org/?p=drbd-8.2.git;a=commit;h=a241f2bdf8dc903d5afcb656dd265bea82afec61
[2]
http://git.drbd.org/?p=drbd-8.2.git;a=blobdiff;f=drbd/linux/drbd_config.h;h=4cd5733ba48a2a646e6fca3e3d1d8f1a02e5a98a;hp=80c636e62403e9ce810d7c55ef7c354c87756114;hb=a241f2bdf8dc903d5afcb656dd265bea82afec61;hpb=859d57e2d2791be9e6e027f6812cdb4ecc517e40
-- 
____________________________________________________________________
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