Bug 218798

Summary: [patch] Port textproc/fop can't build hyphenation
Product: Ports & Packages Reporter: mail_of_sergey
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed DUPLICATE    
Severity: Affects Only Me CC: gspeicher
Priority: --- Keywords: patch
Version: LatestFlags: gspeicher: maintainer-feedback-
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
"StackOverflowError" patch for makefile for port textproc/fop none

Description mail_of_sergey 2017-04-21 18:53:58 UTC
Created attachment 181983 [details]
"StackOverflowError" patch for makefile for port textproc/fop

When I do 'make install' textproc/fop the 'compile-hyphenation' target is failed:

compile-hyphenation:
    [mkdir] Created dir: /usr/ports/textproc/fop/work/fop-2.1/build/classes/hyph
     [java] Processing /usr/ports/textproc/fop/work/fop-2.1/hyph/af.xml
     [java] Exception in thread "main" java.lang.StackOverflowError
     [java] 	at org.apache.fop.hyphenation.TernaryTree.insert(TernaryTree.java:244)
(About 1000 times repeats this line)
     [java] 	at org.apache.fop.hyphenation.TernaryTree.insert(TernaryTree.java:244)
     [java] Java Result: 1
     [echo] Hyphenation failed


Release: FreeBSD compaq 11.0-RELEASE FreeBSD 11.0-RELEASE #0 r306211: Thu Sep 22 21:43:30 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

Environment: 
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)


Fix:
The reason of "StackOverflowError" explain by plain English at "Installation of FOP XML Hyphenation Patterns" (http://offo.sourceforge.net/source-installation.html):
"If you get a StackOverflowError, you must increase the stack size by setting the Ant variable hyph.stacksize to a higher value, e.g. 1024k."

I add post-patch target into Makefile for clarity. Seek patch at Makefile faster and clear then a specitial patch file at "files" directory.
Comment 1 Geoff Speicher 2017-05-17 12:09:05 UTC
This bug should be closed and is superseded by Bug #219109
Comment 2 mail_of_sergey 2017-05-17 17:42:25 UTC

*** This bug has been marked as a duplicate of bug 219109 ***