From a3f4e79a9db1f04efd73f5d088e5b7423ac69630 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 4 Oct 2017 11:44:43 +0800 Subject: [PATCH] Makefile.am: Link libosmo-ranap against libosmo-sigtran In Change-Id I6a3f7ad15be03fb94689b4af6ccfa828c25f45c0 we introduced the somewhat arguable combination of Iu code in libosmo-ranap. This Iu code uses functions provided by libosmo-sigtran. However, at the time it was overlooked to explicitly link libosmo-ranap against libosmo-sigtran, which caused linking failures of programs using libosmo-ranap, such as the unit tests included in this package. Below example is from building using contrib/jenkins.sh on Ubuntu 17.04: CCLD test-ranap ../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_local_addr_by_instance' ../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_tx_unitdata_msg' ../../src/.libs/libosmo-ranap.so: undefined reference to `vty_out' ../../src/.libs/libosmo-ranap.so: undefined reference to `install_element' ../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_user_bind' ../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_user_sap_down' ../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_scu_prim_name' ../../src/.libs/libosmo-ranap.so: undefined reference to `osmo_sccp_addr_dump' collect2: error: ld returned 1 exit status Makefile:418: recipe for target 'test-ranap' failed Change-Id: Ibfbcafd31c91dc630d406ec39b3b076bdb1f4c19 --- src/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 48918b00..62f09e58 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,7 +52,8 @@ COMMON_LDADD = -lsctp RANAP_LIBVERSION=0:0:0 lib_LTLIBRARIES = libosmo-ranap.la libosmo_ranap_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(RANAP_LIBVERSION) -libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(ASN1C_LIBS) $(COMMON_LDADD) ranap/libosmo-asn1-ranap.la +libosmo_ranap_la_LIBADD = $(OSMOCORE_LIBS) $(OSMOGSM_LIBS) $(OSMOSIGTRAN_LIBS) \ + $(ASN1C_LIBS) $(COMMON_LDADD) ranap/libosmo-asn1-ranap.la libosmo_ranap_la_SOURCES = ranap_common.c ranap_encoder.c ranap_decoder.c ranap_msg_factory.c iu_helpers.c \ ranap_common_cn.c iu_client.c iu_client_vty.c