Hello, I am not able to successfully build the lttng-modules package with Buildroot v2021.05. I get the following syntax errors: output/build/lttng-modules-2.11.0/./probes/../instrumentation/events/lttng-module/timer.h:313:41: error: invalid use of undefined type ‘const struct itimerval’ 313 | ctf_integer(long, interval_usec, value->it_interval.tv_usec) | ^~ output/build/lttng-modules-2.11.0/./lib/../lib/ringbuffer/frontend.h:82:6: error: implicit declaration of function ‘smp_read_barrier_depends’ [-Werror=implicit-function-declaration] 82 | smp_read_barrier_depends(); (cpu) < nr_cpu_ids; });) | ^~~~~~~~~~~~~~~~~~~~~~~~ /output/build/lttng-modules-2.11.0/./lib/../wrapper/trace-clock.h:168:3: error: implicit declaration of function ‘read_barrier_depends’ [-Werror=implicit-function-declaration] 168 | read_barrier_depends(); /* load ltc before content */ | ^~~~~~~~~~~~~~~~~~~~ The errors look mostly syntactical and is replicated with a fresh clone of v2021.08, v2021.11, v2020.05, v2020.08 also. The lttng-tools and lttng-babeltrace packages build without issues but the moment lttng-modules is selected and built, it fails. Is this issue known already? Are there any solutions for it?
Thanks for the bug report. Could you provide the Buildroot .config that allows to reproduce this issue ?
Created attachment 9196 [details] Buildroot .config files Hi Thomas, I am attaching two .config files here. The reason is that I suspected the external tool chain option to create the issue, because of which I tried using buildroot's own tool chain. Unfortunately I encountered the same error using both configurations. Request you to kindly use these configurations and check if you can reproduce the issue at your end. Thanks and regards, Sreedhar
Would like to update one development from my end. I cloned the lttng-modules package directly from its Github repository: https://github.com/lttng/lttng-modules From this lttng-modules environment, I tried building lttng-modules v2.13.0 based on the instructions in its README.md file by referencing the custom linux version that I was using (v5.10.x corresponding to Buildroot v2021.05) and it built successfully. When I tried building lttng-modules v2.12.0 and v2.11.0 and I got the exact error which I encountered in the Buildroot environment (reported earlier in this bug report). I see that buildroot v2021.08 and 2021.11 all continue using lttng-modules v2.11.0 and all seem to have the same issue. Is this possibly the reason for the issue? If yes, how do I solve it? I tried hacking into the buildroot/package/lttng-modules/lttng-modules.mk and lttng-modules.hash files but I still faced issues with the wrong sha256 hashes. Can you please help?
From understanding, the issue is raised on kernel >= 5.6 and lttng-modules has fixed this issue with https://github.com/lttng/lttng-modules/commit/edfdcb685c3f56dde803244449f79ad7bed03798 But there is a lot of other commits needed to be able to build on newer kernels so I think that a bump is indeed the best course of action. You can find a patch here: https://patchwork.ozlabs.org/project/buildroot/patch/20220106174949.1064731-1-fontaine.fabrice@gmail.com/
Thanks a lot for the response. I shall try this out and give a feedback.
FYI, patch was applied on master with https://git.buildroot.net/buildroot/commit/?id=48b77b25b71fa3c47b8d6fac1da46ea122715350
Thanks a lot for the solutions and sorry for the late reply. I was able to get it built successfully using the v2.11.9 version of lttng-modules by changing the versions in the lttng-modules.mk and lttng-modules.hash files. Thanks again for the information about the patch on master. Really appreciate it. The bug report can be closed.