编译 nginx-ct 总是失败怎么破 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
sky170
V2EX    NGINX

编译 nginx-ct 总是失败怎么破

  •  
  •   sky170 2016-01-23 19:43:43 +08:00 4571 次点击
    这是一个创建于 3623 天前的主题,其中的信息可能已经有所发展或是发生改变。
    make[1]: *** [objs/addon/nginx-ct-master/ngx_http_ssl_ct_module.o] Error 1

    每次都是跪在这个模块上= =
    31 条回复    2016-01-24 18:30:26 +08:00
    shyling
        1
    shyling  
       2016-01-23 20:15:29 +08:00 via iPad
    没遇到过这个错误哎。。。检查一下 openssl 的配置吧
    kn007
        2
    kn007  
       2016-01-23 20:16:43 +08:00
    看 config.log 的具体错误原因
    mafuyu
        3
    mafuyu  
       2016-01-23 20:17:45 +08:00
    今天刚刚编译完成 w 。你 openssl 版本没错吗?...他要求 1.0.2 开始...(因为删掉了前面失败的 log...没办法确定是不是这个原因...)嗯 不知道为什么用 1.1.0 的时候就编译失败。
    songjiaxin2008
        4
    songjiaxin2008  
       2016-01-23 20:25:55 +08:00
    nginx version: nginx/1.9.9
    built by gcc 4.9.2 (Debian 4.9.2-10)
    built with OpenSSL 1.0.2e 3 Dec 2015
    TLS SNI support enabled
    configure arguments: --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --with-ipv6 --with-http_gzip_static_module --with-http_realip_module --with-http_flv_module --with-openssl=../openssl --add-module=../nginx-ct

    刚编译完 应该是可以的呀
    sky170
        5
    sky170  
    OP
       2016-01-23 20:50:18 +08:00
    @mafuyu 升到 openssl1.0.2e 和 1.1.0 也不行
    sky170
        6
    sky170  
    OP
       2016-01-23 20:51:44 +08:00
    @songjiaxin2008 你这个成功,我的不行,你有没有更新 gcc 版本和依赖库
    chromee
        7
    chromee  
       2016-01-23 20:57:46 +08:00
    nginx version: nginx/1.9.9
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC)
    built with OpenSSL 1.0.2-chacha (1.0.2f-dev)
    TLS SNI support enabled
    configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_gzip_static_module --with-ipv6 --with-http_sub_module --with-openssl=/root/openssl-1.0.2-chacha --add-module=/root/lnmp1.2-full/ngx_pagespeed-release-1.9.32.4-beta --add-module=/root/lnmp1.2-full/src/ngx_http_google_filter_module --add-module=/root/lnmp1.2-full/src/ngx_http_substitutions_filter_module --add-module=/root/nginx-ct-master
    我是 conoha 的 centos 6 编译的还是很成功的
    sky170
        8
    sky170  
    OP
       2016-01-23 20:59:38 +08:00
    @shyling openssl 是 1.0.1d ,但是之前 1.0.2 和 1.1.0 都编译失败了= =
    sky170
        9
    sky170  
    OP
       2016-01-23 21:00:11 +08:00
    @chromee 都是 1.9.9 ,难道是 nginx 版本的问题?
    sky170
        10
    sky170  
    OP
       2016-01-23 21:21:13 +08:00
    cc1: all warnings being treated as errors
    make[1]: *** [objs/addon/nginx-ct-master/ngx_http_ssl_ct_module.o] Error 1
    make[1]: Leaving directory `/root/nginx-1.9.5'
    make: *** [build] Error 2


    = = 升级了 openssl 再在还是
    songjiaxin2008
        11
    songjiaxin2008  
       2016-01-23 21:24:42 +08:00
    @sky170 看看你的 GCC 版本?
    kn007
        12
    kn007  
       2016-01-23 21:26:43 +08:00
    @sky170 上 config.log 吧
    @songjiaxin2008 有道理,不过 centos6 的 gcc 就够老了, 4.4.7 也可以编译。
    kn007
        13
    kn007  
       2016-01-23 21:27:12 +08:00
    @sky170 顺带输出 openssl version 来看看
    kn007
        14
    kn007  
       2016-01-23 21:29:36 +08:00
    @sky170 还有你的 configure 参数
    qgy18
        15
    qgy18  
       2016-01-23 21:32:32 +08:00
    @sky170 禁用 warning 试试?死马当作活马医。。。
    export CFLAGS="-Wno-error"
    sky170
        16
    sky170  
    OP
       2016-01-23 22:19:23 +08:00
    @kn007 OpenSSL 1.0.2e 3 Dec 2015
    built on: reproducible build, date unspecified
    platform: linux-x86_64
    options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
    compiler: gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
    OPENSSLDIR: "/usr/local/ssl"
    sky170
        17
    sky170  
    OP
       2016-01-23 22:20:09 +08:00
    @kn007 ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_ssl_module --with-http_gzip_static_module --with-threads --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-openssl=../libressl-2.2.1 --with-ld-opt=-lrt --with-http_v2_module --add-module=../nginx-ct-master
    sky170
        18
    sky170  
    OP
       2016-01-23 22:21:18 +08:00
    @songjiaxin2008 gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)
    kn007
        19
    kn007  
       2016-01-23 22:21:34 +08:00
    @sky170 。。。你 nginx 明明编译的是 libressl 。。。。。你要不要这么逗。。。。

    nginx-ct:
    The following versions of OpenSSL are supported:

    OpenSSL 1.0.2 or above.
    BoringSSL 4fac72e or above.
    kn007
        20
    kn007  
       2016-01-23 22:23:28 +08:00
    @sky170 LibreSSL is not supported as it doesn't provide either of the functions used to add the signed_certificate_timestamp extension to the response (SSL_CTX_add_server_custom_ext and SSL_CTX_set_signed_cert_timestamp_list).
    sky170
        21
    sky170  
    OP
       2016-01-23 22:36:30 +08:00
    @kn007 额确实逗了,本想着一起编译完事的= =
    just1
        22
    just1  
       2016-01-23 22:39:08 +08:00 via Android
    yum install openssl-devel
    just1
        23
    just1  
       2016-01-23 22:39:54 +08:00 via Android
    @just1 没看到 ubuntu 。
    branchzero
        24
    branchzero  
       2016-01-24 00:50:49 +08:00
    之前自己编译的时候也碰到类似的问题, yum install openssl-devel 无用的说,源里的版本太旧了,要去官方自己下包编译。重要的几步找了下记录还在,供参考。
    402 wget http://www.openssl.org/source/openssl-1.0.2e.tar.gz
    403 ./config --prefix=/usr --openssldir=/usr/local/openssl shared
    404 tar zxf openssl-1.0.2e.tar.gz
    405 cd openssl-1.0.2e
    406 ./config --prefix=/usr --openssldir=/usr/local/openssl shared
    407 make
    408 make test
    409 make install
    410 cd ..
    411 cd nginx-1.9.9
    412 ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-threads --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-http_v2_module --add-module=../nginx-ct-master --with-openssl=/root/openssl-1.0.2e --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic'
    413 make
    414 make install
    branchzero
        25
    branchzero  
       2016-01-24 00:57:41 +08:00
    补充一句,问题关键应该是 nginx-ct 支持的 openssl 版本问题,记得之前自己找了很久解法,看到 GitHub 的 issue 上作者的回答有写最低支持的 openssl 版本,于是找了最新的 openssl 编译了下解决了。
    hiroya
        26
    hiroya  
       2016-01-24 01:13:13 +08:00 via iPad
    最新的 openssl1.0.2e 很是无语,编译好后找到的目录 nginx 根本不认……
    sky170
        27
    sky170  
    OP
       2016-01-24 01:38:14 +08:00
    @hiroya 我更新了 openssl 好像不会= =,也是 1.0.2e 版本
    sky170
        28
    sky170  
    OP
       2016-01-24 01:39:12 +08:00
    @branchzero 我现在 openssl 是 1.0.2e ,然后 nginx 编译了 libressl ,但是 libressl 又不和 nginx-ct 兼容,所以失败了= =
    shyling
        29
    shyling  
       2016-01-24 08:52:58 +08:00 via iPad
    @hiroya 1.0.2e 很正常。 1.1.0 还用不了
    hiroya
        30
    hiroya  
       2016-01-24 16:15:18 +08:00 via iPad
    @shyling arch 和 centos 不能相提并论…
    shyling
        31
    shyling  
       2016-01-24 18:30:26 +08:00 via Android
    @hiroya centos,arch 都试过了啊
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2991 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 46ms UTC 12:10 PVG 20:10 LAX 04:10 JFK 07:10
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86