On 2/13/19 7:30 PM, Patrick Hemmer wrote:
On 2019/2/13 10:29, Olivier Houchard wrote:
Hi Patrick,
On Wed, Feb 13, 2019 at 10:01:01AM -0500, Patrick Hemmer wrote:
On 2019/2/13 09:40, Aleksandar Lazic wrote:
Am 13.02.2019 um 14:45 schrieb Patrick Hemmer:
Trying to compile haproxy on my local machine for testing purposes and am
running into the following:
Which compiler do you use?
# gcc -v
Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
# make TARGET=osx
src/proto_http.c:293:1: error: argument to 'section' attribute is not
valid for this target: mach-o section specifier requires a segment and section
separated by a comma
DECLARE_POOL(pool_head_http_txn, "http_txn", sizeof(struct http_txn));
^
include/common/memory.h:128:2: note: expanded from macro 'DECLARE_POOL'
REGISTER_POOL(&ptr, name, size)
^
include/common/memory.h:123:2: note: expanded from macro
'REGISTER_POOL'
INITCALL3(STG_POOL, create_pool_callback, (ptr),
(name),
(size))
^
include/common/initcall.h:102:2: note: expanded from macro 'INITCALL3'
_DECLARE_INITCALL(stage, __LINE__, function, arg1,
arg2,
arg3)
^
include/common/initcall.h:78:2: note: expanded from macro
'_DECLARE_INITCALL'
__DECLARE_INITCALL(__VA_ARGS__)
^
include/common/initcall.h:65:42: note: expanded from macro
'__DECLARE_INITCALL'
__attribute__((__used__,__section__("init_"#stg))) = \
Issue occurs on master, and the 1.9 branch
-Patrick
Does the (totally untested, because I have no Mac to test) patch works for
you ?
Unfortunately not. Just introduces a lot of new errors:
In file included from src/ev_poll.c:22:
In file included from include/common/hathreads.h:26:
include/common/initcall.h:134:22: error: expected ')'
DECLARE_INIT_SECTION(STG_PREPARE);
^
include/common/initcall.h:134:1: note: to match this '('
DECLARE_INIT_SECTION(STG_PREPARE);
^
include/common/initcall.h:124:82: note: expanded from macro
'DECLARE_INIT_SECTION'
extern __attribute__((__weak__)) const struct
initcall *__start_init_##stg __asm("section$start$__DATA$" stg); \
^
Try to use -E in place of -c option of your compiler to stop after
having preprocessed the code. Then have a look to how the code of
src/ev_poll.c was preprocessed.
This should help.
Fred.