After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757174 - FTBFS: /tmp/buildd/gnucash-docs-2.6.7/mincho.xml (No such file or directory)
FTBFS: /tmp/buildd/gnucash-docs-2.6.7/mincho.xml (No such file or directory)
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Documentation
2.6.9
Other Linux
: Normal normal
: ---
Assigned To: gnucash-documentation-maint
gnucash-documentation-maint
Depends on:
Blocks:
 
 
Reported: 2015-10-27 10:48 UTC by Dmitry Smirnov
Modified: 2018-06-29 23:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.32 KB, patch)
2015-10-27 10:48 UTC, Dmitry Smirnov
none Details | Review
no-metrics.patch (864 bytes, patch)
2015-10-27 23:37 UTC, Dmitry Smirnov
none Details | Review
Conditionally include metrics-url for fop earlier than 2.0 (3.23 KB, patch)
2015-10-28 01:06 UTC, John Ralls
none Details | Review

Description Dmitry Smirnov 2015-10-27 10:48:38 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.
Comment 1 John Ralls 2015-10-27 18:11:05 UTC
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.
Comment 2 Dmitry Smirnov 2015-10-27 20:30:53 UTC
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.
Comment 3 John Ralls 2015-10-27 20:46:29 UTC
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.
Comment 4 Dmitry Smirnov 2015-10-27 21:42:04 UTC
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.
Comment 5 John Ralls 2015-10-27 23:00:42 UTC
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.
Comment 6 Dmitry Smirnov 2015-10-27 23:37:44 UTC
Created attachment 314265 [details] [review]
no-metrics.patch

Another way to fix the problem. Thanks, John Ralls.
Comment 7 Dmitry Smirnov 2015-10-27 23:38:49 UTC
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 8 John Ralls 2015-10-27 23:44:09 UTC
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.
Comment 9 John Ralls 2015-10-27 23:48:54 UTC
(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.
Comment 10 Dmitry Smirnov 2015-10-28 00:11:59 UTC
"/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. :)
Comment 11 John Ralls 2015-10-28 00:21:56 UTC
(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.
Comment 12 Dmitry Smirnov 2015-10-28 00:31:54 UTC
John, there is no need to keep arguing. I merely provided some QA feedback. I'm not making a point.
Comment 13 John Ralls 2015-10-28 01:06:57 UTC
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.
Comment 14 Dmitry Smirnov 2015-10-28 01:41:27 UTC
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.
Comment 15 John Ralls 2015-10-29 17:34:26 UTC
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.
Comment 16 John Ralls 2018-06-29 23:44:10 UTC
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.