undefined symbol: CRYPTO_chacha_20 when built with boringssl

Maxim Dounin mdounin at mdounin.ru
Mon Jun 24 22:19:40 UTC 2024


Hello!

On Mon, Jun 24, 2024 at 08:06:23AM +0100, Dave Kennard wrote:

> This is probably me doing something stupid, but I can't get nginx to run
> when built to use boringssl. When trying to run it (nginx -t) I get the
> error: undefined symbol: CRYPTO_chacha_20
> 
> I think it's just that it isn't loading the boringssl shared libs.
> 
> Nginx is configured as follows:
> 
> ./configure --prefix=/opt/nginx-1.27.1 \
>     --with-pcre={{ tarballs_path }}/pcre2-{{ pcre_version }} \
>     --with-pcre-jit \
>     --without-http_autoindex_module \
>     --without-http_empty_gif_module \
>     --without-http_ssi_module \
>     --with-http_ssl_module \
>     --with-http_v2_module \
>     --with-http_v3_module \
>     --with-ipv6 \
>     --with-http_gzip_static_module \
>     --with-http_realip_module \
>     --add-module=../ngx_http_geoip2_module \
>     --with-http_perl_module --with-perl_modules_path=perl/lib \
>     --with-cc-opt='-I/opt/GeoIP/include -I/opt/boringssl/include' \
>     --with-ld-opt='-Wl,-R,/opt/GeoIP/lib -L/opt/GeoIP/lib
> -L/opt/boringssl/lib'
> 
> And boringssl:
> 
> cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1
> -DCMAKE_INSTALL_PREFIX=/opt/boringssl-{{ ansible_date_time.date }}
> 
> (/opt/boringssl is symlinked to /opt/boringssl-{{ ansible_date_time.date }})
> 
> Can anyone suggest what the problem might be?

Options you use suggest that you are building with shared BorinSSL 
library installed in a non-default location.  The error you are 
seeing is likely a result of loading OpenSSL library from the 
default library path instead.

Using "-R/opt/boringssl/lib" in ld options might be the way to go, 
similarly to how you already do with the GeoIP library.

-- 
Maxim Dounin
http://mdounin.ru/



More information about the nginx mailing list