LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: problems compiling saru-0.0.1

To: jimm@xxxxxxxxxxxxxxx, <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: problems compiling saru-0.0.1
From: Horms <horms@xxxxxxxxxxxx>
Date: Tue, 12 Apr 2005 14:53:00 +0900
[snip]

> I commented out all of the _heartbeat_h_Id and _ha_msg_h_Id reference from
> all of the .c files and did a make

Yeah, they got removed from the heartbeat includes at some stage.
And good riddance too. Commenting them out is fine, the attached
patch removes them.

[snip]

> <command line>:138473939:61976: /usr/src/linux/include/linux/modversions.h:

This is a problem, you need to have that file.
It can be created by pointing saru at a kernel
tree that a kernel was actually built in.
A kernel-headers package, Debian has these,
other distros too.

> No such file or directory
> In file included from /usr/src/linux/include/asm/smp.h:18,
>                  from /usr/src/linux/include/linux/smp.h:19,
>                  from /usr/src/linux/include/linux/sched.h:25,
>                  from /usr/src/linux/include/linux/module.h:10,
>                  from ipt_saru.c:33:
> /usr/src/linux/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or
> directory
> In file included from /usr/src/linux/include/asm/smp.h:18,
>                  from /usr/src/linux/include/linux/smp.h:19,
>                  from /usr/src/linux/include/linux/sched.h:25,
>                  from /usr/src/linux/include/linux/module.h:10,
>                  from ipt_saru.c:33:
> /usr/src/linux/include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared

This seems also releated to the kernel not having being
built here and in short your kernel source being in an
unconfigured state.

[snip]

> ipt_saru.c:187: error: `MOD_INC_USE_COUNT' undeclared (first use in this
> function)
> ipt_saru.c:187: error: (Each undeclared identifier is reported only once
> ipt_saru.c:187: error: for each function it appears in.)
> ipt_saru.c: In function `block_map_list_zero_saru_refcount_and_map':
> ipt_saru.c:228: error: `MOD_DEC_USE_COUNT' undeclared (first use in this
> function)
> ipt_saru.c: In function `block_map_list_delete':
> ipt_saru.c:294: error: `MOD_DEC_USE_COUNT' undeclared (first use in this
> function)
> ipt_saru.c: In function `saru_show_procfs':
> ipt_saru.c:558: error: `MOD_INC_USE_COUNT' undeclared (first use in this
> function)
> ipt_saru.c:626: error: `MOD_DEC_USE_COUNT' undeclared (first use in this
> function)

This is a problem. These functions disapeared for 2.6. 
And so the code needs to be ported. I managed
to get the code compiled fine for 2.4.27 just now (with the
attached patch) but 2.6 needs work.

> ipt_saru.c: At top level:
> ipt_saru.c:638: warning: initialization makes integer from pointer without a
> cast
> ipt_saru.c:638: error: initializer element is not computable at load time
> ipt_saru.c:638: error: (near initialization for `saru_match.revision')
> ipt_saru.c:638: warning: initialization from incompatible pointer type
> ipt_saru.c:638: warning: initialization from incompatible pointer type
> ipt_saru.c:639: warning: initialization from incompatible pointer type

Ditto.

[snip]

-- 
Horms

Attachment: saru.hb.cruft.patch
Description: Text document





<Prev in Thread] Current Thread [Next in Thread>