Skip to content

Build failure on armv7 with bladeRF #1179

@fabianfreyer

Description

@fabianfreyer

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:

/home/pi/srsRAN_4G/lib/src/phy/rf/rf_blade_imp.c: In function ‘rf_blade_set_rx_freq’:
/home/pi/srsRAN_4G/lib/src/phy/rf/rf_blade_imp.c:375:33: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘bladerf_frequency’ {aka ‘long long unsigned int’} [-Werror=format=]                                                                         375 |   printf("set RX frequency to %lu\n", f_int);
      |                               ~~^     ~~~~~
      |                                 |     |
      |                                 |     bladerf_frequency {aka long long unsigned int}
      |                                 long unsigned int
      |                               %llu
/home/pi/srsRAN_4G/lib/src/phy/rf/rf_blade_imp.c: In function ‘rf_blade_set_tx_freq’:
/home/pi/srsRAN_4G/lib/src/phy/rf/rf_blade_imp.c:392:33: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘bladerf_frequency’ {aka ‘long long unsigned int’} [-Werror=format=]
  392 |   printf("set TX frequency to %lu\n", f_int);
      |                               ~~^     ~~~~~                                                                                                                                                                                                                                                 |                                 |     |                                                                                                                                                                                                                                                     |                                 |     bladerf_frequency {aka long long unsigned int}
      |                                 long unsigned int                                                                                                                                                                                                                                           |                               %llu

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" ..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions