Mailing List Archive

can't compile
Hi,

I don't know if it is the rigth place if I need help, but let's try ...

I can't compile drbd. The fatal error seems to be :

/usr/src/linux/include/linux/blk.h:358: warning: `do_nbd_request' declared `static' but never defined

It seems like I don't have the rirth kernel non ?

I have a lot of : 'NR_REQUEST' undeclared (first use in this function) in drbd.c

Thanks for your help
Can't compile [ In reply to ]
Please, I need help...


Philipp Reisner wrote:
>
> Please use drbd-0.6.1-pre7

I can't compile... I using Slackware 8.0, kernel 2.2.19, no SMP, and
modified Makefile.var (KAF_i386 := -fno-strict-aliasing
#-mpreferred-stack-boundary=2), but it returns

root@metallica:~/drbd# make
make[1]: Entering directory `/root/drbd/user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/drbd/user'
make[1]: Entering directory `/root/drbd/drbd'
gcc -c -g -D__KERNEL__ -DMODULE -O2 -Wall -fno-strict-aliasing
-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.)
drbd_receiver.c: 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 `/root/drbd/drbd'
make: *** [all] Error 2

If I use the first line instead, it returns

root@metallica:~/drbd# make
make[1]: Entering directory `/root/drbd/user'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/drbd/user'
make[1]: Entering directory `/root/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_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.)
drbd_receiver.c: 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 `/root/drbd/drbd'
make: *** [all] Error 2

> (and patch your kernel to export the wake_up_process symbol)

Sorry, but what does it mean???

>
> -Philipp

--
Sulamita Garcia Alta Disponibilidade em Linux
Analista de Suporte http://ha.underlinux.com.br
sulamita.garcia@example.com
ICQ 16465301 Grupo de Usuárias de Linux
RE: Can't compile [ In reply to ]
There is a typefault in drbd_receiver.c

In line 630 it must be NR_REQUEST instead of NR_REQUESTS

Patching the kernel means that you have to modify the ksyms.c in your kernel
source tree to export the symbol 'wake_up_process'. Otherwise the module
will not load because of unresolved externals.

/Wolfram

>>> -----Original Message-----
>>> From: Sulamita Garcia [mailto:sulamita@example.com]
>>> Sent: Montag, 26. November 2001 12:51
>>> To: drbd-devel@example.com
>>> Subject: [DRBD-dev] Can't compile
>>>
>>>
>>>
>>> Please, I need help...
>>>
>>>
>>> Philipp Reisner wrote:
>>> >
>>> > Please use drbd-0.6.1-pre7
>>>
>>> I can't compile... I using Slackware 8.0, kernel 2.2.19, no SMP, and
>>> modified Makefile.var (KAF_i386 := -fno-strict-aliasing
>>> #-mpreferred-stack-boundary=2), but it returns
>>>
>>> root@metallica:~/drbd# make
>>> make[1]: Entering directory `/root/drbd/user'
>>> make[1]: Nothing to be done for `all'.
>>> make[1]: Leaving directory `/root/drbd/user'
>>> make[1]: Entering directory `/root/drbd/drbd'
>>> gcc -c -g -D__KERNEL__ -DMODULE -O2 -Wall -fno-strict-aliasing
>>> -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.)
>>> drbd_receiver.c: 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 `/root/drbd/drbd'
>>> make: *** [all] Error 2
>>>
>>> If I use the first line instead, it returns
>>>
>>> root@metallica:~/drbd# make
>>> make[1]: Entering directory `/root/drbd/user'
>>> make[1]: Nothing to be done for `all'.
>>> make[1]: Leaving directory `/root/drbd/user'
>>> make[1]: Entering directory `/root/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_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.)
>>> drbd_receiver.c: 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 `/root/drbd/drbd'
>>> make: *** [all] Error 2
>>>
>>> > (and patch your kernel to export the wake_up_process symbol)
>>>
>>> Sorry, but what does it mean???
>>>
>>> >
>>> > -Philipp
>>>
>>> --
>>> Sulamita Garcia Alta Disponibilidade em Linux
>>> Analista de Suporte http://ha.underlinux.com.br
>>> sulamita.garcia@example.com
>>> ICQ 16465301 Grupo de Usuárias de Linux
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> DRBD-devel mailing list
>>> DRBD-devel@example.com
>>> https://lists.sourceforge.net/lists/listinfo/drbd-devel
>>>
RE: Can't compile [ In reply to ]
On Mon, 26 Nov 2001, Weyer, Wolfram wrote:

