Mailing List Archive

ipvs-0.2.6, stock 2.4.2 kernel. compile failure.
All,

Sorry if I'm duplicating anything already said or otherwise being dumb,
but I'm trying to get the following errors when compiling the kernel
with the above combination.

I've looked at the archives, and I've seen is that "it may be
incompatible with the netfilter patches" or similar, but this is a stock
kernel, only with the above ipvs patch, and isn't the Netfilter element
of that necessary to use other types of failover/load balancing etc. so
won't removing it remove some of my options for HA configuration?

Also, having looked at the source, it seems like "__ip_vs_svc_lock" is
defined in net/ipv4/ipvs/ip_vs_ctl.c:

static rwlock_t __ip_vs_svc_lock = RW_LOCK_UNLOCKED;

But then not referenceable in net/network.o (which should include all of
that subtree, no?), so it looks to me like a makefile/dependencies
problem. I could very easily be wrong though.

Any help you can give would be appreciated.

I'm using this version, because with kernel 2.2.18 & 17 I'm also getting
compilation problems. I don't have details of those to hand, though.

I'd be happy even if this problem isn't quickly fixable, if someone
could tell me a known-good-compile kernel and set of patches.

Yours,

Kev.

Last part of compile:

make[2]: Entering directory `/usr/src/linux-2.4.2-0.2.6/arch/i386/lib'
make[2]: Nothing to be done for `all_targets'.
make[2]: Leaving directory `/usr/src/linux-2.4.2-0.2.6/arch/i386/lib'
make[1]: Leaving directory `/usr/src/linux-2.4.2-0.2.6/arch/i386/lib'
ld -m elf_i386 -T /usr/src/linux/arch/i386/vmlinux.lds -e stext
arch/i386/kernel
/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o
mm/mm.o fs/f
s.o ipc/ipc.o \
drivers/block/block.o drivers/char/char.o drivers/misc/misc.o
drivers/ne
t/net.o drivers/media/media.o drivers/char/agp/agp.o
drivers/char/drm/drm.o dri
vers/ide/idedriver.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o
drivers/sound
/sounddrivers.o drivers/pci/driver.o drivers/pcmcia/pcmcia.o
drivers/net/pcmcia/
pcmcia_net.o drivers/pnp/pnp.o drivers/video/video.o
drivers/usb/usbdrv.o \
net/network.o \
/usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a
/usr/src/lin
ux/arch/i386/lib/lib.a \
--end-group \
-o vmlinux
net/network.o: In function `ip_vs_leave':
net/network.o(.text+0x551e5): undefined reference to `__ip_vs_svc_lock'
net/network.o(.text+0x5525d): undefined reference to `__ip_vs_svc_lock'
net/network.o: In function `ip_vs_out_icmp':
net/network.o(.text+0x554e8): undefined reference to `__ip_vs_svc_lock'
net/network.o(.text+0x55568): undefined reference to `__ip_vs_svc_lock'
net/network.o: In function `ip_vs_out':
net/network.o(.text+0x55b53): undefined reference to `__ip_vs_svc_lock'
net/network.o(.text+0x55bda): more undefined references to
`__ip_vs_svc_lock' fo
llow
make: *** [vmlinux] Error 1

Networking, Netfilter, and Virtual Server sections of my .config:

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_NETLINK=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK_DEV=y
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_RTNETLINK=y
CONFIG_NETLINK=y
CONFIG_IP_MULTIPLE_TABLES=y
# CONFIG_IP_ROUTE_FWMARK is not set
CONFIG_IP_ROUTE_NAT=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_TOS=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_ROUTE_LARGE_TABLES=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# CONFIG_ARPD is not set
CONFIG_INET_ECN=y
CONFIG_SYN_COOKIES=y

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_FTP=y
CONFIG_IP_NF_QUEUE=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_MAC=y
CONFIG_IP_NF_MATCH_MARK=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_TOS=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_MATCH_UNCLEAN=y
CONFIG_IP_NF_MATCH_OWNER=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_MIRROR=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_NAT_FTP=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_TOS=y
CONFIG_IP_NF_TARGET_MARK=y
CONFIG_IP_NF_TARGET_LOG=y

#
# IP: Virtual Server Configuration
#
CONFIG_IP_VS=y
CONFIG_IP_VS_DEBUG=y
CONFIG_IP_VS_TAB_BITS=12
CONFIG_IP_VS_RR=y
CONFIG_IP_VS_WRR=y
CONFIG_IP_VS_LC=y
CONFIG_IP_VS_WLC=y
CONFIG_IP_VS_LBLC=y
CONFIG_IP_VS_LBLCR=y
CONFIG_IP_VS_FTP=y
CONFIG_IPV6=m
# CONFIG_IPV6_EUI64 is not set

--
Kev Green, aka Kyrian. Email: kyrian@ore.org Web:
http://mud.ore.org/~kyrian/
"Someday you too will know my pain, and smile its blacktoothed grin,
if the war inside my head, won't take a day off I'll be dead" --
Megadeth.
Re: ipvs-0.2.6, stock 2.4.2 kernel. compile failure. [ In reply to ]
C'est ainsi que Kyrian (kyrian@ore.org) s'exprimait:

] static rwlock_t __ip_vs_svc_lock = RW_LOCK_UNLOCKED;
]
I just removed the static word in that definition so that the other
module may use it. BTW the generated kernel produced (ipvs included in the
kernel not as modules) has a Null pointer dereference :-(

Hope this helps,
Bruno.
--
NetServer Linux Solution Consultant - TCO/EMEA Tél: 04 76 14 32 78
Hewlett-Packard Grenoble Fax: 04 76 14 53 84
Des infos sur Linux? http://www.hyper-linux.org - http://www.hp.com/linux
La musique ancienne? http://www.musique-ancienne.org - http://www.medieval.org
Re: ipvs-0.2.6, stock 2.4.2 kernel. compile failure. [ In reply to ]
Bruno,

Thanks. It compiles now...

... and I know what you mean by a 'null pointer dereference' being bad
too ;(

I'll recompile with it as modules ;)

K.


Bruno Cornec wrote:
>
> C'est ainsi que Kyrian (kyrian@ore.org) s'exprimait:
>
> ] static rwlock_t __ip_vs_svc_lock = RW_LOCK_UNLOCKED;
> ]
> I just removed the static word in that definition so that the other
> module may use it. BTW the generated kernel produced (ipvs included in the
> kernel not as modules) has a Null pointer dereference :-(
>
> Hope this helps,
> Bruno.
> --
> NetServer Linux Solution Consultant - TCO/EMEA Tél: 04 76 14 32 78
> Hewlett-Packard Grenoble Fax: 04 76 14 53 84
> Des infos sur Linux? http://www.hyper-linux.org - http://www.hp.com/linux
> La musique ancienne? http://www.musique-ancienne.org - http://www.medieval.org

--
Kev Green, aka Kyrian. Email: kyrian@ore.org Web:
http://mud.ore.org/~kyrian/
"Someday you too will know my pain, and smile its blacktoothed grin,
if the war inside my head, won't take a day off I'll be dead" --
Megadeth.
Re: ipvs-0.2.6, stock 2.4.2 kernel. compile failure. [ In reply to ]
Bruno Cornec wrote:
>
> C'est ainsi que Kyrian (kyrian@ore.org) s'exprimait:
>
> ] static rwlock_t __ip_vs_svc_lock = RW_LOCK_UNLOCKED;
> ]
> I just removed the static word in that definition so that the other
> module may use it. BTW the generated kernel produced (ipvs included in the
> kernel not as modules) has a Null pointer dereference :-(

It compiled for me. This is a surprise, it worked and it's not supposed to :-)

Joe

--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA
Re: ipvs-0.2.6, stock 2.4.2 kernel. compile failure. [ In reply to ]
> > C'est ainsi que Kyrian (kyrian@ore.org) s'exprimait:
> >
> > ] static rwlock_t __ip_vs_svc_lock = RW_LOCK_UNLOCKED;
> > ]
> > I just removed the static word in that definition so that the other
> > module may use it. BTW the generated kernel produced (ipvs included in the
> > kernel not as modules) has a Null pointer dereference :-(
> It compiled for me. This is a surprise, it worked and it's not supposed to :-)

Hi,

I'm still having troubles.

I assume that you don't make all of the LVS stuff as modules, and that
some of it has to actually be built in to the kernel proper? Otherwise
what I've done would work...? ;*|

Could some kind soul who's got linux-2.4.2-0.2.6 compiled, and LVS
working post the relevant parts of their kernel's .config?

Yours,

Kev.

PS. FYI I'm getting (with no modules inserted to begin with):

[root@ct1 ipvs-0.2.6]# insmod ip_vs_wlc
Using /lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o
/lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o: unresolved symbol
ip_vs_get_debug_level_Rsmp_7176a134
/lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o: unresolved symbol
register_ip_vs_scheduler_Rsmp_3eab7bfb
/lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o: unresolved symbol
unregister_ip_vs_scheduler_Rsmp_1ae2864e
[root@ct1 ipvs-0.2.6]#

And:

[root@ct1 ipvs-0.2.6]# insmod ip_vs_wlc
Using /lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o
/lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o: unresolved symbol
ip_vs_get_debug_level_Rsmp_7176a134
/lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o: unresolved symbol
register_ip_vs_scheduler_Rsmp_3eab7bfb
/lib/modules/2.4.2/kernel/net/ipv4/ipvs/ip_vs_wlc.o: unresolved symbol
unregister_ip_vs_scheduler_Rsmp_1ae2864e
[root@ct1 ipvs-0.2.6]#

With a .config of:

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=m
CONFIG_IP_NF_FTP=m
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
CONFIG_IP_NF_MATCH_MAC=m
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_TOS=m
CONFIG_IP_NF_MATCH_STATE=m
CONFIG_IP_NF_MATCH_UNCLEAN=m
CONFIG_IP_NF_MATCH_OWNER=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_MIRROR=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_NAT_FTP=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_TOS=m
CONFIG_IP_NF_TARGET_MARK=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_COMPAT_IPCHAINS=y
CONFIG_IP_NF_NAT_NEEDED=y

#
# IP: Virtual Server Configuration
#
CONFIG_IP_VS=m
CONFIG_IP_VS_DEBUG=y
CONFIG_IP_VS_TAB_BITS=12
CONFIG_IP_VS_RR=m
CONFIG_IP_VS_WRR=m
CONFIG_IP_VS_LC=m
CONFIG_IP_VS_WLC=m
CONFIG_IP_VS_LBLC=m
CONFIG_IP_VS_LBLCR=m
CONFIG_IP_VS_FTP=m
CONFIG_IPV6=m
# CONFIG_IPV6_EUI64 is not set

## No IPVS netfilter stuff set...

--
Kev Green, aka Kyrian. Email: kyrian@ore.org Web:
http://mud.ore.org/~kyrian/
"Someday you too will know my pain, and smile its blacktoothed grin,
if the war inside my head, won't take a day off I'll be dead" --
Megadeth.
Re: ipvs-0.2.6, stock 2.4.2 kernel. compile failure. [ In reply to ]
Kyrian wrote:
>
> > > C'est ainsi que Kyrian (kyrian@ore.org) s'exprimait:
> > >
> > > ] static rwlock_t __ip_vs_svc_lock = RW_LOCK_UNLOCKED;
> > > ]
> > > I just removed the static word in that definition so that the other
> > > module may use it. BTW the generated kernel produced (ipvs included in the
> > > kernel not as modules) has a Null pointer dereference :-(
> > It compiled for me. This is a surprise, it worked and it's not supposed to :-)
>
> Hi,
>
> I'm still having troubles.
>
> I assume that you don't make all of the LVS stuff as modules, and that
> some of it has to actually be built in to the kernel proper? Otherwise
> what I've done would work...? ;*|

you can compile it into the kernel or do as modules. I've only
done the module method.

You have to patch the kernel symbol table (see the README in the
ipvs directory). You then compile the kernel with your favorite
options. (.config attached)

Reboot into the new kernel.

The compile the ipvs modules with the makefile in /ipvs-x.x.x/ipvs.
I then tar-untar all the *.o files into
/lib/modules/`uname -r`/kernel/net/ipvs

Then run depmod -a. It will complain of unresolved symbols in two
of the ip_vs*.o files. They aren't supposed to be in /lib/modules
and are only there because it was easier to copy everything rather
than just the files needed. You can ignore this error - nothing will
ever try to load those files as modules.

Then do insmod ip_vs

I don't know if this is the way that Wensong planned, but it works.

don't forget to make and install the new ipvsadm

Joe

--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@epa.gov ph# 919-541-0007, RTP, NC, USA
Re: ipvs-0.2.6, stock 2.4.2 kernel. compile failure. [ In reply to ]
On Wed, 21 Mar 2001, Joseph Mack wrote:

> Kyrian wrote:
> >
> > > > C'est ainsi que Kyrian (kyrian@ore.org) s'exprimait:
> > > >
> > > > ] static rwlock_t __ip_vs_svc_lock = RW_LOCK_UNLOCKED;
> > > > ]
> > > > I just removed the static word in that definition so that the other
> > > > module may use it. BTW the generated kernel produced (ipvs included in the
> > > > kernel not as modules) has a Null pointer dereference :-(
> > > It compiled for me. This is a surprise, it worked and it's not supposed to :-)
> >
> > Hi,
> >
> > I'm still having troubles.
> >
> > I assume that you don't make all of the LVS stuff as modules, and that
> > some of it has to actually be built in to the kernel proper? Otherwise
> > what I've done would work...? ;*|
>
> you can compile it into the kernel or do as modules. I've only
> done the module method.
>
> You have to patch the kernel symbol table (see the README in the
> ipvs directory). You then compile the kernel with your favorite
> options. (.config attached)
>
> Reboot into the new kernel.
>
> The compile the ipvs modules with the makefile in /ipvs-x.x.x/ipvs.
> I then tar-untar all the *.o files into
> /lib/modules/`uname -r`/kernel/net/ipvs
>
> Then run depmod -a. It will complain of unresolved symbols in two
> of the ip_vs*.o files. They aren't supposed to be in /lib/modules
> and are only there because it was easier to copy everything rather
> than just the files needed. You can ignore this error - nothing will
> ever try to load those files as modules.
>
> Then do insmod ip_vs
>
> I don't know if this is the way that Wensong planned, but it works.
>

Will add the feature soon, i.e. "modprobe ip_vs" when the ipvs service
isn't available.

Thanks,

Wensong

> don't forget to make and install the new ipvsadm
>
> Joe
>
>