[PATCH] libosmocore[master]: tests: fix LDADD: link libosmovty from current build

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/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Jan 19 00:17:13 UTC 2018


Hello Max, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/5844

to look at the new patch set (#3).

tests: fix LDADD: link libosmovty from current build

Do not link against the system-wide installed libosmovty during build. Instead,
use the locally built one: add libosmovty.la to LDADD explicitly.

It might be more accurate to add this linking only to those tests that really
require it, but on the one hand ctrl_test (which raises an error) doesn't even
seem to use libosmovty, and on the other hand I don't want to spend time
analysing each and every test for which libs it links now. I am being lazy and
find it sufficient that the tests still work after linking libosmovty to all of
them.

I got:

  /usr/local/lib/libosmovty.so.4: undefined reference to `log_set_print_basename'
  collect2: error: ld returned 1 exit status
  Makefile:964: recipe for target 'ctrl/ctrl_test' failed

because a system installation of libosmovty was from a branch with a new symbol
expected present in libosmocore.la (log_set_print_basename), followed by a
build of current master which lacks that symbol.

Change-Id: Id084e6e6efd25cd62b1bd7a4fc7c5985c39130c6
---
M tests/Makefile.am
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/5844/3

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 877a302..e6cbd4c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,7 +1,9 @@
 AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
 AM_CFLAGS = -Wall $(TALLOC_CFLAGS)
 AM_LDFLAGS =
-LDADD = $(top_builddir)/src/libosmocore.la $(TALLOC_LIBS)
+LDADD = $(top_builddir)/src/libosmocore.la \
+	$(top_builddir)/src/vty/libosmovty.la \
+	$(TALLOC_LIBS)
 
 check_PROGRAMS = timer/timer_test sms/sms_test ussd/ussd_test		\
                  smscb/smscb_test bits/bitrev_test a5/a5_test		\
@@ -146,7 +148,6 @@
 strrb_strrb_test_SOURCES = strrb/strrb_test.c
 
 vty_vty_test_SOURCES = vty/vty_test.c
-vty_vty_test_LDADD = $(LDADD) $(top_builddir)/src/vty/libosmovty.la
 
 sim_sim_test_SOURCES = sim/sim_test.c
 sim_sim_test_LDADD = $(LDADD) $(top_builddir)/src/sim/libosmosim.la \

-- 
To view, visit https://gerrit.osmocom.org/5844
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id084e6e6efd25cd62b1bd7a4fc7c5985c39130c6
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list