Recently, many program software, such as nginx, MySQL, PHP, and MySQL-proxy, have been compiled and installed under cygwin. Some problems encountered during haproxy compilation today.
I downloaded haproxy 1.3.14.4. Compile command:
Make target = generic use_static_pcre = 1
The result throws these error messages.
$ Make target = generic use_static_pcre = 1
Gcc-iinclude-wall-O2-g-dtproxy-denable_poll-duse_pcre-I/usr/include-dconfig_haproxy_version =/"1.3.14.4 /"
-Dconfig_haproxy_date =/"2008/03/20/"-c-o src/log. O src/log. c
Src/log. C: In function 'tcp _ sess_log ':
Src/log. C: 321: Error: 'et6 _ addrstrlen' undeclared (first use in this function)
Src/log. C: 321: Error: (each undeclared identifier is reported only once
Src/log. C: 321: Error: for each function it appears in .)
Src/log. C: 334: Error: 'af _ inet6 'undeclared (first use in this function)
Src/log. C: 335: Error: dereferencing pointer to incomplete type
Src/log. C: 363: Error: dereferencing pointer to incomplete type
Src/log. C: 363: Error: dereferencing pointer to incomplete type
Src/log. C: 363: Error: dereferencing pointer to incomplete type
Src/log. C: 363: Error: dereferencing pointer to incomplete type
Src/log. C: 321: Warning: unused variable 'pn'
Make: *** [src/log. O] Error 1
The reason should be that cygwin does not support IPv6.
Search for it on Google, find a cygwin IPv6 patch, download it, decompress it to the cygwin installation directory, and overwrite some files.
Compile again, and the prompt is:
$ Make target = generic use_static_pcre = 1
Gcc-iinclude-wall-O2-g-dtproxy-denable_poll-duse_pcre-I/usr/include-dconfig_haproxy_version =/"1.3.14.4 /"
-Dconfig_haproxy_date =/"2008/03/20 /"/
-Dbuild_target = '"generic "'/
-Dbuild_cpu = '"generic "'/
-Dbuild_cc = '"GCC "'/
-Dbuild_cflags = '"-O2-G "'/
-Dbuild_options = '"use_static_pcre = 1 "'/
-C-o src/haproxy. O src/haproxy. c
In file encoded ded from/usr/include/sys/socket. h: 15,
From src/haproxy. C: 44:
/Usr/include/cygwin/socket. h: 50: 47: cygwin/uio. h: no such file or directory
Make: *** [src/haproxy. O] Error 1
Can't find the UIO. h header file? It's strange that I remember this file was in cygwin. I found this file in/usr/include/sys, copied it to the/usr/include/cygwin directory, and then compiled it.
By the way, I think cygwin is really powerful. In addition, the cross-platform capability of C language writing is really strong.