Skip to content

Commit

Permalink
auto/otel: Remove pkg-config check
Browse files Browse the repository at this point in the history
@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 <[email protected]>
Closes: #1510
Signed-off-by: Andrew Clayton <[email protected]>
  • Loading branch information
ac000 committed Dec 13, 2024
1 parent 19f403f commit ae20ab0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions auto/otel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae20ab0

Please sign in to comment.