From 9e0723fb6d1d35572254b46c4f089acb7a33f909 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 18 Jan 2017 09:13:43 +0100 Subject: build: Link -losmocore last to please Ubuntu linker It seems that the Ubuntu linker is quite picky in where it is looking for symbols. Link libosmocore (and as such talloc) last of the Osmocom libraries. This could fix: gcc -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -I/usr/include/ -DNO_UNIPORTE -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -o cellmgr_ng main.o mtp_layer3.o thread.o ipaccess.o pcap.o bss_patch.o bssap_sccp.o bsc_sccp.o bsc_ussd.o links.o msc_conn.o link_udp.o snmp_mtp.o debug.o isup.o mtp_link.o counter.o sccp_state.o bsc.o ss7_application.o vty_interface_legacy.o vty_interface_cmds.o mgcp_patch.o mgcp_callagent.o isup_filter.o -ltalloc -losmocore -ltalloc -losmogsm -losmocore -ltalloc -losmovty -losmocore -losmosccp -losmoxua -lpthread -lnetsnmp -lcrypto [ 79s] /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libosmosccp.so: undefined reference to `talloc_free' Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c --- src/Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 2052851..3a006f2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,8 +17,8 @@ cellmgr_ng_SOURCES = main.c mtp_layer3.c thread.c input/ipaccess.c pcap.c \ mtp_link.c counter.c sccp_state.c bsc.c ss7_application.c \ vty_interface_legacy.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c -cellmgr_ng_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +cellmgr_ng_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(LIBOSMOCORE_LIBS) $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto osmo_stp_SOURCES = main_stp.c mtp_layer3.c thread.c pcap.c link_udp.c snmp_mtp.c \ @@ -28,6 +28,6 @@ osmo_stp_SOURCES = main_stp.c mtp_layer3.c thread.c pcap.c link_udp.c snmp_mtp.c vty_interface.c vty_interface_cmds.c mgcp_patch.c \ mgcp_callagent.c isup_filter.c sctp_m3ua_client.c \ sctp_m3ua_misc.c -osmo_stp_LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ - $(LIBOSMOSCCP_LIBS) $(NEXUSWARE_C7_LIBS) \ +osmo_stp_LDADD = $(LIBOSMOSCCP_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) \ + $(LIBOSMOCORE_LIBS) $(NEXUSWARE_C7_LIBS) \ -lpthread -lnetsnmp -lcrypto -lxua -lsctp -- cgit v1.2.3