<div dir="ltr"><span style="color:rgb(0,0,0);font-family:Arial;font-size:medium">Hello,</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><span style="color:rgb(0,0,0);font-family:Arial;font-size:medium">I encountered the following error when using boringssl to build Nginx:</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><font face="arial, sans-serif" size="1"><span style="color:rgb(0,0,0)">checking for OpenSSL library ... not found</span><br style="clear:both;color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">checking for OpenSSL library in /usr/local/ ... not found</span><br style="clear:both;color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">checking for OpenSSL library in /usr/pkg/ ... not found</span><br style="clear:both;color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">checking for OpenSSL library in /opt/local/ ... not found</span><br style="clear:both;color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">./auto/configure: error: SSL modules require the OpenSSL library.</span><br style="clear:both;color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">You can either do not enable the modules, or install the OpenSSL library</span><br style="clear:both;color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">into the system, or build the OpenSSL library statically from the source</span><br style="clear:both;color:rgb(0,0,0)"><span style="color:rgb(0,0,0)">with nginx by using --with-openssl=<path> option.</span></font><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><span style="color:rgb(0,0,0);font-family:Arial;font-size:medium">At first I thought it was caused by openssl not existing, but when I ran openssl version -a, everything was normal:</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><font size="1"><span style="color:rgb(0,0,0);font-family:Arial">root@iZ2hmeokcpbj42Z ~/nginx # openssl version -a</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">OpenSSL 3.0.11 19 Sep 2023 (Library: OpenSSL 3.0.11 19 Sep 2023)</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">built on: Mon Oct 23 17:52:22 2023 UTC</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">platform: debian-amd64</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">options: bn(64,64)</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -fzero-call-used-regs=used-gpr -DOPENSSL_TLS_SECURITY_LEVEL=2 -Wa,--noexecstack -g -O2 -ffile-prefix-map= /build/reproducible-path/openssl-3.0.11=. -fstack-protector-strong -Wformat -Werror=format-security -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">OPENSSLDIR: "/usr/lib/ssl"</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">ENGINESDIR: "/usr/lib/x86_64-linux-gnu/engines-3"</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">MODULESDIR: "/usr/lib/x86_64-linux-gnu/ossl-modules"</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">Seeding source: os-specific</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">CPUINFO: OPENSSL_ia32cap=0xfffa32035f8bffff:0xd01e4fbb</span></font><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><span style="color:rgb(0,0,0);font-family:Arial;font-size:medium">Later my friend and I discovered that the latest boringssl compatible OpenSSL version seems to have been upgraded to 3.2.x, but I am not sure if this is the problem. The final solution was to switch to <a href="https://github.com/google/boringssl">https://github.com/google/boringssl</a> /commit/c39e6cd9ec5acebb6de2adffc03cfe03b07f08ab this commit.But I don't think switching to a previous commit to build is a perfect solution, so I'd like to ask for some help.</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><span style="color:rgb(0,0,0);font-family:Arial;font-size:medium">My build steps are as follows:</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial;font-size:medium"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">apt update</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">apt install build-essential ca-certificates zlib1g-dev libpcre3 libpcre3-dev tar unzip libssl-dev wget curl git cmake ninja-build mercurial libunwind-dev pkg-config</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">git clone <a href="https://github.com/google/boringssl.git">https://github.com/google/boringssl.git</a></span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cd boringssl</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">mkdir build</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cd build</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cmake -GNinja ..</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">ninja</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cd ../..</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">git clone --recurse-submodules -j8 <a href="https://github.com/google/ngx_brotli">https://github.com/google/ngx_brotli</a></span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cd ngx_brotli/deps/brotli</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">mkdir out && cd out</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS ="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed ..</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cmake --build . --config Release --target brotlienc</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cd ../../../..</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">hg clone <a href="https://hg.nginx.org/nginx">https://hg.nginx.org/nginx</a></span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">cd nginx</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">./auto/configure --user=www --group=www --prefix=/www/server/nginx --with-pcre --add-module=/root/ngx_brotli --with-http_v2_module --with-stream --with-stream_ssl_module --with-http_ssl_module --with-http_gzip_static_module --with-http_gunzip_module --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld -opt=-Wl,-E --with-cc-opt=-Wno-error --with-ld-opt=-ljemalloc --with-http_dav_module --with-http_v3_module --with-cc-opt=-I ../boringssl/include --with-ld-opt='-L../boringssl/build/ssl -L../boringssl/build/crypto'</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">make</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">make install</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="color:rgb(0,0,0);font-family:Arial">System information:</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">checking for OS</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">+ Linux 6.1.0-18-amd64 x86_64</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">checking for C compiler ... found</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">+ using GNU C compiler</span><br style="clear:both;color:rgb(0,0,0);font-family:Arial"><span style="font-size:x-small;color:rgb(0,0,0);font-family:Arial">+ gcc version: 12.2.0 (Debian 12.2.0-14)</span><br></div>