Mailing List Archive

unable to compile 0.6.1-preX
Hi all,

I'm having trouble compiling any version of drbd at this point.

I'm using kernel 2.2.19 and drbd-0.6.1-pre7, and (after modifying
Makefile.vars to use the first, rather than the second KAF_i386 line), I
get the following (apologies for the length of included info):

=====

make[1]: Entering directory `/tmp/drbd/user'
gcc -c -Wall -g -DDBG -DAPI_VERSION=58 -DPRO_VERSION=60
-DREL_VERSION=\"0.6.1-pre7\" drbdsetup.c
gcc -o drbdsetup drbdsetup.o
make[1]: Leaving directory `/tmp/drbd/user'
/bin/sh: [.: <: binary operator expected
/bin/sh: [: <: binary operator expected
make[1]: Entering directory `/tmp/drbd/drbd'
gcc -c -g -D__KERNEL__ -DMODULE -O2 -Wall -m486 -DCPU=586 -malign-loops=2
-malign-jumps=2 -malign-functions=2 -fomit-frame-pointer
-I/usr/src/linux/include -DEXPORT_SYMTAB -DAPI_VERSION=58
-DPRO_VERSION=60 -DREL_VERSION=\"0.6.1-pre7\" drbd_fs.c
In file included from drbd_fs.c:45:
drbd_int.h:412: warning: `init_waitqueue_entry' redefined
/usr/src/linux/include/linux/wait.h:26: warning: this is the location of
the previous definition
/usr/src/linux/include/linux/blk.h:461: warning: `do_nbd_request'
declared `static' but never defined
gcc -c -g -D__KERNEL__ -DMODULE -O2 -Wall -m486 -DCPU=586 -malign-loops=2
-malign-jumps=2 -malign-functions=2 -fomit-frame-pointer
-I/usr/src/linux/include -DEXPORT_SYMTAB -DAPI_VERSION=58
-DPRO_VERSION=60 -DREL_VERSION=\"0.6.1-pre7\" drbd_main.c
In file included from drbd_main.c:67:
drbd_int.h:412: warning: `init_waitqueue_entry' redefined
/usr/src/linux/include/linux/wait.h:26: warning: this is the location of
the previous definition
/usr/src/linux/include/linux/blk.h:461: warning: `do_nbd_request'
declared `static' but never defined
gcc -c -g -D__KERNEL__ -DMODULE -O2 -Wall -m486 -DCPU=586 -malign-loops=2
-malign-jumps=2 -malign-functions=2 -fomit-frame-pointer
-I/usr/src/linux/include -DEXPORT_SYMTAB -DAPI_VERSION=58
-DPRO_VERSION=60 -DREL_VERSION=\"0.6.1-pre7\" drbd_proc.c
In file included from drbd_proc.c:44:
drbd_int.h:412: warning: `init_waitqueue_entry' redefined
/usr/src/linux/include/linux/wait.h:26: warning: this is the location of
the previous definition
/usr/src/linux/include/linux/blk.h:461: warning: `do_nbd_request'
declared `static' but never defined
gcc -c -g -D__KERNEL__ -DMODULE -O2 -Wall -m486 -DCPU=586 -malign-loops=2
-malign-jumps=2 -malign-functions=2 -fomit-frame-pointer
-I/usr/src/linux/include -DEXPORT_SYMTAB -DAPI_VERSION=58
-DPRO_VERSION=60 -DREL_VERSION=\"0.6.1-pre7\" drbd_receiver.c
In file included from drbd_receiver.c:49:
drbd_int.h:412: warning: `init_waitqueue_entry' redefined
/usr/src/linux/include/linux/wait.h:26: warning: this is the location of
the previous definition
drbd_receiver.c: In function `receive_data':
drbd_receiver.c:635: `NR_REQUESTS' undeclared (first use in this
function)
drbd_receiver.c:635: (Each undeclared identifier is reported only once
drbd_receiver.c:635: for each function it appears in.)
/usr/src/linux/include/linux/blk.h: At top level:
/usr/src/linux/include/linux/blk.h:461: warning: `do_nbd_request'
declared `static' but never defined
make[1]: *** [drbd_receiver.o] Error 1
make[1]: Leaving directory `/tmp/drbd/drbd'
make: *** [all] Error 2

=====

Does anyone have any ideas as to what I may be doing wrong?

I get the same errors for all 0.6.1-preX, and I can't even get 0.5.8* to
compile any more. (I was using a CVS version when I did get it going, but
that snapshot has vanished, unfortunately.)

Any help will be much appreciated.

Cheers,
Chris the somewhat stressed out...
--
________________________________________________________________________
Disclaimer:

This e-mail is confidential and intended solely for the named recipient.
Any views expressed in this e-mail are those of the individual sender,
and not of dotWAP.com Pty Ltd. Any unauthorised use, dissemination,
forwarding or reproduction of this e-mail is strictly prohibited.

dotWAP.com Pty Ltd does not warrant that this e-mail is free from viruses
or other corruptions and is not liable to the recipient or any other
party should any virus or other corruption be present in this e-mail.
RE: unable to compile 0.6.1-preX [ In reply to ]
Hi Chris,

> I'm using kernel 2.2.19 and drbd-0.6.1-pre7, and (after modifying
> Makefile.vars to use the first, rather than the second
> KAF_i386 line), get the following (apologies for the length of
> included info):

I usually just change the 2nd definition so it reads

KAF_i386 := -fno-strict-aliasing #-mpreferred-stack-boundary=2

> /bin/sh: [.: <: binary operator expected
> /bin/sh: [: <: binary operator expected
> make[1]: Entering directory `/tmp/drbd/drbd'

These come from an incompatibility of the makfile in /tmp/drbd/drbd with
your system. change the definitions in the makefile:

KSUBD = block
REQ_O = drbd_req-2.2.o

(instead of the more complicated shell expressions)

> drbd_receiver.c: In function `receive_data':
> drbd_receiver.c:635: `NR_REQUESTS' undeclared (first use in this

This one's an error in the C sourcefile, it's been fixed in CSV. you can
change the source to read NR_REQUEST instead of NR_REQUESTS on line 635.

> Any help will be much appreciated.

hope this helps.

Bye, Martin