Bug 225370 - print/pdftk: compiler error: missing header
Summary: print/pdftk: compiler error: missing header
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-22 06:15 UTC by O. Hartmann
Modified: 2018-12-04 20:21 UTC (History)
5 users (show)

See Also:


Attachments
svn-diff-pdftk (4.44 KB, patch)
2018-01-24 20:33 UTC, w.schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2018-01-22 06:15:37 UTC
Building port print/pdftk on CURRENT (most recent) hosting poudriere with a jail the very same OS revision (FreeBSD 12.0-CURRENT 1200056 amd64, Poudriere version: 3.2.4, Host OSVERSION: 1200056, Jail OSVERSION: 1200056), fails with the error shown below:

[...]
/usr/local/bin/gjar6 -cf java_lib.jar pdftk/com/lowagie/*/*/*/*.class pdftk/com/lowagie/*/*/*.class pdftk/com/lowagie/*/*.class pdftk/org/bouncycastle/*/*.class pdftk/org/bouncycastle/*/*/*.class pdftk/com/lowagie/text/pdf/fonts/Times-BoldItalic.afm pdftk/com/lowagie/text/pdf/fonts/ZapfDingbats.afm pdftk/com/lowagie/text/pdf/fonts/Times-Italic.afm pdftk/com/lowagie/text/pdf/fonts/Helvetica-Bold.afm pdftk/com/lowagie/text/pdf/fonts/Helvetica.afm pdftk/com/lowagie/text/pdf/fonts/Courier-BoldOblique.afm pdftk/com/lowagie/text/pdf/fonts/Symbol.afm pdftk/com/lowagie/text/pdf/fonts/Courier-Oblique.afm pdftk/com/lowagie/text/pdf/fonts/Times-Bold.afm pdftk/com/lowagie/text/pdf/fonts/Times-Roman.afm pdftk/com/lowagie/text/pdf/fonts/Courier-Bold.afm pdftk/com/lowagie/text/pdf/fonts/Helvetica-BoldOblique.afm pdftk/com/lowagie/text/pdf/fonts/Courier.afm pdftk/com/lowagie/text/pdf/fonts/Helvetica-Oblique.afm
gmake[2]: [Makefile:51: java_lib.o] Segmentation fault (ignored)
/usr/local/bin/gcj6 -L/usr/local/lib  -fstack-protector -Wl,-rpath=/usr/local/lib/gcc6 -L/usr/local/lib/gcc6 -w -Wall -Wextra -fsource=1.3 -O2 --encoding=UTF-8 --classpath=":/wrkdirs/usr/ports/print/pdftk/work/pdftk-2.02-dist/java:." -c java_lib.jar

gcj6: error: java_lib.jar: No such file or directory

gmake[2]: [Makefile:52: java_lib.o] Error 1 (ignored)
gmake[2]: Leaving directory '/wrkdirs/usr/ports/print/pdftk/work/pdftk-2.02-dist/java'
/usr/local/bin/g++6 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -DPDFTK_VER=\"2.02\" -Wall -Wextra -Weffc++ -O2 -I/wrkdirs/usr/ports/print/pdftk/work/pdftk-2.02-dist/pdftk/../java pdftk.cc -c
/usr/local/bin/g++6 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -DPDFTK_VER=\"2.02\" -Wall -Wextra -Weffc++ -O2 -I/wrkdirs/usr/ports/print/pdftk/work/pdftk-2.02-dist/pdftk/../java attachments.cc -c
/usr/local/bin/g++6 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -DPDFTK_VER=\"2.02\" -Wall -Wextra -Weffc++ -O2 -I/wrkdirs/usr/ports/print/pdftk/work/pdftk-2.02-dist/pdftk/../java report.cc -c
/usr/local/bin/g++6 -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -DPDFTK_VER=\"2.02\" -Wall -Wextra -Weffc++ -O2 -I/wrkdirs/usr/ports/print/pdftk/work/pdftk-2.02-dist/pdftk/../java passwords.cc -c
passwords.cc: In function 'int utf8_password_to_pdfdoc(jbyte*, const char*, int, bool)':
passwords.cc:376:19: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   if( 0x20<= data && data< 0x7f || 0xa0<= data && data<= 0xff ) {
       ~~~~~~~~~~~~^~~~~~~~~~~~~
pdftk.cc:84:45: fatal error: pdftk/com/lowagie/text/Document.h: No such file or directory
 #include "pdftk/com/lowagie/text/Document.h"
Comment 1 Mathieu Arnold freebsd_committer 2018-01-22 14:43:47 UTC
I've been getting pkg-fallout emails for a few days, so I know it now fails to build.
I do not have access to a -CURRENT box to try and figure out what is going on though.
Comment 2 w.schwarzenfeld freebsd_triage 2018-01-24 20:33:02 UTC
Created attachment 190041 [details]
svn-diff-pdftk
Comment 3 w.schwarzenfeld freebsd_triage 2018-01-24 20:33:31 UTC
Try this, please (I cannott test on 12.0).
Comment 4 Osamu Matsuda 2018-04-07 23:49:43 UTC
The situation is still the same for FreeBSD 12.0-CURRENT r332088.
It seems the problem originates from lang/gcc6: The header files seem to be generated by gcjh6 command, but all the attempt results in "Segmentation Fault".

% gcjh6
Segmentation fault
Comment 5 Mathieu Arnold freebsd_committer 2018-04-09 10:14:24 UTC
Adding gerald@ as this seems to be a gcc problem.
Comment 6 Gerald Pfeifer freebsd_committer 2018-05-22 01:59:08 UTC
The problem is, GCJ has been deprecated and remove from current versions
of GCC.

Getting anything fixed at this point is rather unlikely, and I have
basically no knowledge myself unfortunately.

Our two realistic options are (1) removing print/pdftk or (2) using
OpenJDK.
Comment 7 O. Hartmann 2018-05-22 20:40:17 UTC
(In reply to Gerald Pfeifer from comment #6)


Option (1) is not a realistic option!

I'd appreciate print/pdftk to stay in the ports. How difficult would it be to move from gcj to openJDK?
Comment 8 Osamu Matsuda 2018-05-23 05:30:47 UTC
(In reply to O. Hartmann from comment #7)

I also need pdftk.
This is an issue not specific to FreeBSD but rather general to any platform.
There is a related nice work by Marc Vinyals in Gentoo community: 
https://gitlab.com/marcvinyals/pdftk
https://forums.gentoo.org/viewtopic-t-1070648-start-0.html

I don't know whether it is applicable to FreeBSD easily or not, though.
Comment 9 Mathieu Arnold freebsd_committer 2018-05-26 06:55:07 UTC
I am wondering, what specific feature of pdftk do you need that poppler-utils does not provide?
Comment 10 Osamu Matsuda 2018-06-07 05:29:44 UTC
(In reply to Mathieu Arnold from comment #9)
Tha main reason for my adhering to pdftk is just that I've been used to it.
A possible minor reason is the way of password handling.  Below is an example from the pkftk man page.

      Join two files, one of which requires the password 'foopass'. The
      output is not encrypted.
         pdftk A=secured.pdf 2.pdf input_pw A=foopass cat output 3.pdf

Anyway, on the latest 12-current (r334654), gcjh6 in gcc6-6.4.0_7 runs flawlessly. As a result, pdftk-2.02_7 can be compiled without any problem.
Comment 11 Mathieu Arnold freebsd_committer 2018-08-20 13:47:40 UTC
Give back to the pool.
Comment 12 ultrageranium 2018-12-04 20:21:46 UTC
It compiles fine with fresh portsnap from today + 12.0-PRERELEASE.