Pino Toscano
2014-Jan-21 09:56 UTC
[Libguestfs] [PATCH] builder: add index-struct.h as dependency for index-parser-c.c
Just like with index-parse.h, also index-struct.h is a dependency of index-parser-c.c which automake cannot generate correctly. Thus, add it manually. --- builder/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/Makefile.am b/builder/Makefile.am index fc4c552..6565abb 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -231,7 +231,7 @@ CLEANFILES += \ # Fix dependencies which automake doesn't generate correctly. if HAVE_OCAML -index-parser-c.o: index-parse.h +index-parser-c.o: index-parse.h index-struct.h index-scan.o: index-parse.h endif index-validate.o: index-parse.h -- 1.8.3.1
Richard W.M. Jones
2014-Jan-21 12:24 UTC
Re: [Libguestfs] [PATCH] builder: add index-struct.h as dependency for index-parser-c.c
On Tue, Jan 21, 2014 at 10:56:32AM +0100, Pino Toscano wrote:> Just like with index-parse.h, also index-struct.h is a dependency of > index-parser-c.c which automake cannot generate correctly. > Thus, add it manually. > --- > builder/Makefile.am | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/builder/Makefile.am b/builder/Makefile.am > index fc4c552..6565abb 100644 > --- a/builder/Makefile.am > +++ b/builder/Makefile.am > @@ -231,7 +231,7 @@ CLEANFILES += \ > > # Fix dependencies which automake doesn't generate correctly. > if HAVE_OCAML > -index-parser-c.o: index-parse.h > +index-parser-c.o: index-parse.h index-struct.h > index-scan.o: index-parse.h > endif > index-validate.o: index-parse.hBecause index-parser-c.c #includes index-struct.h, ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Richard W.M. Jones
2014-Feb-16 22:32 UTC
Re: [Libguestfs] [PATCH] builder: add index-struct.h as dependency for index-parser-c.c
BTW, although there is nothing wrong with this patch, it doesn't seem to completely resolve the problem. It looks like there could be another missing dependency. When I did: make distclean && ./configure && make -j5 the build failed as below (not always reproducible). As you can see 'index-parse.h' is "updating" some time after it is used. ---------------------------------------------------------------------- make[2]: Leaving directory `/home/rjones/d/libguestfs/mllib' Making all in builder make[2]: Entering directory `/home/rjones/d/libguestfs/builder' rm -f .depend .depend-t ocamlfind ocamldep -I ../ocaml -I /home/rjones/d/libguestfs/builder -I ../mllib /home/rjones/d/libguestfs/builder/downloader.mli /home/rjones/d/libguestfs/builder/setlocale.mli /home/rjones/d/libguestfs/builder/get_kernel.mli /home/rjones/d/libguestfs/builder/sigchecker.mli /home/rjones/d/libguestfs/builder/list_entries.mli /home/rjones/d/libguestfs/builder/index_parser.mli /home/rjones/d/libguestfs/builder/pxzcat.mli /home/rjones/d/libguestfs/builder/cmdline.ml /home/rjones/d/libguestfs/builder/downloader.ml /home/rjones/d/libguestfs/builder/setlocale.ml /home/rjones/d/libguestfs/builder/get_kernel.ml /home/rjones/d/libguestfs/builder/sigchecker.ml /home/rjones/d/libguestfs/builder/list_entries.ml /home/rjones/d/libguestfs/builder/index_parser.ml /home/rjones/d/libguestfs/builder/pxzcat.ml /home/rjones/d/libguestfs/builder/builder.ml | \ /usr/bin/sed 's/ *$//' | \ /usr/bin/sed -e :a -e '/ *\\$/N; s/ *\\\n */ /; ta' | \ /usr/bin/sed -e 's,/home/rjones/d/libguestfs/builder/,./,g' | \ sort > .depend-t mv .depend-t .depend make[2]: Leaving directory `/home/rjones/d/libguestfs/builder' make[2]: Entering directory `/home/rjones/d/libguestfs/builder' YACC index-parse.c LEX index-scan.c CC virt_index_validate-index-struct.o CC virt_index_validate-index-validate.o CC index-struct.o ocamlfind ocamlc -g -warn-error CDEFLMPSUVYZX -package str,unix -I ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c pxzcat.mli -o pxzcat.cmi CC pxzcat-c.o CC setlocale-c.o ocamlfind ocamlc -g -warn-error CDEFLMPSUVYZX -package str,unix -I ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c setlocale.mli -o setlocale.cmi index-validate.c:34:25: fatal error: index-parse.h: No such file or directory #include "index-parse.h" ^ compilation terminated. ocamlfind ocamlc -g -warn-error CDEFLMPSUVYZX -package str,unix -I ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c get_kernel.mli -o get_kernel.cmi ocamlfind ocamlc -g -warn-error CDEFLMPSUVYZX -package str,unix -I ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c downloader.mli -o downloader.cmi ocamlfind ocamlc -g -warn-error CDEFLMPSUVYZX -package str,unix -I ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c sigchecker.mli -o sigchecker.cmi perl /home/rjones/d/libguestfs/podwrapper.pl \ --man virt-builder.1 \ --html ../html/virt-builder.1.html \ --license GPLv2+ \ virt-builder.pod perl /home/rjones/d/libguestfs/podwrapper.pl \ --man virt-index-validate.1 \ --html ../html/virt-index-validate.1.html \ --license GPLv2+ \ virt-index-validate.pod make[2]: *** [virt_index_validate-index-validate.o] Error 1 make[2]: *** Waiting for unfinished jobs.... updating index-parse.h podwrapper.pl: wrote virt-index-validate.1 podwrapper.pl: wrote ../html/virt-index-validate.1.html touch stamp-virt-index-validate.pod podwrapper.pl: wrote virt-builder.1 podwrapper.pl: wrote ../html/virt-builder.1.html touch stamp-virt-builder.pod make[2]: Leaving directory `/home/rjones/d/libguestfs/builder' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/rjones/d/libguestfs' make: *** [all] Error 2 ---------------------------------------------------------------------- Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Pino Toscano
2014-Feb-17 10:29 UTC
Re: [Libguestfs] [PATCH] builder: add index-struct.h as dependency for index-parser-c.c
On Sunday 16 February 2014 22:32:52 Richard W.M. Jones wrote:> BTW, although there is nothing wrong with this patch, it doesn't seem > to completely resolve the problem. It looks like there could be > another missing dependency. > > When I did: > > make distclean && ./configure && make -j5 > > the build failed as below (not always reproducible). As you can see > 'index-parse.h' is "updating" some time after it is used. > [...] > make[2]: Entering directory `/home/rjones/d/libguestfs/builder' > YACC index-parse.c > LEX index-scan.c > CC virt_index_validate-index-struct.o > CC virt_index_validate-index-validate.o > CC index-struct.o > ocamlfind ocamlc -g -warn-error CDEFLMPSUVYZX -package str,unix -I > ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c > pxzcat.mli -o pxzcat.cmi CC pxzcat-c.o > CC setlocale-c.o > ocamlfind ocamlc -g -warn-error CDEFLMPSUVYZX -package str,unix -I > ../src/.libs -I ../ocaml -I ../mllib -package gettext-stub -c > setlocale.mli -o setlocale.cmi index-validate.c:34:25: fatal error: > index-parse.h: No such file or directory #include "index-parse.h" > ^ > compilation terminated. > [...] > make[2]: *** [virt_index_validate-index-validate.o] Error 1 > make[2]: *** Waiting for unfinished jobs....I see. While I don't have a deep knowledge of it, my guess would be the way automake 1.14 handles outputs for different targets in the same build directory. As you can see, it prefixes them by the target name, so our custom rules won't apply basically. Curiously, I hit that last weekend when rebuilding on my Debian testing (which has automake 1.14, unlike my current F19 which has 1.13), but didn't have the occasion to debug it yet. -- Pino Toscano
Possibly Parallel Threads
- Re: enable build for ocaml bytecode
- [PATCH 1/2] mllib: add an hook to cleanup directories on exit
- [PATCH v2 0/6] Fix OCaml dependencies.
- [PATCH 2/3] Convert source so it can be compiled with OCaml '-safe-string' option.
- [libnbd PATCH] build: Fix OCaml build on Fedora 29