osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/28537 )
Change subject: configure.ac: add -lboost_thread for uhd < 4.2.0 ......................................................................
configure.ac: 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/libboost_thread.so.1.67.0: 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: https://github.com/EttusResearch/uhd/commit/04a83b6e76beef970854da69ba882d71...
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 configure.ac.
Fixes: OS#5608 Related: https://stackoverflow.com/q/19901934 Change-Id: I0367f1c2981bf56252e7514d5993cbbec960b21b --- M configure.ac 1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/37/28537/1
diff --git a/configure.ac b/configure.ac index 422ad65..37444a5 100644 --- a/configure.ac +++ b/configure.ac @@ -185,6 +185,14 @@ [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. + # https://github.com/EttusResearch/uhd/commit/04a83b6e76beef970854da69ba882d71... + PKG_CHECK_MODULES(UHD, uhd < 004.002, + [LIBS="$LIBS -lboost_thread"], + [] + ) ])
AS_IF([test "x$with_singledb" = "xyes"], [