We always clean before building. The shell script I use is currently: MAKE=/usr/sfw/bin/gmake$MAKE clean$MAKE USE_STATIC_PCRE=1 ARCH=native TARGET=solaris PCREDIR=../pcre USE_THREAD= USE_PTHREAD_PSHARED=yes And after applying the patch (and USE_PTHREAD_PSHARED=yes as you can see), that builds successfully :). Dropping 'USE_THREAD=' causes a fast failure complaining about '__sync_fetch_and_add' and '__sync_sub_and_fetch'. Dropping 'USE_PTHREAD_PSHARED=yes' results in an eventual failure: gcc -Iinclude -Iebtree -Wall -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-unused-label -fomit-frame-pointer -DFD_SETSIZE=65536 -D_REENTRANT -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -DTPROXY -DCONFIG_HAP_CRYPT -DNEED_CRYPT_H -DUSE_GETADDRINFO -DENABLE_POLL -DUSE_PCRE -I../pcre/include -DCONFIG_HAPROXY_VERSION=\"1.8.12-8a200c7\" -DCONFIG_HAPROXY_DATE=\"2018/06/27\" -c -o src/cache.o src/cache.cIn file included from src/cache.c:31:include/proto/shctx.h: In function `cmpxchg':include/proto/shctx.h:140: error: invalid type argument of `unary *'include/proto/shctx.h:140: error: invalid type argument of `unary *'include/proto/shctx.h:140: warning: left-hand operand of comma expression has no effectgmake: *** [src/cache.o] Error 1 Thanks for the help :). Anything further that I should test, or should I just wait for some variety of this patch to land in 1.8.13? Regards Thrawn On Wednesday, 18 July 2018, 1:33:12 am AEST, Olivier Houchard <[email protected]> wrote: Hi again,
On Tue, Jul 17, 2018 at 01:55:33PM +0200, Olivier Houchard wrote: > Hi Lukas, > > On Tue, Jul 17, 2018 at 01:08:39PM +0200, Lukas Tribus wrote: > > On Tue, 17 Jul 2018 at 01:09, Thrawn <[email protected]> > > wrote: > > > > > > Ah, indeed, the GCC version provided on our server is 3.4.3. But the > > > readme on https://github.com/haproxy/haproxy says "GCC between 2.95 and > > > 4.8". Can the build be changed to continue supporting older GCC, or do > > > the docs need an update? > > > > Like I said earlier, "make clean" before compiling with different > > parameters, like USE_THREAD= > > > > Haproxy 1.8 is supposed to build fine with gcc 3 when disabling > > threading, but if you just compiled with threads enabled, you do need > > to "make clean": > > > > > > > I think your gcc is just too old. Those appeared around gcc 4.1 or so. > > > > With USE_THREAD= it is supposed to build fine. While threading will > > not work with gcc 3, we did not drop support for gcc3 altogether. > > > > > > Unfortunately it is not true. __sync_* was used in include/proto/shctx.h. > The attached patch uses the haproxy macroes instead, and so should get it > to compile again with older gcc. Thrawn, can you please test it ? > After talking with Will a bit, we realized this patch might not work if using a cache shared across multiple process. Can you just add USE_PTHREAD_PSHARED=yes on your command line, it should do the trick ? Thanks ! Olivier

