Re: error building 2.0.7
Quentin Armitage <[email protected]> Tue, 16 Oct 2018 14:26:24 +0100
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Organization | The Armitage family |
| Message-ID | <[email protected]> |
--===============3563647425272643427== Content-Type: multipart/alternative; boundary="=-m7popcb38sVbcTI802ob" --=-m7popcb38sVbcTI802ob Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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/37d6b3bc22d307d09ab8bd75 > 111c3645c742c792 > 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-devel --=-m7popcb38sVbcTI802ob 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>This appears prob= ably 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.</div><div><b= r></div><div>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 rem= oved.</div><div><br></div><div>It would be simple enough to rename the TIME= R_MAX used in keepalived to something else, and there are only 4 lines in k= eepalived where it is used (all in read_timer in lib/parser.c).</div><div>= <br></div><div>Could you just try moving the definition of TIMER_MAX from l= ib/parser.h to lib/parser.c and see if that works. If not, could you try ch= anging it to TIMER_MAX_UL or something like that and seeing if it resolves = your problem. </div><div><br></div><div>Please let me know what you work ou= t, and we can then see if we can push a commit to work around the problem i= n uClibc.</div><div><br></div><div>Quentin Armitage</div><div>On Tue, 2018-= 10-16 at 12:22 +0100, Paul Gildea wrote:</div><blockquote type=3D"cite" sty= le=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><d= iv 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://gi= thub.com/acassen/keepalived/commit/37d6b3bc22d307d09ab8bd75111c3645c742c792= ">https://github.com/acassen/keepalived/commit/37d6b3bc22d307d09ab8bd75111c= 3645c742c792</a><br></div><div>However the code change must be too great be= tween 2.0.5 and master because doing so causes build errors. To make the co= de 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 r= eading the changelog. 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"monospa= ce, monospace">/media/vmpart/vrrp/buildroot/output/host/usr/x86_64-unknown-= linux-uclibc/sysroot/usr/include/bits/uClibc_local_lim.h:15:3: error: #erro= r local_lim.h was incorrectly updated, use the NPTL version from glibc</fon= t></div><div><font face=3D"monospace, monospace">make[3]: *** [parser.o] Er= ror 1</font></div><div><font face=3D"monospace, monospace">make[3]: *** Wai= ting for unfinished jobs....</font></div><div><font face=3D"monospace, mono= space"> CC logger.o</font></div><div><font face= =3D"monospace, monospace">make[3]: Leaving directory `/media/vmpart/vrrp/bu= ildroot/output/build/keepalived-2.0.7/lib'</font></div><div><font face=3D"m= onospace, monospace">make[2]: *** [all] Error 2</font></div><div><font face= =3D"monospace, monospace">make[2]: Leaving directory `/media/vmpart/vrrp/bu= ildroot/output/build/keepalived-2.0.7/lib'</font></div><div><font face=3D"m= onospace, monospace">make[1]: *** [all-recursive] Error 1</font></div><div>= <font face=3D"monospace, monospace">make[1]: Leaving directory `/media/vmpa= rt/vrrp/buildroot/output/build/keepalived-2.0.7'</font></div><div><font fac= e=3D"monospace, monospace">make: *** [/media/vmpart/vrrp/buildroot/output/b= uild/keepalived-2.0.7/.stamp_built] Error 2</font></div></div><div><br></di= v><div><br></div><div>Looking at the file with that error I see:</div><div>= <br></div><div><div class=3D"gmail-add" style=3D"color:green;font-size:13.3= 333px;white-space:pre"><font face=3D"monospace, monospace">#if !defined PTH= READ_KEYS_MAX || defined TIMER_MAX || !defined SEM_VALUE_MAX</font></div><d= iv class=3D"gmail-ctx" style=3D"color:rgb(51,51,51);font-size:13.3333px;whi= te-space:pre"><font face=3D"monospace, monospace"># error local_lim.h was i= ncorrectly updated, use the NPTL version from glibc</font></div><div class= =3D"gmail-ctx" style=3D"color:rgb(51,51,51);font-size:13.3333px;white-space= :pre"><font face=3D"monospace, monospace">#endif</font></div></div><div cla= ss=3D"gmail-ctx" style=3D"color:rgb(51,51,51);font-size:13.3333px;white-spa= ce:pre"><font face=3D"monospace, monospace"><br></font></div><div class=3D"= gmail-ctx" style=3D"color:rgb(51,51,51);font-size:13.3333px;white-space:pre= "><font face=3D"monospace, monospace">Regards,</font></div><div class=3D"gm= ail-ctx" style=3D"color:rgb(51,51,51);font-size:13.3333px;white-space:pre">= <font face=3D"monospace, monospace"><br></font></div><div class=3D"gmail-ct= x" style=3D"color:rgb(51,51,51);font-size:13.3333px;white-space:pre"><font = face=3D"monospace, monospace">--</font></div><div class=3D"gmail-ctx" style= =3D"color:rgb(51,51,51);font-size:13.3333px;white-space:pre"><font face=3D"= monospace, monospace">Paul</font></div></div></div></div></div> <pre>_______________________________________________ Keepalived-devel mailing list <a href=3D"mailto:[email protected]">Keepalived-devel@= lists.sourceforge.net</a> <a href=3D"https://lists.sourceforge.net/lists/listinfo/keepalived-devel">h= ttps://lists.sourceforge.net/lists/listinfo/keepalived-devel</a> </pre></blockquote></body></html> --=-m7popcb38sVbcTI802ob-- --===============3563647425272643427== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============3563647425272643427== 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 --===============3563647425272643427==--