Re: error building 2.0.10

Quentin Armitage <[email protected]> Tue, 20 Nov 2018 17:33:28 +0000
Newsgroups gmane.linux.keepalived.devel
Organization The Armitage family
Message-ID <[email protected]>
--===============1912834236601175306==
Content-Type: multipart/alternative; boundary="=-QwZXKZ65nSMpamYIwv8o"


--=-QwZXKZ65nSMpamYIwv8o
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

Paul,
Many thanks for the report and the patch. It is now merged upstream.
Let's hope that there isn't another libC that defines TIMER_MAXIMUM!
Quentin
On Tue, 2018-11-20 at 16:42 +0000, Paul Gildea wrote:
> Hi, just so you know, the naming conflict above (with uClibc) is
> present in the newest keepalived (2.0.10).
> If anybody else is having this issue here is the patch I use for my
> system:
> 
> diff -Naur keepalived-2.0.10/lib/parser.c keepalived-
> 2.0.10_patch/lib/parser.c
> --- keepalived-2.0.10/lib/parser.c      2018-11-05 21:49:48.000000000
> +0000
> +++ keepalived-2.0.10_patch/lib/parser.c        2018-11-20
> 15:55:08.381534860 +0000
> @@ -1915,20 +1915,20 @@
>  #endif
> 
> 
>         if (!max_time)
> -               max_time = TIMER_MAX;
> +               max_time = TIMER_MAXIMUM;
> 
> 
>         errno = 0;
>         timer = strtoul(vector_slot(strvec, index), &endptr, 10);
> -       *res = (timer > TIMER_MAX ? TIMER_MAX : timer) * TIMER_HZ;
> +       *res = (timer > TIMER_MAXIMUM ? TIMER_MAXIMUM : timer) *
> TIMER_HZ;
> 
> 
>         if (FMT_STR_VSLOT(strvec, index)[0] == '-')
>                 report_config_error(CONFIG_INVALID_NUMBER,
> "%snegative number '%s'", warn, FMT_STR_VSLOT(strvec, index));
>         else if (*endptr)
>                 report_config_error(CONFIG_INVALID_NUMBER, "%sinvalid
> number '%s'", warn, FMT_STR_VSLOT(strvec, index));
> -       else if (errno == ERANGE || timer > TIMER_MAX)
> +       else if (errno == ERANGE || timer > TIMER_MAXIMUM)
>                 report_config_error(CONFIG_INVALID_NUMBER, "%snumber
> '%s' outside timer range", warn, FMT_STR_VSLOT(strvec, index));
>         else if (timer < min_time || timer > max_time)
> -               report_config_error(CONFIG_INVALID_NUMBER, "number
> '%s' outside range [%ld, %ld]", FMT_STR_VSLOT(strvec, index),
> min_time, max_time ? max_time : TIMER_MAX);
> +               report_config_error(CONFIG_INVALID_NUMBER, "number
> '%s' outside range [%ld, %ld]", FMT_STR_VSLOT(strvec, index),
> min_time, max_time ? max_time : TIMER_MAXIMUM);
>         else
>                 return true;
> 
> 
> diff -Naur keepalived-2.0.10/lib/parser.h keepalived-
> 2.0.10_patch/lib/parser.h
> --- keepalived-2.0.10/lib/parser.h      2018-11-08 19:33:31.000000000
> +0000
> +++ keepalived-2.0.10_patch/lib/parser.h        2018-11-20
> 15:55:08.381534860 +0000
> @@ -38,7 +38,7 @@
>  #define MAXBUF 1024
> 
> 
>  /* Maximum time read_timer can return */
> -#define TIMER_MAX (ULONG_MAX / TIMER_HZ)
> +#define TIMER_MAXIMUM (ULONG_MAX / TIMER_HZ)
> 
> 
>  /* Configuration test errors. These should be in decreasing order of
> severity */
>  typedef enum {
> 
> 
> 
> On Thu, 18 Oct 2018 at 11:23, Paul Gildea <[email protected]> wrote:
> > Apologies for the slow reply, I patched  "#include <stdbool.h>"
> > into core/process.c and keepalived-2.0.7 built.I haven't tested it
> > out yet but if there is a problem with that solution (never really
> > used C) I can work around it as it's just some definitions.  I can
> > log bugs about these if necessary? Even though it's more of a
> > uClibc problem.
> > 
> > Thanks,
> > 
> > --
> > Paul
> > On Tue, 16 Oct 2018 at 17:39, Quentin Armitage <[email protected]
> > g.uk> wrote:
> > > Paul,
> > > It looks like bool, true and false are undeclared/undefined. So
> > > far as I can see uClibc doesn't have a stdbool.h header file, but
> > > I'm not sure why the #include <stdbool.h> isn't failing.
> > > Quentin
> > > On Tue, 2018-10-16 at 15:25 +0100, Paul Gildea wrote:
> > > > Thanks Quentin, that cleared up the issue in my mind for me
> > > > very well. Either solution worked fine and build is progressing
> > > > further.It looks like there are some more issues for me so I'll
> > > > see how I get on and let you know of what happens:
> > > > 
> > > > make[3]: Entering directory
> > > > `/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > 2.0.7new/keepalived/core'
> > > >   CC       main.o
> > > >   CC       daemon.o
> > > >   CC       pidfile.o
> > > >   CC       layer4.o
> > > >   CC       smtp.o
> > > >   CC       global_data.o
> > > >   CC       global_parser.o
> > > >   CC       process.o
> > > > process.c:41: error: expected '=', ',', ';', 'asm' or
> > > > '__attribute__' before 'realtime_priority_set'
> > > > process.c:49: error: expected '=', ',', ';', 'asm' or
> > > > '__attribute__' before 'priority_set'
> > > > process.c: In function 'set_process_priority':
> > > > process.c:79: error: 'priority_set' undeclared (first use in
> > > > this function)
> > > > process.c:79: error: (Each undeclared identifier is reported
> > > > only once
> > > > process.c:79: error: for each function it appears in.)
> > > > process.c:79: error: 'true' undeclared (first use in this
> > > > function)
> > > > process.c: In function 'reset_process_priority':
> > > > process.c:91: error: 'priority_set' undeclared (first use in
> > > > this function)
> > > > process.c:91: error: 'false' undeclared (first use in this
> > > > function)
> > > > process.c: In function 'reset_process_priorities':
> > > > process.c:141: error: 'realtime_priority_set' undeclared (first
> > > > use in this function)
> > > > process.c:150: error: 'false' undeclared (first use in this
> > > > function)
> > > > process.c:164: error: 'priority_set' undeclared (first use in
> > > > this function)
> > > > make[3]: *** [process.o] Error 1
> > > > make[3]: *** Waiting for unfinished jobs....
> > > > make[3]: Leaving directory
> > > > `/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > 2.0.7new/keepalived/core'
> > > > make[2]: *** [all-recursive] Error 1
> > > > make[2]: Leaving directory
> > > > `/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > 2.0.7new/keepalived'
> > > > make[1]: *** [all-recursive] Error 1
> > > > make[1]: Leaving directory
> > > > `/media/vmpart/vrrp/buildroot/output/build/keepalived-2.0.7new'
> > > > make: ***
> > > > [/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > 2.0.7new/.stamp_built] Error 2
> > > > 
> > > > 
> > > > On Tue, 16 Oct 2018 at 14:26, Quentin Armitage <quentin@armitag
> > > > e.org.uk> wrote:
> > > > > Paul,
> > > > > This appears probably to be due to a conflict between uClibc
> > > > > using TIMER_MAX and keepalived defining TIMER_MAX. glibc
> > > > > doesn't have a definition of, or use, TIMER_MAX, at least not
> > > > > on my systems, and musl doesn't appear to either.
> > > > > So the problem would appear to be namespace polution by
> > > > > uClibc. Looking at the uClibc-ng source code, TIMER_MAX
> > > > > doesn't appear to be used other than to define it if it is
> > > > > not defined, in common/bits/uClibc_local_lim.h, so I suspect
> > > > > it is some historical code in uClibc that should be removed.
> > > > > It would be simple enough to rename the TIMER_MAX used in
> > > > > keepalived to something else, and there are only 4 lines in
> > > > > keepalived where it is used (all in read_timer
> > > > > in  lib/parser.c).
> > > > > Could you just try moving the definition of TIMER_MAX from
> > > > > lib/parser.h to lib/parser.c and see if that works. If not,
> > > > > could you try changing it to TIMER_MAX_UL or something like
> > > > > that and seeing if it resolves your problem. 
> > > > > Please let me know what you work out, and we can then see if
> > > > > we can push a commit to work around the problem in uClibc.
> > > > > Quentin ArmitageOn Tue, 2018-10-16 at 12:22 +0100, Paul
> > > > > Gildea wrote:
> > > > > > Hi,
> > > > > > I currently have 2.0.5 build and was trying to patch it
> > > > > > with a fix I need by patching this commit to it:
> > > > > > https://github.com/acassen/keepalived/commit/37d6b3bc22d307
> > > > > > d09ab8bd75111c3645c742c792
> > > > > > However the code change must be too great between 2.0.5 and
> > > > > > master because doing so causes build errors. To make the
> > > > > > code more similar before patching I decided to upgrade to
> > > > > > the latest release, 2.0.7, however that is not building
> > > > > > with the below error, do you know what might have changed
> > > > > > to cause this or what is happening? I'm not sure from
> > > > > > reading the changelog. I have also tried to build 2.0.6 to
> > > > > > narrow it down,  which worked fine.
> > > > > > 
> > > > > > /media/vmpart/vrrp/buildroot/output/host/usr/x86_64-
> > > > > > unknown-linux-
> > > > > > uclibc/sysroot/usr/include/bits/uClibc_local_lim.h:15:3:
> > > > > > error: #error local_lim.h was incorrectly updated, use the
> > > > > > NPTL version from glibc
> > > > > > make[3]: *** [parser.o] Error 1
> > > > > > make[3]: *** Waiting for unfinished jobs....
> > > > > >   CC       logger.o
> > > > > > make[3]: Leaving directory
> > > > > > `/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > > > 2.0.7/lib'
> > > > > > make[2]: *** [all] Error 2
> > > > > > make[2]: Leaving directory
> > > > > > `/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > > > 2.0.7/lib'
> > > > > > make[1]: *** [all-recursive] Error 1
> > > > > > make[1]: Leaving directory
> > > > > > `/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > > > 2.0.7'
> > > > > > make: ***
> > > > > > [/media/vmpart/vrrp/buildroot/output/build/keepalived-
> > > > > > 2.0.7/.stamp_built] Error 2
> > > > > > 
> > > > > > 
> > > > > > Looking at the file with that error I see:
> > > > > > 
> > > > > > #if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX ||
> > > > > > !defined SEM_VALUE_MAX
> > > > > > # error local_lim.h was incorrectly updated, use the NPTL
> > > > > > version from glibc
> > > > > > #endif
> > > > > > 
> > > > > > 
> > > > > > Regards,
> > > > > > 
> > > > > > 
> > > > > > --
> > > > > > Paul
> > > > > > 
> > > > > > _______________________________________________
> > > > > > Keepalived-devel mailing list
> > > > > > [email protected]
> > > > > > https://lists.sourceforge.net/lists/listinfo/keepalived-dev
> > > > > > el
--=-QwZXKZ65nSMpamYIwv8o
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head></head><body bgcolor=3D"#ffffff" text=3D"#2e3436" link=3D"#2a76=
c6" vlink=3D"#2e3436"><div>Paul,</div><div><br></div><div>Many thanks for t=
he report and the patch. It is now merged upstream.</div><div><br></div><di=
v>Let's hope that there isn't another libC that defines TIMER_MAXIMUM!</div=
><div><br></div><div>Quentin</div><div><br></div><div>On Tue, 2018-11-20 at=
 16:42 +0000, Paul Gildea wrote:</div><blockquote type=3D"cite" style=3D"ma=
rgin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir=
=3D"ltr"><div dir=3D"ltr">Hi, just so you know, the naming conflict above (=
with uClibc) is present in the newest keepalived (2.0.10).<div><br></div><d=
iv>If anybody else is having this issue here is the patch I use for my syst=
em:</div><div><br></div><div><div><font face=3D"monospace, monospace">diff =
-Naur keepalived-2.0.10/lib/parser.c keepalived-2.0.10_patch/lib/parser.c</=
font></div><div><font face=3D"monospace, monospace">--- keepalived-2.0.10/l=
ib/parser.c &nbsp; &nbsp; &nbsp;2018-11-05 21:49:48.000000000 +0000</font><=
/div><div><font face=3D"monospace, monospace">+++ keepalived-2.0.10_patch/l=
ib/parser.c &nbsp; &nbsp; &nbsp; &nbsp;2018-11-20 15:55:08.381534860 +0000<=
/font></div><div><font face=3D"monospace, monospace">@@ -1915,20 +1915,20 @=
@</font></div><div><font face=3D"monospace, monospace">&nbsp;#endif</font><=
/div><div><font face=3D"monospace, monospace"><br></font></div><div><font f=
ace=3D"monospace, monospace">&nbsp; &nbsp; &nbsp; &nbsp; if (!max_time)</fo=
nt></div><div><font face=3D"monospace, monospace">- &nbsp; &nbsp; &nbsp; &n=
bsp; &nbsp; &nbsp; &nbsp; max_time =3D TIMER_MAX;</font></div><div><font fa=
ce=3D"monospace, monospace">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nb=
sp; max_time =3D TIMER_MAXIMUM;</font></div><div><font face=3D"monospace, m=
onospace"><br></font></div><div><font face=3D"monospace, monospace">&nbsp; =
&nbsp; &nbsp; &nbsp; errno =3D 0;</font></div><div><font face=3D"monospace,=
 monospace">&nbsp; &nbsp; &nbsp; &nbsp; timer =3D strtoul(vector_slot(strve=
c, index), &amp;endptr, 10);</font></div><div><font face=3D"monospace, mono=
space">- &nbsp; &nbsp; &nbsp; *res =3D (timer &gt; TIMER_MAX ? TIMER_MAX : =
timer) * TIMER_HZ;</font></div><div><font face=3D"monospace, monospace">+ &=
nbsp; &nbsp; &nbsp; *res =3D (timer &gt; TIMER_MAXIMUM ? TIMER_MAXIMUM : ti=
mer) * TIMER_HZ;</font></div><div><font face=3D"monospace, monospace"><br><=
/font></div><div><font face=3D"monospace, monospace">&nbsp; &nbsp; &nbsp; &=
nbsp; if (FMT_STR_VSLOT(strvec, index)[0] =3D=3D '-')</font></div><div><fon=
t face=3D"monospace, monospace">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; report_config_error(CONFIG_INVALID_NUMBER, "%snegative number =
'%s'", warn, FMT_STR_VSLOT(strvec, index));</font></div><div><font face=3D"=
monospace, monospace">&nbsp; &nbsp; &nbsp; &nbsp; else if (*endptr)</font><=
/div><div><font face=3D"monospace, monospace">&nbsp; &nbsp; &nbsp; &nbsp; &=
nbsp; &nbsp; &nbsp; &nbsp; report_config_error(CONFIG_INVALID_NUMBER, "%sin=
valid number '%s'", warn, FMT_STR_VSLOT(strvec, index));</font></div><div><=
font face=3D"monospace, monospace">- &nbsp; &nbsp; &nbsp; else if (errno =
=3D=3D ERANGE || timer &gt; TIMER_MAX)</font></div><div><font face=3D"monos=
pace, monospace">+ &nbsp; &nbsp; &nbsp; else if (errno =3D=3D ERANGE || tim=
er &gt; TIMER_MAXIMUM)</font></div><div><font face=3D"monospace, monospace"=
>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; report_config_erro=
r(CONFIG_INVALID_NUMBER, "%snumber '%s' outside timer range", warn, FMT_STR=
_VSLOT(strvec, index));</font></div><div><font face=3D"monospace, monospace=
">&nbsp; &nbsp; &nbsp; &nbsp; else if (timer &lt; min_time || timer &gt; ma=
x_time)</font></div><div><font face=3D"monospace, monospace">- &nbsp; &nbsp=
; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; report_config_error(CONFIG_INVALID_NUM=
BER, "number '%s' outside range [%ld, %ld]", FMT_STR_VSLOT(strvec, index), =
min_time, max_time ? max_time : TIMER_MAX);</font></div><div><font face=3D"=
monospace, monospace">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; re=
port_config_error(CONFIG_INVALID_NUMBER, "number '%s' outside range [%ld, %=
ld]", FMT_STR_VSLOT(strvec, index), min_time, max_time ? max_time : TIMER_M=
AXIMUM);</font></div><div><font face=3D"monospace, monospace">&nbsp; &nbsp;=
 &nbsp; &nbsp; else</font></div><div><font face=3D"monospace, monospace">&n=
bsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;</font></=
div><div><font face=3D"monospace, monospace"><br></font></div><div><font fa=
ce=3D"monospace, monospace">diff -Naur keepalived-2.0.10/lib/parser.h keepa=
lived-2.0.10_patch/lib/parser.h</font></div><div><font face=3D"monospace, m=
onospace">--- keepalived-2.0.10/lib/parser.h &nbsp; &nbsp; &nbsp;2018-11-08=
 19:33:31.000000000 +0000</font></div><div><font face=3D"monospace, monospa=
ce">+++ keepalived-2.0.10_patch/lib/parser.h &nbsp; &nbsp; &nbsp; &nbsp;201=
8-11-20 15:55:08.381534860 +0000</font></div><div><font face=3D"monospace, =
monospace">@@ -38,7 +38,7 @@</font></div><div><font face=3D"monospace, mono=
space">&nbsp;#define MAXBUF 1024</font></div><div><font face=3D"monospace, =
monospace"><br></font></div><div><font face=3D"monospace, monospace">&nbsp;=
/* Maximum time read_timer can return */</font></div><div><font face=3D"mon=
ospace, monospace">-#define TIMER_MAX (ULONG_MAX / TIMER_HZ)</font></div><d=
iv><font face=3D"monospace, monospace">+#define TIMER_MAXIMUM (ULONG_MAX / =
TIMER_HZ)</font></div><div><font face=3D"monospace, monospace"><br></font><=
/div><div><font face=3D"monospace, monospace">&nbsp;/* Configuration test e=
rrors. These should be in decreasing order of severity */</font></div><div>=
<font face=3D"monospace, monospace">&nbsp;typedef enum {</font></div></div>=
<div><br></div><div><br></div></div></div><br><div class=3D"gmail_quote"><d=
iv dir=3D"ltr">On Thu, 18 Oct 2018 at 11:23, Paul Gildea &lt;<a href=3D"mai=
lto:[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquote type=
=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding=
-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr">Apologies for the slow reply, =
I patched &nbsp;"#include &lt;stdbool.h&gt;" into core/process.c and keepal=
ived-2.0.7 built.<div>I haven't tested it out yet but if there is a problem=
 with that solution (never really used C)&nbsp;I can work around it as it's=
 just some definitions.&nbsp; I can log bugs about these if necessary? Even=
 though it's more of a uClibc problem.</div><div><br></div><div>Thanks,</di=
v><div><br></div><div>--</div><div>Paul</div></div></div><br><div class=3D"=
gmail_quote"><div dir=3D"ltr">On Tue, 16 Oct 2018 at 17:39, Quentin Armitag=
e &lt;<a href=3D"mailto:[email protected]" target=3D"_blank">quentin@=
armitage.org.uk</a>&gt; wrote:<br></div><blockquote type=3D"cite" style=3D"=
margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div bgc=
olor=3D"#ffffff" text=3D"#2e3436" link=3D"#2a76c6" vlink=3D"#2e3436"><div>P=
aul,</div><div><br></div><div>It looks like bool, true and false are undecl=
ared/undefined. So far as I can see uClibc doesn't have a stdbool.h header =
file, but I'm not sure why the #include &lt;stdbool.h&gt; isn't failing.</d=
iv><div><br></div><div>Quentin</div><div><br></div><div>On Tue, 2018-10-16 =
at 15:25 +0100, Paul Gildea wrote:</div><blockquote type=3D"cite" style=3D"=
margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir=
=3D"ltr"><div dir=3D"ltr">Thanks Quentin, that cleared up the issue in my m=
ind for me very well. Either solution worked fine and build is progressing =
further.<div>It looks like there are some more issues for me so I'll see ho=
w I get on and let you know of what happens:</div><div><br></div><div><div>=
<font face=3D"monospace, monospace">make[3]: Entering directory `/media/vmp=
art/vrrp/buildroot/output/build/keepalived-2.0.7new/keepalived/core'</font>=
</div><div><font face=3D"monospace, monospace">&nbsp; CC &nbsp; &nbsp; &nbs=
p; main.o</font></div><div><font face=3D"monospace, monospace">&nbsp; CC &n=
bsp; &nbsp; &nbsp; daemon.o</font></div><div><font face=3D"monospace, monos=
pace">&nbsp; CC &nbsp; &nbsp; &nbsp; pidfile.o</font></div><div><font face=
=3D"monospace, monospace">&nbsp; CC &nbsp; &nbsp; &nbsp; layer4.o</font></d=
iv><div><font face=3D"monospace, monospace">&nbsp; CC &nbsp; &nbsp; &nbsp; =
smtp.o</font></div><div><font face=3D"monospace, monospace">&nbsp; CC &nbsp=
; &nbsp; &nbsp; global_data.o</font></div><div><font face=3D"monospace, mon=
ospace">&nbsp; CC &nbsp; &nbsp; &nbsp; global_parser.o</font></div><div><fo=
nt face=3D"monospace, monospace">&nbsp; CC &nbsp; &nbsp; &nbsp; process.o</=
font></div><div><font face=3D"monospace, monospace">process.c:41: error: ex=
pected '=3D', ',', ';', 'asm' or '__attribute__' before 'realtime_priority_=
set'</font></div><div><font face=3D"monospace, monospace">process.c:49: err=
or: expected '=3D', ',', ';', 'asm' or '__attribute__' before 'priority_set=
'</font></div><div><font face=3D"monospace, monospace">process.c: In functi=
on 'set_process_priority':</font></div><div><font face=3D"monospace, monosp=
ace">process.c:79: error: 'priority_set' undeclared (first use in this func=
tion)</font></div><div><font face=3D"monospace, monospace">process.c:79: er=
ror: (Each undeclared identifier is reported only once</font></div><div><fo=
nt face=3D"monospace, monospace">process.c:79: error: for each function it =
appears in.)</font></div><div><font face=3D"monospace, monospace">process.c=
:79: error: 'true' undeclared (first use in this function)</font></div><div=
><font face=3D"monospace, monospace">process.c: In function 'reset_process_=
priority':</font></div><div><font face=3D"monospace, monospace">process.c:9=
1: error: 'priority_set' undeclared (first use in this function)</font></di=
v><div><font face=3D"monospace, monospace">process.c:91: error: 'false' und=
eclared (first use in this function)</font></div><div><font face=3D"monospa=
ce, monospace">process.c: In function 'reset_process_priorities':</font></d=
iv><div><font face=3D"monospace, monospace">process.c:141: error: 'realtime=
_priority_set' undeclared (first use in this function)</font></div><div><fo=
nt face=3D"monospace, monospace">process.c:150: error: 'false' undeclared (=
first use in this function)</font></div><div><font face=3D"monospace, monos=
pace">process.c:164: error: 'priority_set' undeclared (first use in this fu=
nction)</font></div><div><font face=3D"monospace, monospace">make[3]: *** [=
process.o] Error 1</font></div><div><font face=3D"monospace, monospace">mak=
e[3]: *** Waiting for unfinished jobs....</font></div><div><font face=3D"mo=
nospace, monospace">make[3]: Leaving directory `/media/vmpart/vrrp/buildroo=
t/output/build/keepalived-2.0.7new/keepalived/core'</font></div><div><font =
face=3D"monospace, monospace">make[2]: *** [all-recursive] Error 1</font></=
div><div><font face=3D"monospace, monospace">make[2]: Leaving directory `/m=
edia/vmpart/vrrp/buildroot/output/build/keepalived-2.0.7new/keepalived'</fo=
nt></div><div><font face=3D"monospace, monospace">make[1]: *** [all-recursi=
ve] Error 1</font></div><div><font face=3D"monospace, monospace">make[1]: L=
eaving directory `/media/vmpart/vrrp/buildroot/output/build/keepalived-2.0.=
7new'</font></div><div><font face=3D"monospace, monospace">make: *** [/medi=
a/vmpart/vrrp/buildroot/output/build/keepalived-2.0.7new/.stamp_built] Erro=
r 2</font></div></div><div><br></div></div></div><br><div class=3D"gmail_qu=
ote"><div dir=3D"ltr">On Tue, 16 Oct 2018 at 14:26, Quentin Armitage &lt;<a=
 href=3D"mailto:[email protected]" target=3D"_blank">quentin@armitage=
