Skip to content

RFC Fix sysdig build errors

Francis Laniel buildroot 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tbb: new packageDEVELOPERS package/Config.in package/tbb/0001-tbb-Enable-cross-compilation.patch +3 more+114 -02 replies
2/2package/sysdig: bump version to 0.27.1.package/sysdig/0001-libsinsp-Apply-PATCH_COMMAND-to-fix-lua-types-and-fu.patch package/sysdig/0002-Link-against-libabseil-cpp-which-grpc-uses.patch package/sysdig/Config.in +2 more+139 -12 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Buildroot] [RFC PATCH v1 0/2] Fix sysdig build errors

Hi.

First of all, I hope you are fine and the same for your relatives.

When building a system with recent kernel with BR2_PACKAGE_SYSDIG, I got some
compilation errors when building sysdig libsinsp:
.../sysdig-0.23.1/userspace/libsinsp/chisel.cpp:99:30: error: elements of array ‘const luaL_reg ll_sysdig []’ have incomplete type
99 | const static struct luaL_reg ll_sysdig [] =
After that, an error when building modules occurs:
.../sysdig-0.23.1/driver/ppm.h:62:18: error: field ‘last_print_time’ has incomplete type
62 | struct timespec last_print_time;
And finally an error during link time occurs:
.../sysdig-0.23.1/userspace/libsinsp.a(cri.grpc.pb.cc.o): undefined reference to symbol '_ZN4absl12lts_202103245MutexD1Ev'

Concerning the error in libsinsp, a patch was added to sysdig recipe. This patch is based on Minikube patch, which is in turn based on sysdig CMakeLists.txt PATCH_COMMAND [1, 2].
The modules errors were fixed upstream, so I bumped sysdig version to 0.27.1 [3, 4].
For the linking one, a patch already exist to fix this buggy behavior [5].

Sysdig 0.27.1 relies on tbb, so a recipe for this library was added. Note that, this recipe was originally written by Bradford Barr and I just bumped its version to suit sysdig case [6].

With the two patches applied, I was able to build and boot an image within qemu:

$ make qemu_x86_64_defconfig
$ make menuconfig
# Set glibc as library, enable c++, enable luajit and enable sysdig.
$ make linux-menuconfig
# Enable FTRACE
$ make -j$(nproc)
...
$ bash start-qemu.sh
...
Welcome to Buildroot
buildroot login: root
# insmod /lib/modules/5.15.18/extra/sysdig-probe.ko
sysdig_probe: loading out-of-tree module taints kernel.
sysdig_probe: driver loading, sysdig-probe 0.1.1dev
# sysdig --version
sysdig version 0.1.1dev

If you see any way to improve this contribution, feel free to share it!

Francis Laniel (1):
package/sysdig: bump version to 0.27.1.

bradford barr (1):
tbb: new package

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...ATCH_COMMAND-to-fix-lua-types-and-fu.patch | 82 +++++++++++++++++++
 ...gainst-libabseil-cpp-which-grpc-uses.patch | 45 ++++++++++
 package/sysdig/Config.in                      |  5 ++
 package/sysdig/sysdig.hash                    |  1 +
 package/sysdig/sysdig.mk                      |  7 +-
 .../0001-tbb-Enable-cross-compilation.patch   | 55 +++++++++++++
 package/tbb/Config.in                         | 16 ++++
 package/tbb/tbb.hash                          |  2 +
 package/tbb/tbb.mk                            | 39 +++++++++
 11 files changed, 253 insertions(+), 1 deletion(-)
 create mode 100644 package/sysdig/0001-libsinsp-Apply-PATCH_COMMAND-to-fix-lua-types-and-fu.patch
 create mode 100644 package/sysdig/0002-Link-against-libabseil-cpp-which-grpc-uses.patch
 create mode 100644 package/tbb/0001-tbb-Enable-cross-compilation.patch
 create mode 100644 package/tbb/Config.in
 create mode 100644 package/tbb/tbb.hash
 create mode 100644 package/tbb/tbb.mk

Best regards and thank you in advance for your reviews.

P.S.: If you are interested, this bug was spotted while trying to bump Minikube kernel to 5.10.57 [7].

---
[1] https://github.com/kubernetes/minikube/commit/f036c279bc598cf59affb0fc538c017d83afb7ab
[2] https://github.com/draios/sysdig/commit/a064440394c93a7579dc6e1db13c8378d5eecd6f
[3] https://github.com/draios/sysdig/commit/938986890291c126f9b8f3a050bc3edc95fb6f5a
[4] https://github.com/draios/sysdig/commit/2691cbc66c7faa973333d65a69909be06be21c18
[5] https://github.com/hhoffstaette/portage/blob/8d047247719a15c5a63001f65ba348514706277d/dev-util/sysdig/files/0.27.1-grpc-absl-sync.patch
[6] https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
[7] https://github.com/kubernetes/minikube/pull/12707

Signature · 5 lines
2.25.1
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot