Open DavidHopkinsFbr opened 1 year ago
Ah, the issue is that libmalc.a
needs the following functions and macros in time_extras.h
:
bl_cpu_timept_get()
bl_cpu_timept_to_sysclock64_diff_ns()
bl_fast_timept_to_sysclock64_diff_ns()
which are only defined if the symbol BL_HAS_CPU_TIMEPT
is true, which is currently only true on x64, x86, and IA64. And the missing helpers from cpu_timept_funcs_arbitrary_base.h
are only #include
d under the same condition. So it looks like aarch64/arm64 is the problem. It would be necessary to replace the x86/x64/IA64 RDTSC intrinsics with ARM equivalents to use this library on any Raspberry Pi.
For reference: https://stackoverflow.com/questions/40454157/is-there-an-equivalent-instruction-to-rdtsc-in-arm
Reading BL_HAS_CPU_TIMEPT and failing gracefully (#error) or providing a fallback from malc would probably have been preferable.
You seem to be mostly right. I'm not planning it to add it (and especially testing it) myself but I can take an MR. Note that the heavy lifting is already done by e.g. the Google Benchmark project, it should be pretty straightforward to add: https://github.com/google/benchmark/blob/main/src/cycleclock.h
On the base library there are these headers which can be useful to make the reduce a bit the #ifdef mess: https://github.com/RafaGago/base_library/blob/master/include/bl/base/arch.h https://github.com/RafaGago/base_library/blob/master/include/bl/base/compiler.h
That's fair enough. If I end up adding support I will certainly raise a PR for you, but I'm not sure I'll get a chance.
Hi,
I'm investigating running mini-async-log-c on a Raspberry Pi to log some time-sensitive code. The Raspberry Pi is running the PiCAT 4 version of Raspberry Pi OS, aarch64. This version of Raspberry Pi OS is derived from Debian Buster 10.
I followed the readme's Linux build instructions for Debian/Ubuntu-type systems, but didn't get a successful build. The output from the
meson
process looks fairly reasonable to my inexperienced eyes:I'm not sure if the "missing usable header" for
io.h
is a problem. My system does havebuild-essential
installed and I have various files namedio.h
under/usr/src/linux-headers-.....
Anyway, running the build with
ninja $MYBUILDDIR
fails, apparently on test code. C is not a language I'm very expert in, but these "implicit declaration of function" warnings look more like something basic is missing from the build environment, to me:Am I missing some dependency that I should have installed before attempting to build
malc
?Re-running the build command generated slightly different output each time, but has eventually stabilised on the following:
Is there any other information I can provide that would help identify the root cause?