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

Lars Ellenberg lars.ellenberg at linbit.com
Mon Feb 2 09:54:38 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.


On Sat, Jan 31, 2009 at 06:50:46PM +0100, Raoul Bhatia [IPAX] wrote:
> 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


commit 4c8a008d553b21586c26e927ee1614f55fadfe40
Author: Lars Ellenberg <lars.ellenberg at linbit.com>
Date:   Wed Jan 21 16:00:26 2009 +0100

    auto_drbd_config_h.sh compatibility with movements of atomic.h

should fix the auto adjust magic again.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list