Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on Debian 13 (trixie/testing) #1295

Open
kotarou3 opened this issue Mar 3, 2024 · 2 comments · May be fixed by #1332
Open

Fails to build on Debian 13 (trixie/testing) #1295

kotarou3 opened this issue Mar 3, 2024 · 2 comments · May be fixed by #1332

Comments

@kotarou3
Copy link

kotarou3 commented Mar 3, 2024

Issue Description

On a fresh Debian 13 installation, srsRAN fails to build from source, failing with one of two kinds of errors:

(if UHD deps are installed)

-- Could NOT find Boost: missing: system (found /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found suitable version "1.83.0", minimum required is "1.35"))

(if UHD deps aren't installed or disabled with -DENABLE_UHD=no)

In file included from /srsRAN_4G/srsue/hdr/phy/phy_metrics.h:26,
                 from /srsRAN_4G/srsue/hdr/phy/phy_common.h:25,
                 from /srsRAN_4G/srsue/src/phy/phy_common.cc:26:
In member function 'std::array<_Tp, _Nm>::value_type& std::array<_Tp, _Nm>::operator[](size_type) [with _Tp = float; long unsigned int _Nm = 5]',
    inlined from 'void srsue::phy_common::reset_measurements(uint32_t)' at /srsRAN_4G/srsue/src/phy/phy_common.cc:662:18,
    inlined from 'void srsue::phy_common::reset()' at /srsRAN_4G/srsue/src/phy/phy_common.cc:918:21:
/usr/include/c++/13/array:203:24: error: array subscript 5 is above array bounds of 'std::__array_traits<float, 5>::_Type' {aka 'float [5]'} [-Werror=array-bounds=]
  203 |         return _M_elems[__n];
      |                ~~~~~~~~^

srsRAN builds fine on Debian 12, so it might be due to new compiler and boost versions with Debian 13:

ToolDebian 12Debian 13
GCC12.2.013.2.0
Boost1.74.01.83.0

Setup Details

Expected Behavior

srsRAN builds successfully

Actual Behaviour

srsRAN fails to build

Steps to reproduce the problem

  1. Run Debian 13 (e.g., by booting from a live CD)
  2. Ensure packages are up to date: sudo apt update && sudo apt upgrade
  3. Install git sudo apt install git
  4. Install srsRAN dependencies: sudo apt install build-essential cmake libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev
  5. Install optional dependencies: sudo apt install libsoapysdr-dev libbladerf-dev libuhd-dev libzmq3-dev uhd-host --no-install-recommends
  6. Clone and build srsRAN: git clone https://github.com/srsran/srsRAN_4G.git && mkdir srsRAN_4G/build && cd srsRAN_4G/build && cmake ..
  7. Try again without UHD: cmake .. -DENABLE_UHD=no && make -j
@kotarou3
Copy link
Author

kotarou3 commented Mar 3, 2024

I can work around this issue if I disable both UHD and -Werror with:

cmake .. -DENABLE_UHD=no -DENABLE_WERROR=no

@pedrib
Copy link

pedrib commented Jun 9, 2024

Had the same problem, to fix it in the cmake step:
cmake .. -DCMAKE_CXX_FLAGS="-Wno-array-bounds -Wno-error=stringop-overflow -Wno-error=stringop-overread"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants