GNOME Bugzilla – Bug 570322
pangomm fails to build outside source tree
Last modified: 2009-03-09 11:51:25 UTC
When building pangomm outside source tree, following error was found: - In docs/reference/, doxygen fails to build HTML doc, because pangomm_header.html_fragment is missing: ---8<--- make[3]: Entering directory `/home/thep/build/gnome_svn/pangomm/docs/reference' rm -rf html doxygen Doxyfile \ 2> doxygen-warnings.txt | tee doxygen-output.txt && cat doxygen-warnings.txt Warning: Tag `USE_WINDOWS_ENCODING' at line 11 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `MAX_DOT_GRAPH_WIDTH' at line 239 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `MAX_DOT_GRAPH_HEIGHT' at line 240 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Error: tag HTML_HEADER: header file `pangomm_header.html_fragment' does not exist cd html && ./installdox -l glibmm_doxygen_tags@../../../../glibmm-2.4/docs/reference/html \ 2>> doxygen-warnings.txt | tee -a doxygen-output.txt && cd .. /bin/sh: line 0: cd: html: No such file or directory make[3]: *** [html/index.html] Error 1 make[3]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs/reference' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/thep/build/gnome_svn/pangomm' make: *** [all] Error 2 ---8<--- The files 'pangomm_{header,footer}.html_fragment' are in $srcdir, which is different from $builddir for non-source-dir builds. And their paths are missing in Doxyfile. - In the same subdir, pangomm-1.4.devhelp generation fails, with complaint that "doxygen_to_devhelp.xsl" is missing: ---8<--- make[3]: Entering directory `/home/thep/build/gnome_svn/pangomm/docs/reference' make[3]: Nothing to be done for `install-exec-am'. xsltproc -o pangomm-1.4.devhelp doxygen_to_devhelp.xsl xml/index.xml warning: failed to load external entity "doxygen_to_devhelp.xsl" cannot parse doxygen_to_devhelp.xsl make[3]: *** [pangomm-1.4.devhelp] Error 4 make[3]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs/reference' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs/reference' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs' make: *** [install-recursive] Error 1 ---8<--- Again, the file is located in $srcdir. So the path is just missing here. - With errors above fixed, 'make install' still fails in docs/reference/, because pangomm-1.4.devhelp is not found again: ---8<--- /home/thep/bin/install-check -m 644 /home/thep/vcs/gnome_svn/pangomm/docs/reference/pangomm-1.4.devhelp /home/gnome2/share/devhelp/books/pangomm-1.4/$f; /usr/bin/install: cannot stat `/home/thep/vcs/gnome_svn/pangomm/docs/reference/pangomm-1.4.devhelp': No such file or directory make[3]: *** [install-reference] Error 1 make[3]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs/reference' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs/reference' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/home/thep/build/gnome_svn/pangomm/docs' make: *** [install-recursive] Error 1 ---8<--- This is under the 'install-reference:' target. It tries to install the devhelp file from $srcdir (/home/thep/vcs/gnome_svn/pangomm/... for my case above), not from $builddir where it's generated. (See also Bug #570216 for similar report against glibmm.)
Created attachment 127812 [details] [review] Summarized fixes This patch summarizes all the fixes, which make the build successful on my machine.
Created attachment 127836 [details] [review] $(top_builddir) instead of $(builddir) Use $(top_builddir), as some automake versions do not provide $(builddir), e.g. Bug #570357.
Created attachment 127856 [details] [review] without builddir Better yet, the built file is already at current dir. Just remove the path.
Committed. Thanks. Please patch the ChangeLog too in future.
This seems to have broken distcheck. I had to add one srcdir back so that the install of the devhelp file works. You might want to check if the build still works for you.
It still builds for me. But I doubt if the fix is appropriate. ---8<--- @@ -1,7 +1,7 @@ doxygen_configfile = Doxyfile doxygen_configfile_source = $(srcdir)/Doxyfile.in beautify_docs = @GMMPROC_DIR@/beautify_docs.pl -devhelp_file = pangomm-1.4.devhelp +devhelp_file = $(srcdir)/pangomm-1.4.devhelp devhelp_stylesheet = doxygen_to_devhelp.xsl include $(top_srcdir)/docs/Makefile_web.am_fragment ---8<--- $(devhelp_file) is also used in uninstall-reference target: ---8<--- rm -f $(DESTDIR)$(devhelpdir)/$(devhelp_file) ---8<--- So, when I invoke "make uninstall" on my system, this line becomes: ---8<--- rm -f /home/gnome2/share/devhelp/books/pangomm-1.4//home/thep/vcs/gnome_svn/pangomm/docs/reference/pangomm-1.4.devhelp ---8<--- with $(srcdir) expanded to the source dir path, which is plain wrong, because the file is not actually uninstalled, even though make doesn't fail (thanks to the -f option).
OK. Could you try to correct it, please?
Created attachment 130322 [details] [review] distcheck fix, by splitting make rule OK. The problem here is that the generated devhelp file is shipped with the tarball, while VCS doesn't include it. So, we need to refer to the file through VPATH, so both kinds of builds are possible: using the file from $(srcdir) for tarball builds, and from $(builddir) for VCS builds. So, I split the devhelp installation rule out of the html one, so '$<' canbe used. With this, I also remove the weird '/$$f' at the end of some $(INSTALL_DATA) lines. The $$f is actually undefined here. Obviously left over from cut-and-paste from the html loop body.
Committed. Thanks.