[libvirt] [PATCH] src: Include $(builddir)/util in the header search path

Since a9fe620372144db, we are generating virkeymaps.h at build time; however, we are not including $(builddir)/util in the header search path, so when doing a VPATH build the compiler is unable to locate the file. make[2]: Entering directory `/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src' GEN util/virkeymaps.h ... CC util/libvirt_util_la-virkeycode.lo CC util/libvirt_util_la-virkeyfile.lo CC util/libvirt_util_la-virlockspace.lo CC util/libvirt_util_la-virlog.lo ../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory #include "virkeymaps.h" ^ compilation terminated. --- Tested by * running 'git clean -xdf' in the source directory * running './autogen.sh' * running 'make distclean' * making sure src/util/virkeymaps.h did not exist * moving to an empty build directory * running '../libvirt/configure' * running 'make check' * running 'make distcheck' This is another take on the problem Michal's trying to solve with https://www.redhat.com/archives/libvir-list/2015-October/msg00254.html The commit message is "inspired" by his ;) src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index e4660eb..01e816a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,6 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ + -I$(builddir)/util \ -DIN_LIBVIRT \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \ -- 2.4.3

On Thu, Oct 08, 2015 at 06:55:23PM +0200, Andrea Bolognani wrote:
Since a9fe620372144db, we are generating virkeymaps.h at build time; however, we are not including $(builddir)/util in the header search path, so when doing a VPATH build the compiler is unable to locate the file.
make[2]: Entering directory `/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src' GEN util/virkeymaps.h ... CC util/libvirt_util_la-virkeycode.lo CC util/libvirt_util_la-virkeyfile.lo CC util/libvirt_util_la-virlockspace.lo CC util/libvirt_util_la-virlog.lo ../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory #include "virkeymaps.h" ^ compilation terminated. --- Tested by
* running 'git clean -xdf' in the source directory * running './autogen.sh' * running 'make distclean' * making sure src/util/virkeymaps.h did not exist * moving to an empty build directory * running '../libvirt/configure' * running 'make check' * running 'make distcheck'
This is another take on the problem Michal's trying to solve with
https://www.redhat.com/archives/libvir-list/2015-October/msg00254.html
The commit message is "inspired" by his ;)
src/Makefile.am | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am index e4660eb..01e816a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,6 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ + -I$(builddir)/util \ -DIN_LIBVIRT \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
ACK Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Thu, 2015-10-08 at 18:12 +0100, Daniel P. Berrange wrote:
On Thu, Oct 08, 2015 at 06:55:23PM +0200, Andrea Bolognani wrote:
Since a9fe620372144db, we are generating virkeymaps.h at build time; however, we are not including $(builddir)/util in the header search path, so when doing a VPATH build the compiler is unable to locate the file.
make[2]: Entering directory `/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src' GEN util/virkeymaps.h ... CC util/libvirt_util_la-virkeycode.lo CC util/libvirt_util_la-virkeyfile.lo CC util/libvirt_util_la-virlockspace.lo CC util/libvirt_util_la-virlog.lo ../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory #include "virkeymaps.h" ^ compilation terminated. --- Tested by
* running 'git clean -xdf' in the source directory * running './autogen.sh' * running 'make distclean' * making sure src/util/virkeymaps.h did not exist * moving to an empty build directory * running '../libvirt/configure' * running 'make check' * running 'make distcheck'
This is another take on the problem Michal's trying to solve with
https://www.redhat.com/archives/libvir-list/2015-October/msg00254 .html
The commit message is "inspired" by his ;)
src/Makefile.am | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am index e4660eb..01e816a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,6 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ + -I$(builddir)/util \ -DIN_LIBVIRT \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
ACK
Pushed, thanks to both of you. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team

On Fri, Oct 09, 2015 at 09:41:48AM +0200, Andrea Bolognani wrote:
On Thu, 2015-10-08 at 18:12 +0100, Daniel P. Berrange wrote:
On Thu, Oct 08, 2015 at 06:55:23PM +0200, Andrea Bolognani wrote:
Since a9fe620372144db, we are generating virkeymaps.h at build time; however, we are not including $(builddir)/util in the header search path, so when doing a VPATH build the compiler is unable to locate the file.
make[2]: Entering directory `/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src' GEN util/virkeymaps.h ... CC util/libvirt_util_la-virkeycode.lo CC util/libvirt_util_la-virkeyfile.lo CC util/libvirt_util_la-virlockspace.lo CC util/libvirt_util_la-virlog.lo ../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory #include "virkeymaps.h" ^ compilation terminated. --- Tested by
* running 'git clean -xdf' in the source directory * running './autogen.sh' * running 'make distclean' * making sure src/util/virkeymaps.h did not exist * moving to an empty build directory * running '../libvirt/configure' * running 'make check' * running 'make distcheck'
This is another take on the problem Michal's trying to solve with
https://www.redhat.com/archives/libvir-list/2015-October/msg00254 .html
The commit message is "inspired" by his ;)
src/Makefile.am | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am index e4660eb..01e816a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,6 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ + -I$(builddir)/util \ -DIN_LIBVIRT \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
ACK
Pushed, thanks to both of you.
With this we could stop generating whole bunch of other stuff in $(srcdir) See output of `git grep -F '> $(srcdir)'` for details =)
Cheers.
-- Andrea Bolognani Software Engineer - Virtualization Team
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Fri, 2015-10-09 at 09:55 +0200, Martin Kletzander wrote:
With this we could stop generating whole bunch of other stuff in $(srcdir) See output of `git grep -F '> $(srcdir)'` for details =)
That would be very nice indeed! I'll look into it. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team

