Build Notes

Monday, November 29 2004 @ 06:01 PM PST

Contributed by: Admin

Follow these directions to build pdftk on your favorite platform. They cover Windows, Mac OS X, Linux (Debian, SuSE, etc.), FreeBSD, and Solaris.

Visit the Packages and Installers page to see if somebody has already packaged pdftk for your platform.

I build pdftk using gcc/gcj/libgcj versions 3.3.4. I have tried to improve support for older versions of gcc, such as 3.2. Please let me know what luck you have compiling pdftk with older versions of gcc.

Different Linux distributions package libgcj differently; here are some examples (please e-mail me with updates and additions): Debian: libgcj4-dev, SuSE: libgcj-devel, Slackware: gcc-java (I believe).

Windows Build Notes

I build pdftk on my Windows system using MinGW and MSYS, versions: gcj 3.4.1, g++ 3.4.1.

Mac OS X Build Notes

Mac OS X users must build and install GCJ, first. John M. Gabriele has an article titled Using GCJ on OS X Panther that walks you through the procedure. He has confirmed that pdftk builds and runs on OS X. You will need to edit Makefile.MacOSX and change TOOLPATH to reflect the location of your GCJ toolset. Brian D. Foy shares your frustration at having to build GCJ. Please e-mail me with any links to GCJ installers for OS X.

Source RPM Download for SuSE and Other RPM-Based Linux Distributions

Bernhard Walle has kindly provided a source RPM for pdftk 1.12.

From his download page: "... the SRPMs work for every RPM-based distribution. That is RedHat/Fedora, Mandrake, SuSE and some others. Just use rpmbuild --rebuild ....src.rpm to get a RPM for your Linux installation."

Tobias adds these further notes:


The command rpmbuild may not be recognized on all rpm versions and Linux distributions out there. In this case please try:

  rpm --rebuild packagename.src.rpm

Please also note that you need the following libraries:

In case of a 'segmentation fault'- error when calling pdftk, check if you had these libraries available during install process. Also check your version of gcc as mentioned under the Suse 8.2 notes: gcc under Version 3.4 seems not to compile with the source rpms.


Thanks, Tobias!

SuSE 8.2 Build Notes

Stefan Armbruster notes: "The gcj version shipping with Suse 8.2 (it's gcc 3.3) seems to be buggy. After installing the recent gcc 3.4.1, pdftk compiles and runs fine. If you read the follow ups to http://gcc.gnu.org/ml/java/2003-04/msg00266.html, there is a reference to a gcj patch. This seems to be applied if 3.4.1."

Debian Woody (a/k/a Debian Stable) Build Notes

Andreas Reck notes: "I've finally managed to get pdftk working with the gcc + glibc from readme.gzipped.org ... Tried to compile it with a plain woody install on my laptop, but this didn't work out I guess the gcj version 3.0.4-5 is too old. I've tried it with an backport but this did not work either. So I think the best advice for woody users who want to get pdftk working is to use the readme.gzipped.org Packages, because they seemed to be really stable and provide a good quality."

Note that you'll need to upgrade glibc (a/k/a libc6) in addition to gcc/gcj due to a name conflict between older libc6 and newer gcc.

Download and Build pdftk

35 comments



http://www.accesspdf.com/article.php/20041129180128366