[PATCH] tests: add FreeBSD dependencies
Roman Bogorodskiy
bogorodskiy at gmail.com
Thu Sep 3 11:21:51 UTC 2020
Daniel P. Berrangé wrote:
> On Thu, Sep 03, 2020 at 02:52:41PM +0400, Roman Bogorodskiy wrote:
> > Daniel P. Berrangé wrote:
> >
> > > On Thu, Sep 03, 2020 at 02:21:37PM +0400, Roman Bogorodskiy wrote:
> > > > Add some FreeBSD-specific libraries (-lutil, -lkvm) to tests dependencies.
> > > >
> > > > Without that, FreeBSD 11.x, which uses the GNU ld, fails to link tests.
> > > > Interestingly, newer FreeBSD versions that use LLVM ld tolerate this
> > > > behaviour and builds successfully as is.
> > >
> > > Hmm, we need a CI job for FreeBSD 11 added
> > >
> > > Cirrus supports FreeBSD 11.4 so ought to be possible to add it to our
> > > matrix.
> > >
> > > >
> > > > Signed-off-by: Roman Bogorodskiy <bogorodskiy at gmail.com>
> > > > ---
> > > > tests/meson.build | 2 ++
> > > > 1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/tests/meson.build b/tests/meson.build
> > > > index ad13e2de60..ea2458efbc 100644
> > > > --- a/tests/meson.build
> > > > +++ b/tests/meson.build
> > > > @@ -10,11 +10,13 @@ tests_dep = declare_dependency(
> > > > dlopen_dep,
> > > > glib_dep,
> > > > gnutls_dep,
> > > > + kvm_dep,
> > >
> > > Makes sense, as we don't reference kvm_dep anywhere.
> > >
> > > > libnl_dep,
> > > > libxml_dep,
> > > > rpc_dep,
> > > > sasl_dep,
> > > > selinux_dep,
> > > > + util_dep,
> > >
> > > In the top level meson.build, we appear to add -lutil as a linker
> > > arg to the entire project, so i'm surprised this was needed.
> >
> > -lutil was actually the first issue spotted, and when fixed, -lkvm
> > showed up.
> >
> > Here's the original report I got:
> >
> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=249056
> >
> > It contains some initial thoughts on this issue; there I also assumed
> > that add_global_link_arguments() could fix the issue, but was satisfied
> > with the current solution.
>
> Hmm, this is all very strange if I'm reading the the
> add_project_link_arguments doc correctly it should apply to everything
> we have. The difference between add_project and add_global is just
> about meson subprojects, but the tests are in our main project.
>
> If add_project_link_arguments isn't working as we expect, we might be
> better removing its use entirely in favour of explicitly adding the
> _deps objects in the particular places they are needed.
I've just tried this change:
--- meson.build.orig 2020-09-03 11:14:20.233605000 +0000
+++ meson.build 2020-09-03 11:14:43.661313000 +0000
@@ -1405,7 +1405,7 @@
util_dep = cc.find_library('util', required: false)
if util_dep.found()
- add_project_link_arguments('-lutil', language: 'c')
+ add_global_link_arguments('-lutil', language: 'c')
endif
if not get_option('virtualport').disabled()
It doesn't work, the build is still failing with it.
>
>
> Regards,
> Daniel
> --
> |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org -o- https://fstop138.berrange.com :|
> |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
>
Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20200903/473dfaed/attachment-0001.sig>
More information about the libvir-list
mailing list