Two unrelated pre-existing compile failures surfaced on a fresh build
(both from unpinned `ADD <git-url>` sources drifting against current
Debian's GCC/Boost):
- Debian's libboost-all-dev is missing #include <utility> in
awaitable.hpp, which current GCC/libstdc++ no longer pulls in
transitively, breaking UHD's C++20-coroutine-mode rpclib build with
"'exchange' is not a member of 'std'". Patched the header directly.
- SoapyUHD pins itself to C++14 and is missing a lexical_cast include in
two files; current UHD's public headers need C++17 (std::optional).
Bumped SoapyUHD's CMAKE_CXX_STANDARD to 17 and added the missing
#include <boost/lexical_cast.hpp> in both files.
Also split the single-stage Dockerfile (which kept the entire build
toolchain - build-essential, cmake, doxygen, libboost-all-dev,
python3-dev/numpy/scipy, plus every /tmp/sources/* source and build tree -
in the final image) into a builder stage and a minimal final stage that
only installs real runtime packages (derived via `ldd` on every compiled
binary/module, not guessed) and COPYs over the compiled artifacts.
Verified: SSH, sdrplay_apiService, and all three SoapySDR modules
(remote/sdrplay/uhd) load correctly; signal handling still exits 143 on
docker stop.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz
Adopts bash-arithmetic exit-code computation ($((128 + SIGNUM))) instead
of piping to bc, dropping that dependency. Consolidates this project
onto docker-common's shared scripts (see that repo's CLAUDE.md).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NiNnj78HGx1KWyCCo39HSz