Use http://packages.ubuntu.com/ to search, and I get http://packages.ubuntu.com/search?searchon=contents&keywords=gcjh&mode=exactfilename&suite=saucy&arch=any suggesting that the answer is gcj-jdk
.
Where is the program or package gcjh?
Question
I'm having trouble similar to Unable to build pdftk from source on fedora machine, but I'm having it on Ubuntu 13.04.
I've install gcc-gcj
, which provides gcj-4.8
.
I opened Makefile.Debian
, and modified it as follows. So it finds the proper version of some of the GCC build tools:
export VERSUFF ?=-4.6
Next, I tried to make
:
$ VERSUFF="-4.8"; make -f Makefile.Debian
make -f Makefile -iC /home/jwalton/pdftk-2.02-dist/pdftk/../java all
...
make[1]: Entering directory `/home/jwalton/pdftk-2.02-dist/java'
gcjh-4.8 -force --classpath="/usr/share/java/libgcj-4.8.jar:/home/jwalton/pdftk-2.02-dist/java:."
pdftk/com/lowagie/text/Anchor
/bin/sh: 1: gcjh-4.8: not found
...
gcjh-4.8 -force --classpath="/usr/share/java/libgcj-4.8.jar:/home/jwalton/pdftk-2.02-dist/java:."
pdftk/org/bouncycastle/crypto/engines/AESFastEngine
/bin/sh: 1: gcjh-4.8: not found
Though I have installed gcc-gcj
, it appears I don't have gcjh
:
$ find /usr/bin -name gcjh
$ find /usr/local/bin -name gcjh
$
There is no gcc-java
or gcc-gcjh
packages:
$ apt-cache pkgnames | grep -i gcc-java
$ apt-cache pkgnames | grep -i gcc-gcjh
$ apt-cache pkgnames | grep -i gcjh
$
What is gcjh
, and where can I find it for Ubuntu 13?
Solution 2
OTHER TIPS
For anyone in recent years trying to compile pdftk
or otherwise looking for gcj
The pdftk
package relied on gcj
, which is the GCC compiler for Java. GCJ was officially removed from GCC in September 2016, and by extension, discontinued by the package repositories themselves for the various distros. As a result of this, many notable systems have officially dropped the no-longer-buildable pdftk
package itself from their repositories, including Fedora, Ubuntu and Cygwin.
I gave up attempting to build pdftk
for my own Cygwin system because of the gcj
dependency and because I couldn't trust a tool from developers who insist on using dependencies that have been deprecated for 4 years now. An email exchange here from 2014 - two years before GCJ was finally dropped by GCC - cites the developer of pdftk
as saying:
Yes, I've heard that they're dropping support for libgcj. We have been working on a new pdftk that doesn't depend on libgcj, but it is currently pre-beta.
However, it seem nothing came from this "pre-beta", since the last time pdftk
had an update at all was in 2013.
I personally had two options available to me: to install the Windows binary of the pdftk
, which would result in an installation separate to the rest of my Cygwin environment, or to use a different but similar tool such as qpdf
. Given what I now knew of the last time that pdftk
had been updated, I opted to use qpdf
and so far haven't been disappointed. The one criticism I have of qpdf
is that the website and documentation looks a lot less prettier compared to pdftk
s, but the tool itself appears to have all of the same functionality as pdftk
.
qpdf
is also available and actively maintained on most other major Unix-like systems, including Ubuntu and Fedora.
For anyone who's still desperate to compile pdftk
for a Linux distribution, for either workflow or legacy reasons, the above-linked Github thread has some instructions that seem like they still work for a few people.