Skip to contentSkip to conversation

New: Building BR2_PACKAGE_LIBOPENSSL_BIN=y broken with defconfig bootlin-armv7m-uclibc

Buildroot [email protected] 1 participant 3 messages Jul 25, 2023 – Jun 15, 2024

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=15709

Bug ID: 15709
Summary: Building BR2_PACKAGE_LIBOPENSSL_BIN=y broken with
defconfig bootlin-armv7m-uclibc
Product: buildroot
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Target Milestone: ---

Created attachment 9628
--> https://bugs.busybox.net/attachment.cgi?id=9628&action=edit
defconfig

/home/bernd/buildroot/br4/output/per-package/libopenssl/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real:
./libcrypto.a(libcrypto-lib-threads_pthread.o): in function `CRYPTO_atomic_or':
threads_pthread.c:(.text+0xf6): undefined reference to `__atomic_is_lock_free' /home/bernd/buildroot/br4/output/per-package/libopenssl/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real:
threads_pthread.c:(.text+0x106): undefined reference to `__atomic_fetch_or_8' /home/bernd/buildroot/br4/output/per-package/libopenssl/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real:
./libcrypto.a(libcrypto-lib-threads_pthread.o): in function
`CRYPTO_atomic_load':
threads_pthread.c:(.text+0x158): undefined reference to `__atomic_is_lock_free' /home/bernd/buildroot/br4/output/per-package/libopenssl/host/opt/ext-toolchain/arm-buildroot-uclinux-uclibcgnueabi/bin/ld.real:
threads_pthread.c:(.text+0x162): undefined reference to `__atomic_load_8'

The toolchain contains libatomic

$ find
output/per-package/libopenssl/host/arm-buildroot-uclinux-uclibcgnueabi/sysroot/
| grep atomic
output/per-package/libopenssl/host/arm-buildroot-uclinux-uclibcgnueabi/sysroot/lib/libatomic.la
output/per-package/libopenssl/host/arm-buildroot-uclinux-uclibcgnueabi/sysroot/lib/libatomic.a

Adding -latomic to the openssl configure script fixes the build error.

BR2_TOOLCHAIN_HAS_LIBATOMIC is not enabled:

$ grep ATOMIC .config
BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS=y
BR2_TOOLCHAIN_HAS_ATOMIC=y
BR2_PACKAGE_PULSEAUDIO_HAS_ATOMIC=y
BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS=y
# BR2_PACKAGE_LIBATOMIC_OPS is not set

The reason why buildroot does not enable BR2_TOOLCHAIN_HAS_LIBATOMIC is the binfmt used:

$ grep BINFMT .config
BR2_BINFMT_FLAT=y
BR2_BINFMT_FLAT_ONE=y
# BR2_BINFMT_FLAT_SEP_DATA is not set

which leads to BR2_TOOLCHAIN_HAS_LIBATOMIC not being enabled:
https://git.busybox.net/buildroot/tree/toolchain/Config.in#n851

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

[Buildroot] [Bug 15709] Building BR2_PACKAGE_LIBOPENSSL_BIN=y broken with defconfig bootlin-armv7m-uclibc

https://bugs.busybox.net/show_bug.cgi?id=15709

--- Comment #1 from Bernd Kuhls <[email protected]> --- The same error occurs with the defconfig bootlin-m68k-5208-uclibc.

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

[Buildroot] [Bug 15709] Building BR2_PACKAGE_LIBOPENSSL_BIN=y broken with defconfig bootlin-armv7m-uclibc

In reply to [email protected]

https://bugs.busybox.net/show_bug.cgi?id=15709

Yann E. MORIN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |MOVED

--- Comment #2 from Yann E. MORIN <[email protected]> --- Thank you for your report.

The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker:
https://gitlab.com/buildroot.org/buildroot/-/issues

We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker.

Thank you!

Signature · 6 lines
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot