GNOME Bugzilla – Bug 780163
Compile problem with tarball, separate build dir and patched vteseq
Last modified: 2017-04-14 13:48:59 UTC
1) Get the vte-0.46.1 tarball; 2) Apply a patch that modifies vteseq-n.gperf, e.g. from bug 779734 comment 16; 3) Compile in a separate build directory (not in srcdir); 4) Start testvte; 5) Notice that the newly introduced escape sequence doesn't work. The tarball ships pregenerated vteseq-list.h and vteseq-n.cc files so that those building from a tarball don't have to have "gperf" installed. vteseq-n.gperf is modified and hence these two files are regenerated by "make", althouogh placed in a different build directory. vteseq.cc, however, includes their old versions from srcdir. Either the include path should be fixed so that it prefers the builddir location of these files, or this whole approach of pregenerating files for the tarball should be revised. (Are there potentially any more files effected by such an issue?) (Note: I cannot test with the 0.47.0 tarball due to bug 780162.)
I meant "I cannot test with the 0.47.90 tarball", obviously.
That's why in these kinds of scenarios, I also write the Makefile rule to generate file in srcdir. Eg, instead of: vteseq-n.cc: vteseq-n.gperf $(AM_V_GEN) $(top_srcdir)/missing --run gperf -m 100 $< > $@.tmp && \ mv -f $@.tmp $@ I write: $(srcdir)/vteseq-n.cc: vteseq-n.gperf $(AM_V_GEN) $(top_srcdir)/missing --run gperf -m 100 $< > $@.tmp && \ mv -f $@.tmp $@
How did you fix BTW?
(In reply to Behdad Esfahbod from comment #2) > That's why in these kinds of scenarios, I also write the Makefile rule to > generate file in srcdir. > > $(srcdir)/vteseq-n.cc: vteseq-n.gperf > [...] But it defeats the purpose of builddir, doesn't it? With a separate builddir, I'd expect the entire source tree to left unchanged by the build process.
(In reply to Behdad Esfahbod from comment #3) > How did you fix BTW? Search for the bug number in git log ;)
Actually it's both that comment and the preceding one: https://git.gnome.org/browse/vte/commit/?id=3e556b5 https://git.gnome.org/browse/vte/commit/?id=f078b6b Christian went for double safety: These files are no longer generated for the tarball, and the lookup order is also fixed.