On Mon, Nov 21, 2022 at 06:17:08PM +0700, Vadim Yanitskiy wrote:
there's actually two binaries generated during the
build process:
* tests/libosmo-pfcp/.libs/pfcp_test (generated by `make`)
* tests/libosmo-pfcp/.libs/lt-pfcp_test (generated by `make check`)
Curious, I see only the one, only pfcp_test, no lt-pfcp_test here.
On Mon, Nov 21, 2022 at 12:38:08PM +0100, Oliver Smith wrote:
Hi Neels,
On 21.11.22 01:00, Neels Hofmeyr wrote:
I try to accomplish this by:
pfcp_test_LDADD = \
$(LIBOSMOCORE_LIBS) \
$(top_builddir)/src/libosmo-pfcp/libosmo-pfcp.la \
$(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la \
$(NULL)
Not tested, but I wonder if it works if you move libosmo-pfcp.la before
$(LIBOSMOCORE_LIBS). I just saw it like that in an osmo-bsc test.
Actually indeed yes that helps -- but WHY!?!?!?!?
how does the position of LIBOSMOCORE_LIBS make a difference for the loading
source for other libs?
Here's a diff of the relevant parts of the build tree before moving
LIBOSMOCORE_LIBS down and after, weird how that LD_LIBRARY_PATH suddenly moves
/usr/local/lib to the last position. Must be some deliberate magic.
Binary files saved_libosmo-pfcp/tests/libosmo-pfcp/.libs/pfcp_test and
libosmo-pfcp/tests/libosmo-pfcp/.libs/pfcp_test differ
diff -u -r saved_libosmo-pfcp/tests/libosmo-pfcp/Makefile
libosmo-pfcp/tests/libosmo-pfcp/Makefile
--- saved_libosmo-pfcp/tests/libosmo-pfcp/Makefile 2022-11-21 12:41:49.057361923 +0100
+++ libosmo-pfcp/tests/libosmo-pfcp/Makefile 2022-11-21 12:42:34.197397597 +0100
@@ -106,9 +106,10 @@
am_pfcp_test_OBJECTS = pfcp_test.$(OBJEXT)
pfcp_test_OBJECTS = $(am_pfcp_test_OBJECTS)
am__DEPENDENCIES_1 =
-pfcp_test_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+pfcp_test_DEPENDENCIES = \
$(top_builddir)/src/libosmo-pfcp/libosmo-pfcp.la \
- $(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la
+ $(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la \
+ $(am__DEPENDENCIES_1)
AM_V_lt = $(am__v_lt_$(V))
am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
am__v_lt_0 = --silent
@@ -320,9 +321,9 @@
$(NULL)
pfcp_test_LDADD = \
- $(LIBOSMOCORE_LIBS) \
$(top_builddir)/src/libosmo-pfcp/libosmo-pfcp.la \
$(top_builddir)/src/libosmo-gtlv/libosmo-gtlv.la \
+ $(LIBOSMOCORE_LIBS) \
$(NULL)
all: all-am
diff -u -r saved_libosmo-pfcp/tests/libosmo-pfcp/pfcp_test
libosmo-pfcp/tests/libosmo-pfcp/pfcp_test
--- saved_libosmo-pfcp/tests/libosmo-pfcp/pfcp_test 2022-11-21 12:41:51.533363886 +0100
+++ libosmo-pfcp/tests/libosmo-pfcp/pfcp_test 2022-11-21 12:42:34.417397771 +0100
@@ -188,7 +188,7 @@
if test -f "$progdir/$program"; then
# Add our own library path to LD_LIBRARY_PATH
-
LD_LIBRARY_PATH="/usr/local/lib:/home/old/osmo-dev/make/libosmo-pfcp/src/libosmo-pfcp/.libs:/home/old/osmo-dev/make/libosmo-pfcp/src/libosmo-gtlv/.libs:$LD_LIBRARY_PATH"
+
LD_LIBRARY_PATH="/home/old/osmo-dev/make/libosmo-pfcp/src/libosmo-pfcp/.libs:/home/old/osmo-dev/make/libosmo-pfcp/src/libosmo-gtlv/.libs:/usr/local/lib:$LD_LIBRARY_PATH"
# Some systems cannot cope with colon-terminated LD_LIBRARY_PATH
# The second colon is a workaround for a bug in BeOS R4 sed
Thanks for your help everyone!
~N