各位好,
目前我在CentOS 8中尝试编译了最新版的openresty-1.17.8.1rc1及openresty-1.15.8.3版本,均会在 gmake 阶段出现错误,编译参数及错误信息如下:
系统是 CentOS Linux release 8.1.1911 (Core) ,已经升级到最新版本
-------------
编译openresty-1.15.8.3
编译参数./configure --with-pcre-jit --with-http_ssl_module --with-http_v2_module --with-http_flv_module --with-http_realip_module --with-http_gzip_static_module --with-http_perl_module --w
ith-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-zlib=../zlib-1.2.11 --with-pcre=../pcre-8.44 --with-openssl=../openssl-1.1.1d
/usr/bin/ld: /root/openresty-1.15.8.3-1.1.1d/openresty-1.15.8.3/../zlib-1.2.11/libz.a(trees.o): relocation R_X86_64_32S against hidden symbol `_length_code' can not be used when making a PIE object
/usr/bin/ld: /root/openresty-1.15.8.3-1.1.1d/openresty-1.15.8.3/../zlib-1.2.11/libz.a(zutil.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
gmake[2]: *** [objs/Makefile:495: objs/nginx] Error 1
gmake[2]: Leaving directory '/root/openresty-1.15.8.3-1.1.1d/openresty-1.15.8.3/build/nginx-1.15.8'
gmake[1]: *** [Makefile:8: build] Error 2
gmake[1]: Leaving directory '/root/openresty-1.15.8.3-1.1.1d/openresty-1.15.8.3/build/nginx-1.15.8'
gmake: *** [Makefile:9: all] Error 2
-------------------
编译 openresty-1.17.8.1rc1 with openssl-1.1.1e
编译参数 ./configure --with-pcre-jit --with-http_ssl_module --with-http_v2_module --with-http_flv_module --with-http_realip_module --with-http_gzip_static_module --with-http_perl_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-zlib=../zlib-1.2.11 --with-pcre=../pcre-8.44 --with-openssl=../openssl-1.1.1e
install libcrypto.pc -> /root/openresty-1.17.8.1rc1-1.1.1e/openresty-1.17.8.1rc1/../openssl-1.1.1e/.openssl/lib/pkgconfig/libcrypto.pc
install libssl.pc -> /root/openresty-1.17.8.1rc1-1.1.1e/openresty-1.17.8.1rc1/../openssl-1.1.1e/.openssl/lib/pkgconfig/libssl.pc
install openssl.pc -> /root/openresty-1.17.8.1rc1-1.1.1e/openresty-1.17.8.1rc1/../openssl-1.1.1e/.openssl/lib/pkgconfig/openssl.pc
gmake[3]: Leaving directory '/root/openresty-1.17.8.1rc1-1.1.1e/openssl-1.1.1e'
gmake[2]: Leaving directory '/root/openresty-1.17.8.1rc1-1.1.1e/openresty-1.17.8.1rc1/build/nginx-1.17.8'
gmake[1]: *** [Makefile:8: build] Error 2
gmake[1]: Leaving directory '/root/openresty-1.17.8.1rc1-1.1.1e/openresty-1.17.8.1rc1/build/nginx-1.17.8'
gmake: *** [Makefile:9: all] Error 2
-------------------
编译 openresty-1.17.8.1rc1 使用系统openssl
编译参数 ./configure --with-pcre-jit --with-http_ssl_module --with-http_v2_module --with-http_flv_module --with-http_realip_module --with-http_gzip_static_module --with-http_perl_module --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module
gmake[2]: *** No rule to make target 'src/http/modules/perl/nginx.pm', needed by 'objs/src/http/modules/perl/Makefile'. Stop.
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/root/openresty-1.17.8.1rc1-1.1.1e/openresty-1.17.8.1rc1/build/nginx-1.17.8'
gmake[1]: *** [Makefile:8: build] Error 2
gmake[1]: Leaving directory '/root/openresty-1.17.8.1rc1-1.1.1e/openresty-1.17.8.1rc1/build/nginx-1.17.8'
gmake: *** [Makefile:9: all] Error 2
有哪位可以帮忙看看是哪里的问题?
不知道是不是 gmake[2]: *** No rule to make target 'src/http/modules/perl/nginx.pm', needed by 'objs/src/http/modules/perl/Makefile'. Stop. 这个问题
如何解决呢?
谢谢