Hi Jeffrey, On Fri, Mar 15, 2019 at 10:22:14AM +0800, ??? wrote: > Hi, > I'm trying to compile haproxy under cygwin but get problem. > > I have try google search to resolve the probme but can't get any. > > Have anyone can let me know what's wrong ? > > Jeffrey_Chen@jeffrey_chen ~/haproxy-1.9.4 > $ make TARGET=cygwin ARCH=x86_64 CPU=generic USE_THREAD=1 > USE_REGPARM=1 USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 TRACE=1 > LDFLAGS="-Wl,--allow-multiple-definition" > LD haproxy > src/haproxy.o:haproxy.c:(.rdata$.refptr.__stop_init_STG_INIT[.refptr.__stop_init_STG_INIT]+0x0): > undefined reference to `__stop_init_STG_INIT' (...) > cygwin gcc version : 7.4.0 > > ld version : 2.29.1.20171006 > > also have try gcc version : 8.3.0 > > I have use the same environment to build 1.8.19 haven't any problem.
I see what the problem is though I don't know cygwin nor windows executables enough to be able to propose a fix. We use ELF sections to enumerate init functions for different initialisation stages in the early boot. We had to adjust the section names on OSX because the linker uses different names. But on Windows I don't even know if cygwin produces ELF-compatible binaries or emulates such sections. Someone knowing windows should possibly have a deeper look at this I'm afraid :-/ Regards, Willy

