Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure.ac: use pkg-config to retrieve openssl dependencies #426

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ffontaine
Copy link

Use pkg-config to retrieve openssl dependencies such as -latomic and avoids the following build failure when building statically on architectures such as sparc:

/home/autobuild/autobuild/instance-1/output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/10.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-1/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libcrypto.a(threads_pthread.o): in function `CRYPTO_atomic_add': threads_pthread.c:(.text+0x208): undefined reference to `__atomic_is_lock_free'

Fixes:

Signed-off-by: Fabrice Fontaine [email protected]

@ffontaine
Copy link
Author

Do you have some comments on this PR?

Use pkg-config to retrieve openssl dependencies such as -latomic and
avoids the following build failure when building statically on
architectures such as sparc:

/home/autobuild/autobuild/instance-1/output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/10.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-1/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libcrypto.a(threads_pthread.o): in function `CRYPTO_atomic_add':
threads_pthread.c:(.text+0x208): undefined reference to `__atomic_is_lock_free'

Fixes:
 - http://autobuild.buildroot.org/results/49abbaa1eab94b248bff434b40728065d687e278

Signed-off-by: Fabrice Fontaine <[email protected]>
Copy link
Member

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with autoconf 2.71 I get this:

checking whether to enable use of openssl crypto library... ./configure: line 7719: syntax error near unexpected token `LIBCRYPTO,'
./configure: line 7719: `      PKG_CHECK_MODULES(LIBCRYPTO, libcrypto,'

maybe bitrotted?

@ffontaine
Copy link
Author

ffontaine commented Apr 7, 2024

Thanks for your feedback.

Patch has been applied in buildroot since February (https://git.buildroot.net/buildroot/commit/?id=e889a1c9e983753dd0fa5062d3b9475a8cba6072) and no build failures are raised by autobuilders since that time.

It should be noted that configure must be rebuilt (thanks to autoreconf ) after applying this patch. which updates configure.ac.
Could you also try to add PKG_PROG_PKG_CONFIG before PKG_CHECK_MODULES? This macro will check if pkg-config is available on your system.

@tridge
Copy link
Member

tridge commented Apr 7, 2024

@ffontaine it was fine after "make reconfigure". Note sure why autoconf didn't generate a good configure script for me yesterday. It's been many years since I worked with autoconf - about 20 years in fact, when I handed over to Wayne :-)

@tridge
Copy link
Member

tridge commented Apr 7, 2024

@WayneD I'm happy with this

@vilkov
Copy link

vilkov commented May 29, 2024

Hey @tridge, @WayneD can we have this merged, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants