Hi Willy,

On Wed, Jan 3, 2018 at 10:04 PM, Willy Tarreau <w...@1wt.eu> wrote:
>> To compile Haproxy 1.8 with threads, at least GCC 4.7 is needed.
>> CentOs 6 only ships GCC 4.4.7, therefor compilation fails.
>
> If these are the only failures, maybe we can try and see if we find
> equivalent builtins for older versions. I seem to remember that most
> of them have their equivalent with the __sync_* builtins on older
> compilers, but there was something odd with the compare_and_swap(),
> only allowing a few bits to be used or something like this.

Yes, I believe it's only about those atomic functions that have been
introduced in GCC4.7. If this is a rather easy thing to do with no
particular impact, sure, I agree, but ...


> I've always been all for supporting older compilers exactly for the
> reason above. Till very recently, gcc-2.95 was still reported to work ;-)

I also have to say that I consider thread support to be a
"high-performance" feature, and I would not personally consider
pairing such high-performance features with a obsolete OS like CentOs
6. I mean ... we are talking linux 2.6.32 (I heard even 2.6.32's
maintainer pulled the plug last year :) )

The reason we see this build failure is that we implicitly added
USE_THREADS=1 in the linux2628 make target. Perhaps we just need a new
make target with something more recent and move threads support to it.
However it's also true that without implicitly enabling threads in the
linux2628 target we would have never seen the amount of feedback for
thread issues that we saw, and most of the bugs would probably still
be unfixed at this point.


In any case, I would avoid complicating the codebase and/or investing
a lot of time to bring thread support to CentOS 6, I'd rather keep it
simple and disable thread support for it by default (whether via
different make targets or by other means).


cheers,
lukas

Reply via email to