Hi all,
While testing the update of u-boot-tools to 2026.07, I ran
into the following link failure when building mkeficapsule:
undefined reference to `gnutls_pkcs11_init'
undefined reference to `gnutls_pkcs11_add_provider'
undefined reference to `gnutls_pkcs11_obj_list_import_url4'
undefined reference to `gnutls_x509_crt_import_pkcs11'
undefined reference to `gnutls_pkcs11_deinit'
The build fails with:
ERROR: Task (.../u-boot-tools_2026.07.bb:do_compile) failed with exit code '1'
I noticed that commit e9f12f64279c ("gnutls: Add p11-kit for native
builds") attempted to address this issue by adding:
PACKAGECONFIG:append:class-native = " p11-kit"
I verified that this is working as intended for gnutls-native:
PACKAGECONFIG="libidn libtasn1 p11-kit"
PACKAGECONFIG_CONFARGS="... --with-p11-kit ..."
The resulting native library exports the required symbol:
$ nm -D libgnutls.so.30.42.0 | grep gnutls_pkcs11_init
00000000000a9070 T gnutls_pkcs11_init@@GNUTLS_3_4
However, the mkeficapsule link command uses the target compiler and
target sysroot:
arm-oe-linux-gnueabi-gcc ... --sysroot=.../recipe-sysroot \
-o tools/mkeficapsule ... -lgnutls
The target libgnutls.so staged in the u-boot-tools recipe sysroot
does not export any of the required PKCS#11 symbols:
$ nm -D recipe-sysroot/usr/lib/libgnutls.so.30.42.0 |
grep gnutls_pkcs11_init
produces no output.
As a local experiment, I changed the GnuTLS recipe from:
PACKAGECONFIG ??= "libidn libtasn1
${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
PACKAGECONFIG:append:class-native = " p11-kit"
to:
PACKAGECONFIG ??= "libidn libtasn1 p11-kit
${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)}"
With p11-kit enabled for target GnuTLS, u-boot-tools builds successfully.
It therefore looks like enabling p11-kit only for gnutls-native is
not sufficient for the current u-boot-tools build, because
mkeficapsule is linked against target GnuTLS.
Would enabling p11-kit for the target GnuTLS be the expected fix, or would
a more narrowly scoped solution in the u-boot-tools recipe be preferred?
Thanks,
Fabio Estevam
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#240955):
https://lists.openembedded.org/g/openembedded-core/message/240955
Mute This Topic: https://lists.openembedded.org/mt/120280773/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-