On Wed, Nov 01, 2023 at 12:07:31PM +0200, Jaco Lesch via Postfix-users wrote:
> Building an OpenSSL Application
> The development files are available in the /usr/openssl/3/sub-directo-
> ries. To build an OpenSSL application, use the following cc command
> line options:
>
> export PKG_CONFIG_PATH=/usr/openssl/3/lib/64/pkgconfig
> cc `pkg-config --cflags --libs libssl libcrypto` [ flag... ] file
Can you share the output you see for:
$ export PKG_CONFIG_PATH=/usr/openssl/3/lib/64/pkgconfig
$ pkg-config --cflags --libs libssl libcrypto
For comparison, my build of OpenSSL 3.2 beta from stock upstream sources
(with a custom --prefix) yields:
$ export PKG_CONFIG_PATH=/usr/local/siteexec/lib/pkgconfig
$ pkg-config --cflags libssl libcrypto
-I/usr/local/siteexec/include
$ pkg-config --libs libssl libcrypto
-L/usr/local/siteexec/lib -lssl -lcrypto
> To compile the Postix source I used the following options for make:
> =================================================================================
> export PKG_CONFIG_PATH=/usr/openssl/3/lib/64/pkgconfig
>
> make makefiles dynamicmaps=yes shared=yes \
> CC="/usr/bin/gcc `pkg-config --cflags --libs libssl libcrypto`" \
> CCARGS="-m64 -DUSE_DB -DUSE_TLS -I/usr/openssl/3/include" \
> AUXLIBS="-ldb -R/usr/openssl/3/lib -L/usr/openssl/3/lib -lssl
> -lcrypto" \
> openssl_path="/usr/openssl/3/bin/openssl"
I would have tried instead:
PKG_CONFIG_PATH=/usr/openssl/3/lib/64/pkgconfig \
make makefiles dynamicmaps=yes shared=yes \
openssl_path="/usr/openssl/3/bin/openssl" \
CC="/usr/bin/gcc -m64" \
CCARGS="-DUSE_DB -DUSE_TLS $(pkg-config --cflags libssl libcrypto)" \
AUXLIBS="-ldb $(pkg-config --libs libssl libcrypto)" \
but, you may still also need an explicit "-R/usr/openssl/3/lib" option,
if that's not part of what "pkg-config" returns for "--libs".
--
Viktor.
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]