GNOME Bugzilla – Bug 757174
FTBFS: /tmp/buildd/gnucash-docs-2.6.7/mincho.xml (No such file or directory)
Last modified: 2018-06-29 23:44:10 UTC
Created attachment 314206 [details] [review] patch As reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802071 gnucash-docs FTBFS with the following error: [ERROR] LazyFont - Failed to read font metrics file mincho.xml <java.io.FileNotFoundException: /gnucash-docs-2.6.7/mincho.xml (No such file or directory)>java.io.FileNotFoundException: /gnucash-docs-2.6.7/mincho.xml (No such file or directory) The attached patch fixes the problem. Thanks.
The configure script finds the best version of mincho.xml (the one in fonts is a fallback if the appropriate font package isn't installed) and copies it to guide/ja, and make should use it from there. This works correctly on Debian Jessie, so you'll have to investigate why it doesn't work in your jenkins setup. Note that the stable build is also failing, but for a different reason.
Build was failing in clean "testing" and "unstable" suites on Debian probably due to update of "fop" (and/or other dependencies). Jenkins setup is irrelevant.
OK, but it's your job to resolve that "probably" into "definitely" and tell me exactly what the problem is so that I can design a correct fix. Since it works in Debian's (and Red Hat's, and Ubuntu's, and, and, and,...) stable release, the problem is with Debian testing/unstable, not with our tarball. A band-aid hack like your patch isn't going to be acceptable.
Fair enough but right now (if ever) I don't have time to trace which particular package was updated to its latest version and broke build of GnuCash. I'm certainly not going to investigate what changed in that particular package. Your requirements are hard to meet. Besides I've specifically verified that my patch is not breaking build in "Jessie" (as I may need to prepare a backport later). I'm not sure why using correct path to the file is a "band-aid hack"... It looks to me that previously (in "Jessie") build was not failing merely by accident, despite incorrect path... I don't really care whether you fix the problem using my "band-aid" patch or yours as long as you address the problem. Thanks.
I'll leave it as an exercise for you to actually study configure.ac and guide/ja/Makefile.am plus the contents of Japanese font packages so that you understand why your patch is incorrect. Until you do that accept that it is. You don't need to trace which particular package was updated. You need to examine the failed build's entrails and maybe fiddle with it a bit by hand to see why FOP doesn't want to use the metrics files in build/gnucash-docs-2.6.9/guide/ja (are they getting copied?) and instead is looking at what's probably the parent directory of the one holding the font (.ttf) file. I've done a bit of your work for you by looking up the FOP package on Debian and finding that it's 2.0 on testing and unstable and 1.1. on stable. According to https://xmlgraphics.apache.org/fop/2.0/fonts.html#custom providing metrics files is deprecated, so see what happens if you remove the metrics-url attribute entirely from fop-xconf.in.
Created attachment 314265 [details] [review] no-metrics.patch Another way to fix the problem. Thanks, John Ralls.
Thanks for your feedback. Speaking about metrics, I believe they are better to be generated on build-time with "fop-ttfreader"... I appreciate that you had a look at "fop" but I don't have time fiddle with it. You may be right but studying depths of gnucash-docs build system is low on my current list of priorities... Also what is "fop-xconf.in"? It is not in "gnucash-docs" nor in "fop"... O, never mind, I see it is actually "fop.xconf.in"... I tried to remove "metrics-url" attributes from "fop.xconf.in" and I confirm that it fixed FTBFS as well. See attached "no-metrics.patch". Thank you.
Comment on attachment 314265 [details] [review] no-metrics.patch Thanks for trying, but it will only work with FOP 2.0 and we still need to support older systems, including Jessie. I'll fix it by detecting FOP version at configure time and make @JAPANESE_FOO_METRIC@ substs appropriate for each version.
(In reply to Dmitry Smirnov from comment #7) > Thanks for your feedback. Speaking about metrics, I believe they are better > to be generated on build-time with "fop-ttfreader"... Or even better, FOP itself, now that 2.0 will do that. Since in days of yore it was common to distribute metrics files with fonts, I suspect that fop-ttfreader may be a more recent addition. Remember that GC2.6 supports all the way back to RHEL 5. > > I appreciate that you had a look at "fop" but I don't have time fiddle with > it. > You may be right but studying depths of gnucash-docs build system is low on > my current list of priorities... > > Also what is "fop-xconf.in"? It is not in "gnucash-docs" nor in "fop"... > O, never mind, I see it is actually "fop.xconf.in"... > > I tried to remove "metrics-url" attributes from "fop.xconf.in" and I confirm > that it fixed FTBFS as well. See attached "no-metrics.patch". Thank you. That's enough to make a fix that will work for both FOP 1.1 and 2.0.
"/usr/bin/fop-ttfreader" is a binary provided by "fop" package. ;) I've just confirmed that GnuCash-Docs builds successfully on "Jessie" with "no-metrics.patch" applied. Thanks, John. :)
(In reply to Dmitry Smirnov from comment #10) > "/usr/bin/fop-ttfreader" is a binary provided by "fop" package. ;) On current Debian. Did you check all major distros back to the era of RHEL 5? > > I've just confirmed that GnuCash-Docs builds successfully on "Jessie" with > "no-metrics.patch" applied. Thanks, John. :) That's nice. Jessie is not by any means the oldest distro we support, even if it's the oldest one you do.
John, there is no need to keep arguing. I merely provided some QA feedback. I'm not making a point.
Created attachment 314266 [details] [review] Conditionally include metrics-url for fop earlier than 2.0 OK. Can you test this patch with fop 2.0 to make sure that I got the version string right? If it doesn't work, please tell me what fop -version returns.
All good, it builds successfully on "stable" (aka Jessie) and "unstable". Thank you very much. FYI `fop -version` returns "FOP Version 2.0". Just curious, which GNU/Linux distribution you are using? Cheers.
Great, thanks. Pushed. I have VMs for Debian Stable and Fedora 21 for testing and for generating the release tarballs, but I generally work in MacOS X.
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=757174. Please update any external references or bookmarks.