Nginxを再ビルドしようとしたらopenssl-quictlsエラー
開発環境でNginxを再ビルドしたときの覚書。
Gemini 3 Flash Previewと対話。
環境: FreeBSD 14.4-RELEASE-p3
下記エラー。
# cd /usr/ports/
# git pull
# cd /usr/ports/www/nginx/
# make rmconfig-recursive
make: "/usr/ports/Mk/Uses/ssl.mk" line 98: You are using an unsupported SSL provider openssl-quictlsmake: stopped in /usr/ports/www/nginx
Gemini先生が教えてくれたコマンドで確認してみる。
# make -d v rmconfig-recursive 2>&1 | grep -B 10 "SSL_DEFAULT = openssl-quictls"
Result of ${.MAKE.EXPORTED:O} is "LANG LC_ALL META_MODE"Evaluating modifier ${.MAKE.EXPORTED:u} on value "LANG LC_ALL META_MODE"Result of ${.MAKE.EXPORTED:u} is "LANG LC_ALL META_MODE"Global: OPENSSL_INSTALLED = security/openssl-quictlsVar_Parse: y(OPENSSL_INSTALLED) (eval)Global: SSL_DEFAULT = # (empty)Var_Parse: ${OPENSSL_INSTALLED:T} (eval-keep-dollar-and-undefined)Evaluating modifier ${OPENSSL_INSTALLED:T} on value "security/openssl-quictls" (eval-keep-dollar-and-undefined, regular)ModifyWords: split "security/openssl-quictls" into 1 wordResult of ${OPENSSL_INSTALLED:T} is "openssl-quictls" (eval-keep-dollar-and-undefined, regular)Global: SSL_DEFAULT = openssl-quictls
openssl-quictlsがインストールされているので、
/usr/ports/security/openssl-quictls/version.mk
を探しにいって、それがないためエラーになっているらしい。
openssl-quictlsを削除する。
# pkg delete openssl-quictls
pkg: nginx is locked cannot delete openssl-quictlspkg: nginx is locked cannot delete openssl-quictlspkg: nginx is locked cannot delete openssl-quictlsCannot perform request
アンロックして削除する。
# pkg unlock nginx
nginxも削除されるのでその前にビルドオプションを一応メモっておく。
# nginx -V 2>&1 | sed 's/ --/\n--/g'
nginx version: nginx/1.28.0built with OpenSSL 3.0.15+quic 3 Sep 2024TLS SNI support enabledconfigure arguments:--prefix=/usr/local/etc/nginx--with-cc-opt='-I /usr/local/include'--conf-path=/usr/local/etc/nginx/nginx.conf--sbin-path=/usr/local/sbin/nginx--pid-path=/var/run/nginx.pid--error-log-path=/var/log/nginx/error.log--user=www--group=www--with-compat--with-pcre--http-client-body-temp-path=/var/tmp/nginx/client_body_temp--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp--http-proxy-temp-path=/var/tmp/nginx/proxy_temp--http-scgi-temp-path=/var/tmp/nginx/scgi_temp--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp--http-log-path=/var/log/nginx/access.log--with-http_v2_module--with-http_v3_module--with-http_gunzip_module--with-http_realip_module--with-http_ssl_module--with-http_stub_status_module--with-http_sub_module--without-mail_imap_module--without-mail_pop3_module--without-mail_smtp_module--with-threads--add-module=/usr/ports/www/nginx/work/ngx_cache_purge-a84b0f3--add-module=/usr/ports/www/nginx/work/ngx_http_geoip2_module-3.4--add-module=/usr/ports/www/nginx/work/nginx-module-vts-bf64dbf--with-ld-opt='-L /usr/local/lib'
削除実行。
# pkg delete openssl-quictls
古い設定をクリアする。
# make rmconfig-recursive
# make clean-depends
# make clean
再設定。
# make config
選択したビルドオプションはほぼ前と同じ。
参考: FreeBSDのNginxをportsでビルド → 本番環境はダウンタイムなしで切り替える
SSLだけ「HTTPV3_LSSL Use security/libressl-devel 」を選択。
ビルド実行。
# make
インストール。
# make reinstall clean
確認。
# service nginx status
# nginx -V 2>&1 | sed 's/ --/\n--/g'
nginx version: nginx/1.30.1built by clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)built with LibreSSL 4.3.1TLS SNI support enabledconfigure arguments:--prefix=/usr/local/etc/nginx--with-cc-opt='-I /usr/local/include'--conf-path=/usr/local/etc/nginx/nginx.conf--sbin-path=/usr/local/sbin/nginx--pid-path=/var/run/nginx.pid--error-log-path=/var/log/nginx/error.log--user=www--group=www--with-compat--with-pcre--http-client-body-temp-path=/var/tmp/nginx/client_body_temp--http-fastcgi-temp-path=/var/tmp/nginx/fastcgi_temp--http-proxy-temp-path=/var/tmp/nginx/proxy_temp--http-scgi-temp-path=/var/tmp/nginx/scgi_temp--http-uwsgi-temp-path=/var/tmp/nginx/uwsgi_temp--http-log-path=/var/log/nginx/access.log--with-http_v2_module--with-http_v3_module--with-http_gunzip_module--with-http_realip_module--with-http_ssl_module--with-http_stub_status_module--without-mail_imap_module--without-mail_pop3_module--without-mail_smtp_module--with-threads--add-module=/usr/ports/www/nginx/work/ngx_cache_purge-a84b0f3--add-module=/usr/ports/www/nginx/work/ngx_http_geoip2_module-3.4--add-module=/usr/ports/www/nginx/work/nginx-module-vts-bf64dbf--with-ld-opt='-L /usr/local/lib'
結局、HTTP/3 QUICはFreeBSD 15.1にOSをアップグレードしたときに対応することにした。