[DRBD-user] Compilation error

alex alshu at tut.by
Fri Feb 1 09:41:05 CET 2008

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


    Hello list!
    I try to use last drbd-8.2.4 with last kernel 2.6.24-2 on OpenSUSE-10.3
and get compilation error:


make -C drbd drbd_buildtag.c
make[1]: Entering directory `/home/alex/drbd-8.2.4/drbd'
make[1]: Leaving directory `/home/alex/drbd-8.2.4/drbd'
make[1]: Entering directory `/home/alex/drbd-8.2.4/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:2084: warning: comparison between signed and unsigned
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 -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_main.o 
drbdadm_adjust.o drbdtool_common.o drbdadm_usage_cnt.o drbd_buildtag.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:1294: warning: comparison between signed and unsigned
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.24-2-default/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.24-2-default/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/alex/drbd-8.2.4/user'
make[1]: Entering directory `/home/alex/drbd-8.2.4/scripts'
Makefile:48: No special distribution INITD
Makefile:49: setting INITD=/etc/init.d/ according to LSB
make[1]: Цель `all' не требует выполнения команд.
make[1]: Leaving directory `/home/alex/drbd-8.2.4/scripts'
make[1]: Entering directory `/home/alex/drbd-8.2.4/documentation'
To (re)make the documentation: make doc
make[1]: Leaving directory `/home/alex/drbd-8.2.4/documentation'

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

     Calling toplevel makefile of kernel source tree, which I believe is in
     KDIR=/lib/modules/2.6.24-2-default/build

test -f ../scripts/adjust_drbd_config_h.sh && \
          KDIR=/lib/modules/2.6.24-2-default/build O= /bin/bash 
../scripts/adjust_drbd_config_h.sh
/lib/modules/2.6.24-2-default/build /home/alex/drbd-8.2.4/drbd
/home/alex/drbd-8.2.4/drbd

   Adjusted drbd_config.h:
   --- ./linux/drbd_config.h     2008-01-11 14:36:02.000000000 +0200
   +++ ./linux/drbd_config.h.new 2008-02-01 09:49:27.557343646 +0200
   @@ -71 +71 @@
   -//#define NEED_BACKPORT_OF_ATOMIC_ADD
   +#define NEED_BACKPORT_OF_ATOMIC_ADD

