Compile haproxy in cygwin

Source: Internet
Author: User
Tags haproxy

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.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.