From ae20ab0a3b2b90b471e868905dd44d7b75501fd0 Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Fri, 13 Dec 2024 17:06:53 +0000 Subject: [PATCH] auto/otel: Remove pkg-config check @thresheek reported an issue trying to configure OTEL support on Amazon Linux 2 checking for OTEL requirements: - checking for rust compiler ... found - checking for cargo ... found - checking for OpenSSL library ... found Package openssl was not found in the pkg-config search path. Perhaps you should add the directory containing `openssl.pc' to the PKG_CONFIG_PATH environment variable No package 'openssl' found We successfully built the test program with '-lssl -lcrypto', but then tried to use 'pkg-config openssl --cflags --libs' to override NXT_OTEL_LIBS. On Amazon Linux2 there is no openssl.pc, they have a openssl11.pc. Let's just remove the pkg-config check, if we get here, we have successfully built with '-lssl -lcrypto', so just go with that (it also matches what we do in auto/ssltls). Reported-by: Konstantin Pavlov Closes: https://github.com/nginx/unit/issues/1510 Signed-off-by: Andrew Clayton --- auto/otel | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/auto/otel b/auto/otel index 654c45ec8..f23aac3b1 100644 --- a/auto/otel +++ b/auto/otel @@ -41,9 +41,7 @@ if [ $NXT_OTEL = YES ]; then fi NXT_OTEL_LIBS="-lssl -lcrypto" - if [ $(which pkg-config) ]; then - NXT_OTEL_LIBS="$(pkg-config openssl --cflags --libs)" - fi + cat << END >> $NXT_AUTO_CONFIG_H #ifndef NXT_HAVE_OTEL