laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/28519 )
Change subject: osmo-bsc/Makefile.am: fix undefined reference to symbol pow() ......................................................................
osmo-bsc/Makefile.am: fix undefined reference to symbol pow()
When trying to build osmo-bsc using clang 14, I am getting this error:
make[3]: Entering directory 'src/osmo-bsc' CCLD osmo-bsc /usr/bin/ld: ./.libs/libbsc.a(handover_decision_2.o): undefined reference to symbol 'pow@@GLIBC_2.29' /usr/bin/ld: /usr/lib/libm.so.6: error adding symbols: DSO missing from command line clang-14: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [Makefile:656: osmo-bsc] Error 1
We need to link with the math library to resolve this.
Change-Id: I4137cad07a3343882ca77d5ebd5137083941dc11 --- M src/osmo-bsc/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/osmo-bsc/Makefile.am b/src/osmo-bsc/Makefile.am index 557178e..f075580 100644 --- a/src/osmo-bsc/Makefile.am +++ b/src/osmo-bsc/Makefile.am @@ -122,6 +122,7 @@ $(LIBOSMOABIS_LIBS) \ $(LIBOSMOSIGTRAN_LIBS) \ $(LIBOSMOMGCPCLIENT_LIBS) \ + -lm \ $(NULL)
bin_PROGRAMS = \