Re: HAProxy under 2.6 x64

From: Willy Tarreau <w#1wt.eu>
Date: Wed, 11 Feb 2009 23:40:39 +0100


Hi Robert,

On Wed, Feb 11, 2009 at 10:10:04PM +0000, Robert Simmons wrote:
> Hello All,
>
> I'm currently working on a project for my degree utilising HAProxy,
> and I am having trouble getting it to compile under Fedora 9 x64
> (2.6.27.9-73.fc9.x86_64). As it stands, the compilation bombs out on
> compiling netfilter - but I am at a loss to explain why, or find the
> solution other than "it doesn't work". Does anyone have HAProxy
> running under x64 using the 2.6 kernel - if so, what distro and version?
>
> Build Output:
> [root#eskimo haproxy-1.2.18]# make TARGET=linux26 CPU=x64
> gcc -Wall -I. -DNETFILTER -DENABLE_POLL -DENABLE_EPOLL -
> DSTATTIME=0 -DTPROXY -g -c -o haproxy.o haproxy.c
> In file included from haproxy.c:68:
> /usr/include/linux/netfilter_ipv4.h:53: error: ?INT_MIN? undeclared
> here (not in a function)
> /usr/include/linux/netfilter_ipv4.h:64: error: ?INT_MAX? undeclared
> here (not in a function)
> make: *** [haproxy.o] Error 1

Seems like netfilter is missing an include <limits.h> ...

Either you fix it by hand in your netfilter_ipv4.h header, which is dirty and not a long-term solution, or you can insert "#include <limits.h>" in haproxy sources, let's say in include/common/compat.h for instance, as I think it will be loaded by all other files.

If this works, please drop us a mail with the patch with a small comment, I'll merge it indicating it fixes build on this distro.

Regards,
Willy Received on 2009/02/11 23:40

This archive was generated by hypermail 2.2.0 : 2009/02/12 00:45 CET