[PATCH 5/5] build: fix linker error with kasumi_test

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:10 UTC 2014


When the osmocore package is configured with --disable-static,
building of kasumi_test fails. This seems quite legit, given
the function _kasumi_kgcore is not exported.
Don't try to workaround the build system. Include the code.

  CCLD     kasumi/kasumi_test
kasumi_test.o: In function `test_expansion':
~tests/kasumi/kasumi_test.c:25: undefined reference to `_kasumi_key_expand'
kasumi_test.o: In function `main':
~tests/kasumi/kasumi_test.c:56: undefined reference to `_kasumi'
~tests/kasumi/kasumi_test.c:100: undefined reference to `_kasumi_key_expand'
~tests/kasumi/kasumi_test.c:112: undefined reference to `_kasumi_kgcore'
[...]
---
 tests/Makefile.am | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8779c4f..3f7db1f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -20,9 +20,8 @@ utils_utils_test_LDADD = $(top_builddir)/src/libosmocore.la
 a5_a5_test_SOURCES = a5/a5_test.c
 a5_a5_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la
 
-kasumi_kasumi_test_SOURCES = kasumi/kasumi_test.c
+kasumi_kasumi_test_SOURCES = kasumi/kasumi_test.c ../src/gsm/kasumi.c
 kasumi_kasumi_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la
-kasumi_kasumi_test_LDFLAGS = -static
 
 comp128_comp128_test_SOURCES = comp128/comp128_test.c
 comp128_comp128_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gsm/libosmogsm.la
-- 
2.0.0





More information about the OpenBSC mailing list