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

Numan Siddique numans at ovn.org
Mon May 18 09:06:21 UTC 2020


On Mon, May 18, 2020 at 1:37 PM <amginwal at gmail.com> wrote:

> 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>
>

Thanks Aliasgar for the fix. I applied this patch to master.

I was aware of the CI failure. Locally I was able to reproduce this issue
by configuring ovs without --shared and ovn with --shared. With ovs
configured
with --shared, the issue is not seen.

So I was thinking that we need to fix this in Travis CI by configuring ovs
with "--shared"
which is presently not the case.

But your patch fixes the issues and the CI is green. That's great.

Thanks
Numan

---
>  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
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>


More information about the dev mailing list