From: Aliasgar Ginwala <aginw...@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 <aginw...@ebay.com>
---
 tests/automake.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to