Open fabianfreyer opened 1 year ago
The 32-bit long unsigned int
vs 64-bit long long unsigned int
type error is a hint...you really need to be running on a 64-bit RPi4 and OS as per the link in this doc
I'm aware that document shows the setup for aarch64, and that the error is due to bladerf_frequency
being a 64-bit number while the format string's %lu
format specifier indicates a number that is at least 32 bits (per standard), but usually 64 bit large on 64-bit systems. In fact, the code guide notes that because of this reason, the long
type should be avoided:
Avoid using the long type since it can be either 32 or 64-bits depending on the architecture. See the standard definition for more information.
This suggests that building for 32-bit targets is supported. OTOH, I have not seen any claims that running srsRAN_4G on armv7 is not supported -- and I'm not sure whether you're claiming that. If that's the case, it would be helpful for this fact to be documented, and for corresponding checks to be added to the CMakeLists.
Issue Description
Building Raspberry Pi OS (armv7) fails.
Setup Details
Using raspios_lite_armhf-2023-05-03 (bullseye)
Expected Behavior
The build succeeds.
Actual Behaviour
The build fails with the following error message:
Steps to reproduce the problem
Clone current main branch on a Raspberry Pi or using qemu-arm with 32-bit Raspberry Pi OS, and run
mkdir build; cd build; cmake ..; make
, after building and installing bladeRF.Additional Information
Build succeeds with
cmake -DCMAKE_C_FLAGS="-Wno-error=format" ..