#2065 closed defect (invalid)

Build error on Centos 7

Reported by: ikoctya@… Owned by:
Priority: critical Milestone:
Component: other Version:
Keywords: nginx-quic Cc:
uname -a: Linux yellow.garant.tv 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx-quic-dd8e50e11bfc

Description

I run make and hav error:
"
....
objs/addon/src/ngx_message_handler.o \
objs/addon/src/ngx_pagespeed.o \
objs/addon/src/ngx_rewrite_driver_factory.o \
objs/addon/src/ngx_rewrite_options.o \
objs/addon/src/ngx_server_context.o \
objs/addon/src/ngx_url_async_fetcher.o \
objs/ngx_modules.o \
-L../boringssl/build/ssl -L../boringssl/build/crypto -ldl -lpthread -lpthread -lcrypt -lm /usr/src/incubator-pagespeed-ngx/psol/lib/Release/linux/x64/pagespeed_automatic.a -lstdc++ -lrt -pthread -lm -luuid -lpcre /usr/src/openssl-1.1.1h/.openssl/lib/libssl.a /usr/src/openssl-1.1.1h/.openssl/lib/libcrypto.a -ldl -lpthread -lz -lGeoIP -lprofiler \
-Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc \
-Wl,-E
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_info_callback':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:1085: undefined reference to `BIO_set_write_buffer_size'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_new_null':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_new_null'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_pop_free':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_push':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_push'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_pop_free':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_load_certificate_key':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:803: undefined reference to `BIO_reset'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_early_data':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:1455: undefined reference to `SSL_CTX_set_early_data_enabled'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_client_session_cache':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:1480: undefined reference to `SSL_CTX_set_session_cache_mode'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_init':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:186: undefined reference to `SSL_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:193: undefined reference to `SSL_CTX_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:201: undefined reference to `SSL_CTX_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:209: undefined reference to `SSL_CTX_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:217: undefined reference to `SSL_CTX_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:224: undefined reference to `SSL_CTX_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:232: undefined reference to `X509_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:239: undefined reference to `X509_get_ex_new_index'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:247: undefined reference to `X509_get_ex_new_index'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_create':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:261: undefined reference to `SSLv23_method'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:365: undefined reference to `SSL_CTX_set_min_proto_version'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:366: undefined reference to `SSL_CTX_set_max_proto_version'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:382: undefined reference to `SSL_CTX_set_mode'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:386: undefined reference to `SSL_CTX_set_mode'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:389: undefined reference to `SSL_CTX_set_read_ahead'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_pop_free':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_certificate':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:486: undefined reference to `SSL_CTX_set0_chain'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_pop_free':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_connection_certificate':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:579: undefined reference to `SSL_set0_chain'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_pop_free':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:253: undefined reference to `sk_pop_free_ex'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_dhparam':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:1353: undefined reference to `SSL_CTX_set_tmp_dh'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_ecdh_curve':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:1399: undefined reference to `SSL_CTX_set1_curves_list'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_session_id_context':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3258: undefined reference to `EVP_MD_CTX_create'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_NAME_num':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:154: undefined reference to `sk_num'
objs/src/event/ngx_event_openssl.o: In function `sk_X509_NAME_value':
/usr/src/nginx-quic-dd8e50e11bfc/../boringssl/include/openssl/x509.h:154: undefined reference to `sk_value'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_session_id_context':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3338: undefined reference to `EVP_MD_CTX_destroy'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3350: undefined reference to `EVP_MD_CTX_destroy'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_session_cache':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3179: undefined reference to `SSL_CTX_set_session_cache_mode'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3196: undefined reference to `SSL_CTX_set_session_cache_mode'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3201: undefined reference to `SSL_CTX_sess_set_cache_size'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3212: undefined reference to `SSL_CTX_set_session_cache_mode'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3217: undefined reference to `SSL_CTX_sess_set_cache_size'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_session_ticket_keys':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:3948: undefined reference to `SSL_CTX_set_tlsext_ticket_key_cb'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_early_data':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4530: undefined reference to `SSL_in_early_data'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_raw_certificate':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4605: undefined reference to `BIO_pending'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_subject_dn':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4733: undefined reference to `BIO_pending'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_issuer_dn':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4785: undefined reference to `BIO_pending'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_subject_dn_legacy':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4836: undefined reference to `OPENSSL_free'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4843: undefined reference to `OPENSSL_free'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_issuer_dn_legacy':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4879: undefined reference to `OPENSSL_free'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4886: undefined reference to `OPENSSL_free'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_serial_number':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:4914: undefined reference to `BIO_pending'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_client_v_start':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:5030: undefined reference to `BIO_pending'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_client_v_end':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:5074: undefined reference to `BIO_pending'
objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_parse_time':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_openssl.c:5166: undefined reference to `BIO_get_mem_data'
objs/src/event/ngx_event_quic.o: In function `ngx_quic_add_handshake_data':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic.c:504: undefined reference to `SSL_get_peer_quic_transport_params'
objs/src/event/ngx_event_quic.o: In function `ngx_quic_crypto_input':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic.c:3295: undefined reference to `SSL_quic_read_level'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic.c:3295: undefined reference to `SSL_provide_quic_data'
objs/src/event/ngx_event_quic.o: In function `ngx_quic_close_quic':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic.c:1466: undefined reference to `SSL_quic_read_level'
objs/src/event/ngx_event_quic.o: In function `ngx_quic_init_connection':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic.c:1241: undefined reference to `SSL_set_quic_method'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic.c:1284: undefined reference to `SSL_set_quic_transport_params'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic.c:1291: undefined reference to `SSL_set_quic_early_data_context'
objs/src/event/ngx_event_quic_protection.o: In function `ngx_hkdf_expand':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:293: undefined reference to `HKDF_expand'
objs/src/event/ngx_event_quic_protection.o: In function `ngx_quic_ciphers':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:89: undefined reference to `EVP_aead_aes_128_gcm'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:100: undefined reference to `EVP_aead_aes_256_gcm'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:111: undefined reference to `EVP_aead_chacha20_poly1305'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:116: undefined reference to `EVP_aead_chacha20_poly1305'
objs/src/event/ngx_event_quic_protection.o: In function `ngx_quic_tls_seal':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:490: undefined reference to `EVP_AEAD_CTX_new'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:497: undefined reference to `EVP_AEAD_CTX_seal'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:501: undefined reference to `EVP_AEAD_CTX_free'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:506: undefined reference to `EVP_AEAD_CTX_free'
objs/src/event/ngx_event_quic_protection.o: In function `ngx_quic_tls_hp':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:591: undefined reference to `EVP_aead_chacha20_poly1305'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:592: undefined reference to `CRYPTO_chacha_20'
objs/src/event/ngx_event_quic_protection.o: In function `ngx_hkdf_extract':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:340: undefined reference to `HKDF_extract'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:340: undefined reference to `HKDF_extract'
objs/src/event/ngx_event_quic_protection.o: In function `ngx_hkdf_expand':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:293: undefined reference to `HKDF_expand'
objs/src/event/ngx_event_quic_protection.o: In function `ngx_quic_tls_open':
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:391: undefined reference to `EVP_AEAD_CTX_new'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:398: undefined reference to `EVP_AEAD_CTX_open'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:402: undefined reference to `EVP_AEAD_CTX_free'
/usr/src/nginx-quic-dd8e50e11bfc/src/event/ngx_event_quic_protection.c:407: undefined reference to `EVP_AEAD_CTX_free'
objs/src/http/ngx_http_upstream.o: In function `ngx_http_upstream_ssl_name':
/usr/src/nginx-quic-dd8e50e11bfc/src/http/ngx_http_upstream.c:1906: undefined reference to `SSL_set_tlsext_host_name'
objs/src/http/modules/ngx_http_ssl_module.o: In function `ngx_http_ssl_merge_srv_conf':
/usr/src/nginx-quic-dd8e50e11bfc/src/http/modules/ngx_http_ssl_module.c:767: undefined reference to `SSL_CTX_set_tlsext_servername_callback'
objs/src/stream/ngx_stream_proxy_module.o: In function `ngx_stream_proxy_ssl_name':
/usr/src/nginx-quic-dd8e50e11bfc/src/stream/ngx_stream_proxy_module.c:1208: undefined reference to `SSL_set_tlsext_host_name'
objs/src/stream/ngx_stream_ssl_module.o: In function `ngx_stream_ssl_merge_conf':
/usr/src/nginx-quic-dd8e50e11bfc/src/stream/ngx_stream_ssl_module.c:701: undefined reference to `SSL_CTX_set_tlsext_servername_callback'
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
make[1]: * [objs/nginx] Ошибка 1
make[1]: Выход из каталога `/usr/src/nginx-quic-dd8e50e11bfc'
make:
* [build] Ошибка 2
"

Change History (2)

comment:1 by ikoctya@…, 11 months ago

my configure options:

"./auto/configure --prefix=/opt/nginx --with-file-aio --with-http_ssl_module --with-openssl=/usr/src/openssl-1.1.1h --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_auth_request_module --with-http_random_index_module --with-http_perl_module --with-mail --with-stream --with-stream_ssl_module --with-google_perftools_module --without-http_uwsgi_module --without-http_scgi_module --with-threads --with-file-aio --with-http_v2_module --with-http_realip_module --with-http_geoip_module --with-http_sub_module --with-http_mp4_module --with-google_perftools_module --http-client-body-temp-path=/var/nginx/client_body_temp --http-proxy-temp-path=/var/nginx/proxy_temp --http-fastcgi-temp-path=/var/nginx/fastcgi_temp --add-module=/usr/src/ngx_brotli --add-module=/usr/src/ngx_webp --add-module=/usr/src/incubator-pagespeed-ngx --with-cc-opt="-I../boringssl/include" --with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto" --with-http_v3_module --with-http_quic_module --with-stream_quic_module --with-openssl-opt=enable-tls1_3"

comment:2 by Maxim Dounin, 11 months ago

Resolution: invalid
Status: newclosed

From the --with-openssl=/usr/src/openssl-1.1.1 and --with-cc-opt="-I../boringssl/include" --with-ld-opt="-L../boringssl/build/ssl -L../boringssl/build/crypto" in your configure string it looks like you are trying to build nginx with both OpenSSL and BoringSSL. This is not going to work.

Note: See TracTickets for help on using tickets.