.org.uk</a>&gt; wrote:<br></div><blockquote type=3D"cite" style=3D"margin:0=
 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div bgcolor=3D"=
#ffffff" text=3D"#2e3436" link=3D"#2a76c6" vlink=3D"#2e3436"><div>Paul,</di=
v><div><br></div><div>This appears probably to be due to a conflict between=
 uClibc using TIMER_MAX and keepalived defining TIMER_MAX. glibc doesn't ha=
ve a definition of, or use, TIMER_MAX, at least not on my systems, and musl=
 doesn't appear to either.</div><div><br></div><div>So the problem would ap=
pear to be namespace polution by uClibc. Looking at the uClibc-ng source co=
de, TIMER_MAX doesn't appear to be used other than to define it if it is no=
t defined, in common/bits/uClibc_local_lim.h, so I suspect it is some histo=
rical code in uClibc that should be removed.</div><div><br></div><div>It wo=
uld be simple enough to rename the TIMER_MAX used in keepalived to somethin=
g else, and there are only 4 lines in keepalived where it is used (all in r=
ead_timer in  lib/parser.c).</div><div><br></div><div>Could you just try mo=
ving the definition of TIMER_MAX from lib/parser.h to lib/parser.c and see =
if that works. If not, could you try changing it to TIMER_MAX_UL or somethi=
ng like that and seeing if it resolves your problem. </div><div><br></div><=
div>Please let me know what you work out, and we can then see if we can pus=
h a commit to work around the problem in uClibc.</div><div><br></div><div>Q=
uentin Armitage</div><div>On Tue, 2018-10-16 at 12:22 +0100, Paul Gildea wr=
ote:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left=
:2px #729fcf solid;padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div=
 dir=3D"ltr"><div dir=3D"ltr">Hi,<div><br></div><div>I currently have 2.0.5=
 build and was trying to patch it with a fix I need by patching this commit=
 to it:</div><div><a href=3D"https://github.com/acassen/keepalived/commit/3=