> There is a typefault in drbd_receiver.c
>
> In line 630 it must be NR_REQUEST instead of NR_REQUESTS
>
> Patching the kernel means that you have to modify the ksyms.c in your kernel
> source tree to export the symbol 'wake_up_process'. Otherwise the module
> will not load because of unresolved externals.

You must also export 'pidhash'

EXPORT_SYMBOL(pidhash);
EXPORT_SYMBOL(wake_up_process);

I also had to make the following changes to DRBD:

Makefile.vars: removed -mpreferred-stack-boundry=2

drbd/Makefile: defined REQ_O as "drbd-req_2.2.0"

moved init_MUTEX_LOCKED, init_MUTEX, init_waitqueue_head and struct
wait_queue from drbd_main.c to drbd_int.h

drbd/drbd_main.c: changed list_add_tail to list_add

>
> /Wolfram
>
> >>> -----Original Message-----
> >>> From: Sulamita Garcia [mailto:sulamita@example.com]
> >>> Sent: Montag, 26. November 2001 12:51
> >>> To: drbd-devel@example.com
> >>> Subject: [DRBD-dev] Can't compile
> >>>
> >>>
> >>>
> >>> Please, I need help...
> >>>
> >>>
> >>> Philipp Reisner wrote:
> >>> >
> >>> > Please use drbd-0.6.1-pre7
> >>>
> >>> I can't compile... I using Slackware 8.0, kernel 2.2.19, no SMP, and
> >>> modified Makefile.var (KAF_i386 := -fno-strict-aliasing
> >>> #-mpreferred-stack-boundary=2), but it returns
> >>>
> >>> root@metallica:~/drbd# make
> >>> make[1]: Entering directory `/root/drbd/user'
> >>> make[1]: Nothing to be done for `all'.
> >>> make[1]: Leaving directory `/root/drbd/user'
> >>> make[1]: Entering directory `/root/drbd/drbd'
> >>> gcc -c -g -D__KERNEL__ -DMODULE -O2 -Wall -fno-strict-aliasing
> >>> -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.)
> >>> drbd_receiver.c: 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 `/root/drbd/drbd'
> >>> make: *** [all] Error 2
> >>>
> >>> If I use the first line instead, it returns
> >>>
> >>> root@metallica:~/drbd# make
> >>> make[1]: Entering directory `/root/drbd/user'
> >>> make[1]: Nothing to be done for `all'.
> >>> make[1]: Leaving directory `/root/drbd/user'
> >>> make[1]: Entering directory `/root/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_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.)
> >>> drbd_receiver.c: 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 `/root/drbd/drbd'
> >>> make: *** [all] Error 2
> >>>
> >>> > (and patch your kernel to export the wake_up_process symbol)
> >>>
> >>> Sorry, but what does it mean???
> >>>
> >>> >
> >>> > -Philipp
> >>>
> >>> --
> >>> Sulamita Garcia Alta Disponibilidade em Linux
> >>> Analista de Suporte http://ha.underlinux.com.br
> >>> sulamita.garcia@example.com
> >>> ICQ 16465301 Grupo de Usuárias de Linux
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> DRBD-devel mailing list
> >>> DRBD-devel@example.com
> >>> https://lists.sourceforge.net/lists/listinfo/drbd-devel
> >>>
>
> _______________________________________________
> DRBD-devel mailing list
> DRBD-devel@example.com
> https://lists.sourceforge.net/lists/listinfo/drbd-devel
>

Tony Willoughby
ADC Telecommunications, Inc.
Broadband Access and Transport Group
mailto:tony_willoughby@example.com