Browse Source add -lboost_thread for uhd < 4.2.0

Fix for the following error we see since building master-osmo-trx on
debian 10 instead of 9:
  /usr/bin/ld: ipc_driver_test-uhdwrap.o: undefined reference to symbol '_ZTIN5boost6detail16thread_data_baseE'
  /usr/bin/ld: //usr/lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line

After spending a lot of time on researching this, my understanding is
now that uhd.pc should have had "-lboost_thread" in versions up to the
latest release 4.2.0 because before that it would include boost thread
headers in its logging code:

ld is able to figure out which library provides the missing symbol, and
apparently depending on the binutils version and linker flags, it may
just ignore this and not show an error. This is why apparently it worked
with debian 9 and still does work in OBS (different flags), and why it
was not fixed upstream in uhd.pc. By now fixing it is not needed in the
latest version anymore, and there are already versions of uhd.pc in
various linux distributions without -lboost_thread, so I think it's
appropriate to add the workaround here in

Fixes: OS#5608
Change-Id: I0367f1c2981bf56252e7514d5993cbbec960b21b
Oliver Smith 1 month ago
  1. 8


@ -185,6 +185,14 @@ AS_IF([test "x$with_uhd" = "xyes"],[
[PKG_CHECK_MODULES(UHD, uhd >= 003.005)]
# OS#5608: libuhd < 4.2.0 includes boost/thread/thread.hpp in its logging
# code and therefore requires linking against boost_thread. It's missing in
# uhd.pc, so work around it here.
PKG_CHECK_MODULES(UHD, uhd < 004.002,
[LIBS="$LIBS -lboost_thread"],
AS_IF([test "x$with_singledb" = "xyes"], [