7d6b3bc22d307d09ab8bd75111c3645c742c792" target=3D"_blank">https://github.c=
om/acassen/keepalived/commit/37d6b3bc22d307d09ab8bd75111c3645c742c792</a><b=
r></div><div>However the code change must be too great between 2.0.5 and ma=
ster because doing so causes build errors. To make the code more similar be=
fore patching I decided to upgrade to the latest release, 2.0.7, however th=
at is not building with the below error, do you know what might have change=
d to cause this or what is happening? I'm not sure from reading the changel=
og. I have also tried to build 2.0.6 to narrow it down, &nbsp;which worked =
fine.</div><div><br></div><div><div><font face=3D"monospace, monospace">/me=
dia/vmpart/vrrp/buildroot/output/host/usr/x86_64-unknown-linux-uclibc/sysro=
ot/usr/include/bits/uClibc_local_lim.h:15:3: error: #error local_lim.h was =
incorrectly updated, use the NPTL version from glibc</font></div><div><font=
 face=3D"monospace, monospace">make[3]: *** [parser.o] Error 1</font></div>=
<div><font face=3D"monospace, monospace">make[3]: *** Waiting for unfinishe=
d jobs....</font></div><div><font face=3D"monospace, monospace">&nbsp; CC &=
nbsp; &nbsp; &nbsp; logger.o</font></div><div><font face=3D"monospace, mono=
space">make[3]: Leaving directory `/media/vmpart/vrrp/buildroot/output/buil=
d/keepalived-2.0.7/lib'</font></div><div><font face=3D"monospace, monospace=
">make[2]: *** [all] Error 2</font></div><div><font face=3D"monospace, mono=
space">make[2]: Leaving directory `/media/vmpart/vrrp/buildroot/output/buil=
d/keepalived-2.0.7/lib'</font></div><div><font face=3D"monospace, monospace=
">make[1]: *** [all-recursive] Error 1</font></div><div><font face=3D"monos=
pace, monospace">make[1]: Leaving directory `/media/vmpart/vrrp/buildroot/o=
utput/build/keepalived-2.0.7'</font></div><div><font face=3D"monospace, mon=
ospace">make: *** [/media/vmpart/vrrp/buildroot/output/build/keepalived-2.0=
.7/.stamp_built] Error 2</font></div></div><div><br></div><div><br></div><d=
iv>Looking at the file with that error I see:</div><div><br></div><div><div=
 class=3D"m_2782091737082835261m_5552788607508047176m_6887387999980913702gm=
