diff mbox series

[OSSTEST,1/2] ts-libvirt-build: Provide PKG_CONFIG_PATH

Message ID 20191112120913.25864-1-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series [OSSTEST,1/2] ts-libvirt-build: Provide PKG_CONFIG_PATH | expand

Commit Message

Ian Jackson Nov. 12, 2019, 12:09 p.m. UTC
In osstest we do not install the xen tree in /usr/local because the
build environment is shared with many different build jobs which might
be using different versions of Xen.  We put it in a job-specific
directory in ~osstest on the build host, and set environment variables
to ensure that it all gets picked up.

Recent versions of libvirt insist on finding xenlight.pc; otherwise
they disable libxl support.  So we must add a PKG_CONFIG_PATH setting.

(In all cases, contrary to the usual protocol for path-like variables,
we do not append but instead simply set the variable.  This is OK
because this is an osstest build script run via ssh to the build host,
so the variables won't have been set already.)

CC: Jim Fehlig <jfehlig@suse.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 ts-libvirt-build | 1 +
 1 file changed, 1 insertion(+)

Comments

Jim Fehlig Nov. 12, 2019, 3:40 p.m. UTC | #1
On 11/12/19 5:09 AM, Ian Jackson wrote:
> In osstest we do not install the xen tree in /usr/local because the
> build environment is shared with many different build jobs which might
> be using different versions of Xen.  We put it in a job-specific
> directory in ~osstest on the build host, and set environment variables
> to ensure that it all gets picked up.
> 
> Recent versions of libvirt insist on finding xenlight.pc; otherwise
> they disable libxl support.  So we must add a PKG_CONFIG_PATH setting.

Sorry. There was a hack to workaround a fedora 28 bug, but now that it is EOL 
the hack was removed

https://libvirt.org/git/?p=libvirt.git;a=commit;h=18981877d2e20390a79d068861a24e716f8ee422

> (In all cases, contrary to the usual protocol for path-like variables,
> we do not append but instead simply set the variable.  This is OK
> because this is an osstest build script run via ssh to the build host,
> so the variables won't have been set already.)
> 
> CC: Jim Fehlig <jfehlig@suse.com>
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
>   ts-libvirt-build | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/ts-libvirt-build b/ts-libvirt-build
> index bc08190a..2a363f43 100755
> --- a/ts-libvirt-build
> +++ b/ts-libvirt-build
> @@ -60,6 +60,7 @@ sub config() {
>           cd libvirt
>           CFLAGS="-g -I$xenprefix/include/" \\
>           LDFLAGS="-g -L$xenprefix/lib/ -Wl,-rpath-link=$xenprefix/lib/" \\
> +        PKG_CONFIG_PATH="$xenprefix/lib/pkgconfig/" \\
>           GNULIB_SRCDIR=$builddir/libvirt/$gnulib->{Path} \\
>               ./autogen.sh --no-git \\
>                            --with-libxl --without-xen --without-xenapi --without-selinux \\

Unrelated, but the legacy xen and xenapi drivers have been removed so the 
--without-{xen,xenapi} options could be dropped.

Regards,
Jim
Ian Jackson Nov. 12, 2019, 3:52 p.m. UTC | #2
Jim Fehlig writes ("Re: [OSSTEST PATCH 1/2] ts-libvirt-build: Provide PKG_CONFIG_PATH"):
> On 11/12/19 5:09 AM, Ian Jackson wrote:
> > +        PKG_CONFIG_PATH="$xenprefix/lib/pkgconfig/" \\
> >           GNULIB_SRCDIR=$builddir/libvirt/$gnulib->{Path} \\
> >               ./autogen.sh --no-git \\
> >                            --with-libxl --without-xen --without-xenapi --without-selinux \\
> 
> Unrelated, but the legacy xen and xenapi drivers have been removed so the 
> --without-{xen,xenapi} options could be dropped.

Thanks for the review.  I think we should consider that for post Xen
freeze.  I did notice the warning messages but I thought leaving
--without-unknown-thing would be OK, and it did indeed build.

Thanks,
Ian.
diff mbox series

Patch

diff --git a/ts-libvirt-build b/ts-libvirt-build
index bc08190a..2a363f43 100755
--- a/ts-libvirt-build
+++ b/ts-libvirt-build
@@ -60,6 +60,7 @@  sub config() {
         cd libvirt
         CFLAGS="-g -I$xenprefix/include/" \\
         LDFLAGS="-g -L$xenprefix/lib/ -Wl,-rpath-link=$xenprefix/lib/" \\
+        PKG_CONFIG_PATH="$xenprefix/lib/pkgconfig/" \\
         GNULIB_SRCDIR=$builddir/libvirt/$gnulib->{Path} \\
             ./autogen.sh --no-git \\
                          --with-libxl --without-xen --without-xenapi --without-selinux \\