• 记录一次失败的Nginx via cygwin编译体验


    Generate make file:

    Linux:

    ./auto/configure 
        --prefix= 
        --conf-path=conf/nginx.conf 
        --pid-path=logs/nginx.pid 
        --http-log-path=logs/access.log 
        --error-log-path=logs/error.log 
        --with-pcre=lib/pcre-8.44 
        --with-zlib=lib/zlib-1.2.11 
        --with-openssl=lib/openssl-OpenSSL_1_1_1i 
        --add-module=./nginx-http-flv-module
    

    cygwin(一次不愉快的体验):

    ./auto/configure 
        --with-cc=gcc 
        --with-debug 
        --prefix= 
        --conf-path=conf/nginx.conf 
        --pid-path=logs/nginx.pid 
        --http-log-path=logs/access.log 
        --error-log-path=logs/error.log 
        --sbin-path=nginx.exe 
        --http-client-body-temp-path=temp/client_body_temp 
        --http-proxy-temp-path=temp/proxy_temp 
        --http-fastcgi-temp-path=temp/fastcgi_temp 
        --http-scgi-temp-path=temp/scgi_temp 
        --http-uwsgi-temp-path=temp/uwsgi_temp 
        --with-cc-opt=-DFD_SETSIZE=1024 
        --with-pcre=objs/lib/pcre-8.44 
        --with-zlib=objs/lib/zlib-1.2.11 
        --with-openssl=objs/lib/openssl-OpenSSL_1_1_1h 
        --with-openssl-opt=no-asm 
        --with-http_ssl_module
    

    报错:

    configure: error: Invalid C++ compiler or C++ compiler flags
    make[1]: *** [objs/Makefile:1227: objs/lib/pcre-8.44/Makefile] Error 1
    

    移除HTTP重写模块--without-http_rewrite_module, 删除pcre依赖:

    ./auto/configure 
        --with-cc=gcc 
        --with-debug 
        --prefix= 
        --conf-path=conf/nginx.conf 
        --pid-path=logs/nginx.pid 
        --http-log-path=logs/access.log 
        --error-log-path=logs/error.log 
        --sbin-path=nginx.exe 
        --http-client-body-temp-path=temp/client_body_temp 
        --http-proxy-temp-path=temp/proxy_temp 
        --http-fastcgi-temp-path=temp/fastcgi_temp 
        --http-scgi-temp-path=temp/scgi_temp 
        --http-uwsgi-temp-path=temp/uwsgi_temp 
        --with-cc-opt=-DFD_SETSIZE=1024 
        --with-zlib=objs/lib/zlib-1.2.11 
        --with-openssl=objs/lib/openssl-OpenSSL_1_1_1h 
        --with-openssl-opt=no-asm 
        --with-http_ssl_module 
        --without-http_rewrite_module
    

    报错:

    找不到crypt()函数
    

    添加模块

        --add-module=./nginx-http-flv-module
        --add-dynamic-module=./nginx-http-flv-module
    

    See: http://nginx.org/en/docs/howto_build_on_win32.html

  • 相关阅读:
    ORACLE查询删除重复记录三种方法
    是否可以从一个static方法内部发出对非static方法的调用
    协程(微线程)
    多线程、多进程
    python3.6.5修改print的颜色
    Python之时间和日期模块
    Python之字符(2)
    Python之字符
    python之列表
    Python中的文件操作
  • 原文地址:https://www.cnblogs.com/develon/p/14247811.html
Copyright © 2020-2023  润新知