ail-add" style=3D"color:green;font-size:13.3333px;white-space:pre-wrap"><fo=
nt face=3D"monospace, monospace">#if !defined PTHREAD_KEYS_MAX || defined T=
IMER_MAX || !defined SEM_VALUE_MAX</font></div><div class=3D"m_278209173708=
2835261m_5552788607508047176m_6887387999980913702gmail-ctx" style=3D"color:=
rgb(51,51,51);font-size:13.3333px;white-space:pre-wrap"><font face=3D"monos=
pace, monospace"># error local_lim.h was incorrectly updated, use the NPTL =
version from glibc</font></div><div class=3D"m_2782091737082835261m_5552788=
607508047176m_6887387999980913702gmail-ctx" style=3D"color:rgb(51,51,51);fo=
nt-size:13.3333px;white-space:pre-wrap"><font face=3D"monospace, monospace"=
>#endif</font></div></div><div class=3D"m_2782091737082835261m_555278860750=
8047176m_6887387999980913702gmail-ctx" style=3D"color:rgb(51,51,51);font-si=
ze:13.3333px;white-space:pre-wrap"><font face=3D"monospace, monospace"><br>=
</font></div><div class=3D"m_2782091737082835261m_5552788607508047176m_6887=
387999980913702gmail-ctx" style=3D"color:rgb(51,51,51);font-size:13.3333px;=
white-space:pre-wrap"><font face=3D"monospace, monospace">Regards,</font></=
div><div class=3D"m_2782091737082835261m_5552788607508047176m_6887387999980=
913702gmail-ctx" style=3D"color:rgb(51,51,51);font-size:13.3333px;white-spa=
ce:pre-wrap"><font face=3D"monospace, monospace"><br></font></div><div clas=
s=3D"m_2782091737082835261m_5552788607508047176m_6887387999980913702gmail-c=
tx" style=3D"color:rgb(51,51,51);font-size:13.3333px;white-space:pre-wrap">=
<font face=3D"monospace, monospace">--</font></div><div class=3D"m_27820917=
37082835261m_5552788607508047176m_6887387999980913702gmail-ctx" style=3D"co=
lor:rgb(51,51,51);font-size:13.3333px;white-space:pre-wrap"><font face=3D"m=
onospace, monospace">Paul</font></div></div></div></div></div>
<pre>_______________________________________________
Keepalived-devel mailing list
<a href=3D"mailto:[email protected]" target=3D"_blank"=
>[email protected]</a>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/keepalived-devel" t=
arget=3D"_blank">https://lists.sourceforge.net/lists/listinfo/keepalived-de=
vel</a>
</pre></blockquote></div></blockquote></div>
</blockquote></div></blockquote></div>
</blockquote></div>
</blockquote></body></html>
--=-QwZXKZ65nSMpamYIwv8o--



--===============1912834236601175306==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============1912834236601175306==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel

--===============1912834236601175306==--