On Fri, Oct 09, 2015 at 09:41:48AM +0200, Andrea Bolognani wrote:
On Thu, 2015-10-08 at 18:12 +0100, Daniel P. Berrange wrote:
On Thu, Oct 08, 2015 at 06:55:23PM +0200, Andrea Bolognani wrote:
Since a9fe620372144db, we are generating virkeymaps.h at build time; however, we are not including $(builddir)/util in the header search path, so when doing a VPATH build the compiler is unable to locate the file.
make[2]: Entering directory `/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src' GEN util/virkeymaps.h ... CC util/libvirt_util_la-virkeycode.lo CC util/libvirt_util_la-virkeyfile.lo CC util/libvirt_util_la-virlockspace.lo CC util/libvirt_util_la-virlog.lo ../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory #include "virkeymaps.h" ^ compilation terminated. --- Tested by
* running 'git clean -xdf' in the source directory * running './autogen.sh' * running 'make distclean' * making sure src/util/virkeymaps.h did not exist * moving to an empty build directory * running '../libvirt/configure' * running 'make check' * running 'make distcheck'
This is another take on the problem Michal's trying to solve with
https://www.redhat.com/archives/libvir-list/2015-October/msg00254 .html
The commit message is "inspired" by his ;)
src/Makefile.am | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am index e4660eb..01e816a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,6 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ + -I$(builddir)/util
Oh, byt he way, builddir is not a variable here (and not even anywhere else I believe), it's basically just the CWD (or PWD if you like), so we might need to do this on top: diff --git i/src/Makefile.am w/src/Makefile.am index 01e816af88d1..d3fc29c03af6 100644 --- i/src/Makefile.am +++ w/src/Makefile.am @@ -31,7 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ - -I$(builddir)/util \ + -Iutil \ -DIN_LIBVIRT \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \ - Otherwise we'll end up like this: https://ci.centos.org/view/libvirt-project/job/libvirt-daemon-build/systems=... Martin

On Fri, 2015-10-09 at 10:15 +0200, Martin Kletzander wrote:
Oh, byt he way, builddir is not a variable here (and not even anywhere else I believe), it's basically just the CWD (or PWD if you like), so we might need to do this on top:
diff --git i/src/Makefile.am w/src/Makefile.am index 01e816af88d1..d3fc29c03af6 100644 --- i/src/Makefile.am +++ w/src/Makefile.am @@ -31,7 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ - -I$(builddir)/util \ + -Iutil \ -DIN_LIBVIRT \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
I used -I./util instead of -Iutil because it looks cleaner to me, but yeah, using $(builddir) is not good enough as older version of autoconf don't define it. I've just sent the patch after testing it on CentOS 5, please check it out. Cheers. -- Andrea Bolognani Software Engineer - Virtualization Team

On 08.10.2015 18:55, Andrea Bolognani wrote:
Since a9fe620372144db, we are generating virkeymaps.h at build time; however, we are not including $(builddir)/util in the header search path, so when doing a VPATH build the compiler is unable to locate the file.
make[2]: Entering directory `/home/jenkins/libvirt/systems/libvirt-fedora-20/build/src' GEN util/virkeymaps.h ... CC util/libvirt_util_la-virkeycode.lo CC util/libvirt_util_la-virkeyfile.lo CC util/libvirt_util_la-virlockspace.lo CC util/libvirt_util_la-virlog.lo ../../src/util/virkeycode.c:27:24: fatal error: virkeymaps.h: No such file or directory #include "virkeymaps.h" ^ compilation terminated. --- Tested by
* running 'git clean -xdf' in the source directory * running './autogen.sh' * running 'make distclean' * making sure src/util/virkeymaps.h did not exist * moving to an empty build directory * running '../libvirt/configure' * running 'make check' * running 'make distcheck'
This is another take on the problem Michal's trying to solve with
https://www.redhat.com/archives/libvir-list/2015-October/msg00254.html
The commit message is "inspired" by his ;)
src/Makefile.am | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/Makefile.am b/src/Makefile.am index e4660eb..01e816a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,6 +31,7 @@ INCLUDES = -I../gnulib/lib \ -I../include \ -I$(top_srcdir)/include \ -I$(srcdir)/util \ + -I$(builddir)/util \ -DIN_LIBVIRT \ -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \
ACK Michal
participants (4)
-
Andrea Bolognani
-
Daniel P. Berrange
-
Martin Kletzander
-
Michal Privoznik