On Sun, Jun 24, 2018 at 11:45:35AM +0200, William Lallemand wrote:
On Sun, Jun 24, 2018 at 09:35:11AM +0000, Zero King wrote:
On Sun, Jun 24, 2018 at 09:42:54AM +0200, William Lallemand wrote:
>On Sun, Jun 24, 2018 at 02:30:57AM +0000, Zero King wrote:
>> Hi,
>>
>> I tried to update haproxy to 1.8.10 in MacPorts, but it fails to build
>> from source with the following error (without USE_THREAD):
>>
>> /usr/bin/clang -arch x86_64 -Iinclude -Iebtree -Wall  -O2 -g -fno-strict-aliasing 
-Wdeclaration-after-statement -fwrapv -fno-strict-overflow  -Wno-address-of-packed-member 
-Wno-null-dereference -Wno-unused-label       -DTPROXY -DCONFIG_HAP_CRYPT -DUSE_ZLIB  -DENABLE_POLL 
-DENABLE_KQUEUE -DCONFIG_REGPARM=3 -DUSE_OPENSSL  -DUSE_PCRE -I/opt/local/include  
-DCONFIG_HAPROXY_VERSION=\"1.8.10-ec17d7a\" -DCONFIG_HAPROXY_DATE=\"2018/06/22\" -c 
-o src/log.o src/log.c
>> src/haproxy.c:2475:16: error: cannot take the address of an rvalue of type 
'unsigned long'
>>         HA_ATOMIC_AND(&all_threads_mask, ~tid_bit);
>>                       ^~~~~~~~~~~~~~~~~
>> include/common/hathreads.h:41:42: note: expanded from macro 'HA_ATOMIC_AND'
>> #define HA_ATOMIC_AND(val, flags)    ({*(val) &= (flags);})
>>                                          ^~~
>> 1 error generated.
>>
>
>
>Thanks for your report, there a patch that should solve this issue.

Thanks for the patch, I applied it in OS X < 10.7 [1], which doesn't
support USE_THREAD, and build passed.

[1]: 
https://github.com/macports/macports-ports/commit/a8f179575f70f0d21dfbaef7a9003cbcb43b59bb


I don't own an OS X machine so that's difficult for me to test, but what is the
reason USE_THREAD is not supported in < 10.7?

Lack of thread-local storage support, see 
https://github.com/macports/macports-ports/commit/35ea8581e16eb3cc92f03ec6bc3f21959d0a44e4#diff-ded0796a87dca23e1462f6820eaaa86dR245.
I don't have an old system myself so I went for the easy way and
disabled threads.

/usr/bin/gcc-4.2 -arch x86_64 -Iinclude -Iebtree -Wall  -O2 -g -fno-strict-aliasing 
-Wdeclaration-after-statement -fwrapv -fno-strict-overflow    -Wno-unused-label       -DTPROXY 
-DCONFIG_HAP_CRYPT -DUSE_ZLIB  -DENABLE_POLL -DENABLE_KQUEUE -DCONFIG_REGPARM=3 -DUSE_THREAD 
-DUSE_OPENSSL  -DUSE_PCRE -I/opt/local/include  
-DCONFIG_HAPROXY_VERSION=\"1.8.10-ec17d7a\" 
-DCONFIG_HAPROXY_DATE=\"2018/06/22\" -c -o ebtree/ebmbtree.o ebtree/ebmbtree.c
In file included from include/common/memory.h:32,
                from include/common/chunk.h:29,
                from include/common/standard.h:36,
                from include/common/ticks.h:56,
                from src/ev_kqueue.c:22:
include/common/hathreads.h:28: error: thread-local storage not supported for 
this target
include/common/hathreads.h:29: error: thread-local storage not supported for 
this target
In file included from include/common/memory.h:32,
                from include/common/chunk.h:29,
                from include/common/standard.h:36,
                from include/common/ticks.h:56,
                from src/ev_poll.c:22:
include/common/hathreads.h:28: error: thread-local storage not supported for 
this target
include/common/hathreads.h:29: error: thread-local storage not supported for 
this target
In file included from include/common/ticks.h:56,
                from src/ev_kqueue.c:22:
include/common/standard.h:96: error: thread-local storage not supported for 
this target
include/common/standard.h:111: error: thread-local storage not supported for 
this target
In file included from include/common/ticks.h:56,
                from src/ev_poll.c:22:
include/common/standard.h:96: error: thread-local storage not supported for 
this target
include/common/standard.h:111: error: thread-local storage not supported for 
this target

--
Zero

Reply via email to