[ovs-dev] [PATCH ovn] test/ovstest: fix shared library deps.

amginwal at gmail.com amginwal at gmail.com
Mon May 18 08:04:09 UTC 2020


From: Aliasgar Ginwala <aginwala at ebay.com>

When using --enable-shared for configure, make fails with error
lib/.libs/libovn.so: undefined reference to `set_pidfile'
collect2: error: ld returned 1 exit status
Makefile:1616: recipe for target 'tests/ovstest' failed
make[1]: *** [tests/ovstest] Error 1
make[1]: Leaving directory '/ovn'
Makefile:1283: recipe for target 'all' failed
make: *** [all] Error 2

Because commit 94cb7648d8c32246ac0bed61484e2e27332ed68c started using
daemon.h for setting set_pidfile. Hence, need to link the same for ovstest to avoid failure.

It also fixes current CI failing on master for:
TESTSUITE=1 OPTS="--enable-shared"

Signed-off-by: Aliasgar Ginwala <aginwala at ebay.com>
---
 .travis.yml       | 2 +-
 tests/automake.mk | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index cd853fddd..7b8bfc36c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -44,4 +44,4 @@ script: ./.travis/${TRAVIS_OS_NAME}-build.sh $OPTS
 notifications:
   email:
     recipients:
-      - ovs-build at openvswitch.org
+      - aginwala at asu.edu
diff --git a/tests/automake.mk b/tests/automake.mk
index 3d39a8ac2..26b6d11b4 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -202,7 +202,8 @@ tests_ovstest_SOURCES = \
 	tests/ovstest.h \
 	tests/test-ovn.c
 
-tests_ovstest_LDADD = $(OVS_LIBDIR)/libopenvswitch.la lib/libovn.la
+tests_ovstest_LDADD = $(OVS_LIBDIR)/daemon.lo \
+    $(OVS_LIBDIR)/libopenvswitch.la lib/libovn.la
 
 # Python tests.
 CHECK_PYFILES = \
-- 
2.26.2



More information about the dev mailing list