[PATCH 2/5] build: resolve link failure in libosmogsm when --disable-talloc is used

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Jan Engelhardt jengelh at inai.de
Thu Oct 2 21:09:07 UTC 2014


The link stage fails at some point. libosmogsm.so:lapd-core.c uses
talloc_free, but does not link to libtalloc.so. Correct this.

	   CCLD     osmo-arfcn
	../src/gsm/.libs/libosmogsm.so: undefined reference to `talloc_free'
	collect2: error: ld returned 1 exit status
	make[2]: *** [osmo-arfcn] Error 1
---
 src/gsm/Makefile.am | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index 4207959..df72bf7 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -23,5 +23,8 @@ libosmogsm_la_SOURCES = a5.c rxlev_stat.c tlv_parser.c comp128.c comp128v23.c \
 
 libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION) -no-undefined
 libosmogsm_la_LIBADD = $(top_builddir)/src/libosmocore.la
+if !ENABLE_TALLOC
+libosmogsm_la_LIBDADD = -ltalloc
+endif
 
 EXTRA_DIST = libosmogsm.map
-- 
2.0.0





More information about the OpenBSC mailing list