make -C /lib/modules/2.6.24-2-default/build 
SUBDIRS=/home/alex/drbd-8.2.4/drbd  modules
make[2]: Entering directory 
`/mnt/xfs/dop/suse/10.3/usr/src/linux-2.6.24-2-obj/i386/default'
make -C ../../../linux-2.6.24-2 O=../linux-2.6.24-2-obj/i386/default modules
   CC [M]  /home/alex/drbd-8.2.4/drbd/drbd_buildtag.o
   CC [M]  /home/alex/drbd-8.2.4/drbd/drbd_bitmap.o
In file included from /home/alex/drbd-8.2.4/drbd/drbd_int.h:1248,
                  from /home/alex/drbd-8.2.4/drbd/drbd_bitmap.c:31:
/home/alex/drbd-8.2.4/drbd/drbd_wrappers.h:196: error: redefinition of 
‘atomic_add_return’
include2/asm/atomic_32.h:181: error: previous definition of 
‘atomic_add_return’ was here
/home/alex/drbd-8.2.4/drbd/drbd_wrappers.h:222: error: redefinition of 
‘atomic_sub_return’
include2/asm/atomic_32.h:214: error: previous definition of 
‘atomic_sub_return’ was here
make[5]: *** [/home/alex/drbd-8.2.4/drbd/drbd_bitmap.o] Error 1
make[4]: *** [_module_/home/alex/drbd-8.2.4/drbd] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory 
`/mnt/xfs/dop/suse/10.3/usr/src/linux-2.6.24-2-obj/i386/default'
make[1]: *** [kbuild] Error 2
make[1]: Leaving directory `/home/alex/drbd-8.2.4/drbd'
make: *** [module] Error 2

alex at a-shubnik-pc:~/Work/Agat/drbd-8.2.4> clear
alex at a-shubnik-pc:~/Work/Agat/drbd-8.2.4> cat 111
make -C drbd drbd_buildtag.c
make[1]: Entering directory `/home/alex/drbd-8.2.4/drbd'
make[1]: Leaving directory `/home/alex/drbd-8.2.4/drbd'
make[1]: Entering directory `/home/alex/drbd-8.2.4/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:2084: warning: comparison between signed and unsigned
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 -o drbdadm drbdadm_scanner.o drbdadm_parser.o drbdadm_main.o 
drbdadm_adjust.o drbdtool_common.o drbdadm_usage_cnt.o drbd_buildtag.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:1294: warning: comparison between signed and unsigned
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.24-2-default/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.24-2-default/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/alex/drbd-8.2.4/user'
make[1]: Entering directory `/home/alex/drbd-8.2.4/scripts'
Makefile:48: No special distribution INITD
Makefile:49: setting INITD=/etc/init.d/ according to LSB
make[1]: Цель `all' не требует выполнения команд.
make[1]: Leaving directory `/home/alex/drbd-8.2.4/scripts'
make[1]: Entering directory `/home/alex/drbd-8.2.4/documentation'
To (re)make the documentation: make doc
make[1]: Leaving directory `/home/alex/drbd-8.2.4/documentation'

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

     Calling toplevel makefile of kernel source tree, which I believe is in
     KDIR=/lib/modules/2.6.24-2-default/build

test -f ../scripts/adjust_drbd_config_h.sh && \
          KDIR=/lib/modules/2.6.24-2-default/build O= /bin/bash 
../scripts/adjust_drbd_config_h.sh
/lib/modules/2.6.24-2-default/build /home/alex/drbd-8.2.4/drbd
/home/alex/drbd-8.2.4/drbd

   Adjusted drbd_config.h:
   --- ./linux/drbd_config.h     2008-01-11 14:36:02.000000000 +0200
   +++ ./linux/drbd_config.h.new 2008-02-01 09:49:27.557343646 +0200
   @@ -71 +71 @@
   -//#define NEED_BACKPORT_OF_ATOMIC_ADD
   +#define NEED_BACKPORT_OF_ATOMIC_ADD

make -C /lib/modules/2.6.24-2-default/build 
SUBDIRS=/home/alex/drbd-8.2.4/drbd  modules
make[2]: Entering directory `/usr/src/linux-2.6.24-2-obj/i386/default'
make -C ../../../linux-2.6.24-2 O=../linux-2.6.24-2-obj/i386/default modules
   CC [M]  /home/alex/drbd-8.2.4/drbd/drbd_buildtag.o
   CC [M]  /home/alex/drbd-8.2.4/drbd/drbd_bitmap.o
In file included from /home/alex/drbd-8.2.4/drbd/drbd_int.h:1248,
                  from /home/alex/drbd-8.2.4/drbd/drbd_bitmap.c:31:
/home/alex/drbd-8.2.4/drbd/drbd_wrappers.h:196: error: redefinition of 
‘atomic_add_return’
include2/asm/atomic_32.h:181: error: previous definition of 
‘atomic_add_return’ was here
/home/alex/drbd-8.2.4/drbd/drbd_wrappers.h:222: error: redefinition of 
‘atomic_sub_return’
include2/asm/atomic_32.h:214: error: previous definition of 
‘atomic_sub_return’ was here
make[5]: *** [/home/alex/drbd-8.2.4/drbd/drbd_bitmap.o] Error 1
make[4]: *** [_module_/home/alex/drbd-8.2.4/drbd] Error 2
make[3]: *** [sub-make] Error 2
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/linux-2.6.24-2-obj/i386/default'
make[1]: *** [kbuild] Error 2
make[1]: Leaving directory `/home/alex/drbd-8.2.4/drbd'
make: *** [module] Error 2


     Thank you very much for any help.
     Alex
   

-------------
Играй в «Фотоклуб»! Чтобы начать игру, отправь SMS-сообщение «фото\foto»
на 9922, в ответном SMS, придет первый вопрос викторины. 
Ответив правильно на вопросы, участвуй в розыгрыше основных призов! 
Спеши за призом от Прайм Телеком и Fotoblog.by.




More information about the drbd-user mailing list