frr is provided by meta-openembedded so not an immediate issue for core recipes however the phenomenon is common enough. frr uses native tool called clippy which is a special preprocessor, so we build it with frr-native and then use it from native sysroot during frr cross build It all works ok except when frr-native is used from sstate and the sstate object being used is built on a build host with libatomic installed. It then gets libatomic.so.1 added to its DT_NEEDED segment. If it gets reused on a host which do not have libatomic then clippy fails to run. /srv/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/frr/10.2.1/recipe-sysroot-native/usr/lib/clippy: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory | make[1]: *** [Makefile:18742: lib/plist_clippy.c] Error 127 This is seen on alma8 and rocky9 builders on yocto AB e.g. I am sure this can happen with other native tools as well which may add dependency on libatomic dynamically if found and run into similar issue. Thats why I wanted to document it here. I think these kind of subtle issues are quite pesky and makes supported such large array of host distributions with common sstate archive.
We can either disable the libatomic detection in the rust build or we can add libatomic to the uninative. Sundeep, can you look into the disable option? Is libatomic essential for the clippy build? If it is required, we'd like add libatomic to the uninative blob. Please provide a status update before sending a patch.
Please note that its not clippy tool from rust project but its internal tool from frr project, which it is using from frr-native here during cross build.
Khem, Thanks for explaining that it's not Rust's clippy. In that case, this isn't a bug for Sundeep.
I believed this bug was the cause of failure of this reproducible-meta-oe run: https://autobuilder.yoctoproject.org/valkyrie/#/builders/87/builds/41/steps/28/logs/stdio (sadly logs do not contain pertinent information)
I forgot to note that this was from the fedora39-vk-2 worker.
Here is a reproducer: I used the "crops/poky:fedora-39" docker image (but, as Khem mentionned, it look possible with other distros) Start the container as usual: $ docker run ... crops/poky:fedora-39 Let's give pokyuser sudo rights (One could also use a custom Dockerfile): $ docker exec -it -u0 <container_id> # now you're root in the container Put "pokyuser ALL=(ALL) NOPASSWD: ALL" in /etc/sudoers Back to the pokyuser shell: $ sudo dnf install libatomic && bitbake -ccleansstate frr frr-native && bitbake frr-native && sudo dnf remove libatomic && bitbake frr ... Loading cache: 100% |##########################################################################################################################################################| Time: 0:00:04 Loaded 5090 entries from dependency cache. NOTE: Resolving any missing task queue dependencies Build Configuration: BB_VERSION = "2.12.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "universal" TARGET_SYS = "x86_64-poky-linux" MACHINE = "qemux86-64" DISTRO = "poky" DISTRO_VERSION = "5.2" TUNE_FEATURES = "m64 core2" TARGET_FPU = "" meta-oe meta-python = "heads/upstream/master:4aa12df389277a583a90c0e26ff41f51060bf327" meta-test = "main:b2ff6c37f5e620f59687aead667b9f619894fd80" meta-poky meta-yocto-bsp = "upstream/master:09bef6a491c087f0f0371874e759aae08a720c4e" meta meta-selftest = "upstream/master:fc3e32bc4cf79ddce0eb9fa409656de4dc0e00ea" meta-initramfs = "heads/upstream/master:4aa12df389277a583a90c0e26ff41f51060bf327" workspace = "main:1d03d01e6912b526967abb2be9c2653ca6124cf6" meta-gnome meta-networking = "heads/upstream/master:4aa12df389277a583a90c0e26ff41f51060bf327" Sstate summary: Wanted 10 Local 0 Mirrors 0 Missed 10 Current 750 (0% match, 98% complete)##################################################################### | ETA: 0:00:00 Initialising tasks: 100% |#####################################################################################################################################################| Time: 0:00:03 NOTE: Executing Tasks ERROR: frr-10.3-r0 do_compile: oe_runmake failed ERROR: frr-10.3-r0 do_compile: Execution of '.../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143' failed with exit code 1 ERROR: Logfile of failure stored in: .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/log.do_compile.447143 Log data follows: | DEBUG: Executing shell function do_compile | NOTE: make -j 12 | protoc-c -I. --c_out=. lib/mgmt.proto | true | /usr/bin/env perl ./lib/route_types.pl --enabled babeld --enabled bfdd --enabled bgpd --enabled bgpd-vnc --enabled eigrpd --enabled isisd --enabled fabricd --enabled ldpd --enabled nhrpd --enabled ospfd --enabled ospf6d --enabled pbrd --enabled pimd --enabled ripd --enabled ripngd --enabled zebra < ./lib/route_types.txt > lib/route_types.h | /usr/bin/env perl ./vtysh/daemons.pl zebra mgmtd bgpd ripd ripngd ospfd ospf6d isisd fabricd nhrpd ldpd babeld eigrpd pimd pim6d pbrd staticd bfdd vrrpd pathd > lib/vtysh_daemons.h | WARNING: All log messages before absl::InitializeLog() is called are written to STDERR | W0000 00:00:1745879733.999016 447147 main.cc:45] `protoc-c` is deprecated. Please use `protoc` instead! | sed -i -e '1i\ | #include "config.h"' lib/mgmt.pb-c.c | make all-am | make[1]: Entering directory '.../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/git' | .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/recipe-sysroot-native/usr/lib/clippy ./python/clidef.py -o lib/affinitymap_cli_clippy.c lib/affinitymap_cli.c | flex lib/command_lex.l | .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/recipe-sysroot-native/usr/lib/clippy: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory | make[1]: *** [Makefile:18800: lib/affinitymap_cli_clippy.c] Error 127 | make[1]: *** Waiting for unfinished jobs.... | make[1]: Leaving directory '.../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/git' | make: *** [Makefile:6659: all] Error 2 | ERROR: oe_runmake failed | WARNING: .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143:189 exit 1 from 'exit 1' | WARNING: Backtrace (BB generated script): | #1: bbfatal_log, .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143, line 189 | #2: die, .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143, line 173 | #3: oe_runmake, .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143, line 168 | #4: autotools_do_compile, .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143, line 163 | #5: do_compile, .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143, line 158 | #6: main, .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/run.do_compile.447143, line 202 ERROR: Task (.../layers/meta-openembedded/meta-networking/recipes-protocols/frr/frr_10.3.bb:do_compile) failed with exit code '1' NOTE: Tasks Summary: Attempted 2087 tasks of which 2077 didn't need to be rerun and 1 failed. Summary: 1 task failed: .../layers/meta-openembedded/meta-networking/recipes-protocols/frr/frr_10.3.bb:do_compile log: .../builds/build-qemux86-64/tmp/work/core2-64-poky-linux/frr/10.3/temp/log.do_compile.447143 Summary: There were 2 ERROR messages, returning a non-zero exit code.
Khem, Yi, Can frr-native do this deterministically.