Andrei G has uploaded this change for review.

View Change

gsupclient: add LIBOSMOGSM_LIBS to LIBADD

libosmo-gsup-client calls osmo_gsup_*, osmo_oap_client_* and
osmo_imsi_str_valid(), all exported by libosmogsm, but
libosmo_gsup_client_la_LIBADD in src/gsupclient/Makefile.am lists only
talloc, libosmocore and libosmoabis.

GNU ld accepts undefined symbols in a shared library and defers them to
whatever the executable happens to pull in, so the missing dependency is
invisible on Linux. Darwin's ld64 refuses at link time and the library
fails to build with "symbol(s) not found for architecture arm64".

The same Makefile.am already passes -no-undefined in LDFLAGS, which is
the promise that the library resolves its own symbols. Adding
LIBOSMOGSM_LIBS is what makes that promise true.

With the fix, otool -L on the resulting libosmo-gsup-client.dylib lists
libosmogsm among its dependencies, and the osmo_gsup_* references
resolve through it.

Change-Id: I413ff47aa1e8034ea86c61134d3d6784942b0e3b
Signed-off-by: Andrei Gosman <andrei.gosman@gmail.com>
---
M src/gsupclient/Makefile.am
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/78/43578/1
diff --git a/src/gsupclient/Makefile.am b/src/gsupclient/Makefile.am
index 7611f6e..89533f4 100644
--- a/src/gsupclient/Makefile.am
+++ b/src/gsupclient/Makefile.am
@@ -16,7 +16,7 @@
$(NULL)

libosmo_gsup_client_la_LDFLAGS = -version-info $(LIBVERSION) -no-undefined
-libosmo_gsup_client_la_LIBADD = $(TALLOC_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOABIS_LIBS)
+libosmo_gsup_client_la_LIBADD = $(TALLOC_LIBS) $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOABIS_LIBS)

noinst_PROGRAMS = gsup-test-client


To view, visit change 43578. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I413ff47aa1e8034ea86c61134d3d6784942b0e3b
Gerrit-Change-Number: 43578
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman@gmail.com>