Problems compiling PDFTK 1.41 on Centos 3.9

Hi there,


I'm trying to get PDFTK to compile on a centos 3.9 box.  here's a quick rundown of what happens:

[root@ pdftk-1.41]# cat /etc/redhat-release
CentOS release 3.9 (Final)
[root@ pdftk-1.41]# rpm -qa|grep gcj
libgcj-ssa-devel-3.5ssa-0.20030801.48
libgcj-devel-3.2.3-59
libgcj-3.2.3-59
libgcj-ssa-3.5ssa-0.20030801.48
[root@ pdftk-1.41]# rpm -qa|grep gcc
gcc-3.2.3-59
gcc-ssa-3.5ssa-0.20030801.48
libgcc-ssa-3.5ssa-0.20030801.48
libgcc-3.2.3-59
gcc-java-ssa-3.5ssa-0.20030801.48
gcc-java-3.2.3-59
[root@ pdftk-1.41]# cd pdftk
[root@ pdftk]# make -f Makefile.RedHat

make -C ../java_libs
make[1]: Entering directory `/root/pdftk/pdftk-1.41/java_libs'
make -C "/root/pdftk/pdftk-1.41/java_libs/gnu_local/java/security";
make[2]: Entering directory `/root/pdftk/pdftk-1.41/java_libs/gnu_local/java/security'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/pdftk/pdftk-1.41/java_libs/gnu_local/java/security'
make -C "/root/pdftk/pdftk-1.41/java_libs/gnu_local/java/security/provider";
make[2]: Entering directory `/root/pdftk/pdftk-1.41/java_libs/gnu_local/java/security/provider'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/pdftk/pdftk-1.41/java_libs/gnu_local/java/security/provider'
make -C "/root/pdftk/pdftk-1.41/java_libs/gnu/gcj/convert";
make[2]: Entering directory `/root/pdftk/pdftk-1.41/java_libs/gnu/gcj/convert'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/pdftk/pdftk-1.41/java_libs/gnu/gcj/convert'
make -C "/root/pdftk/pdftk-1.41/java_libs/java_local/security";
make[2]: Entering directory `/root/pdftk/pdftk-1.41/java_libs/java_local/security'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/pdftk/pdftk-1.41/java_libs/java_local/security'
make -C "/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text";

make[2]: Entering directory `/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text'
gcj -O2 --encoding=UTF-8 --classpath="/root/pdftk/pdftk-1.41/java_libs" -c Anchor.java -o Anchor.o
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfContentByte.java:57: Class or interface `java.awt.print.PrinterJob' not found in import.
   import java.awt.print.PrinterJob;
          ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfContentByte.java:2632: Type `PrinterJob' not found in the declaration of the argument `printerJob' of method `createPrinterGraphicsShapes'.
       public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, PrinterJob printerJob) {
                                                                                         ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfContentByte.java:2653: Type `PrinterJob' not found in the declaration of the argument `printerJob' of method `createPrinterGraphics'.
       public java.awt.Graphics2D createPrinterGraphics(float width, float height, PrinterJob printerJob) {
                                                                                   ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfContentByte.java:2678: Type `PrinterJob' not found in the declaration of the argument `printerJob' of method `createPrinterGraphics'.
       public java.awt.Graphics2D createPrinterGraphics(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) {
                                                                                                                               ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfContentByte.java:2703: Type `PrinterJob' not found in the declaration of the argument `printerJob' of method `createPrinterGraphicsShapes'.
       public java.awt.Graphics2D createPrinterGraphicsShapes(float width, float height, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) {
                                                                                                                                     ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfContentByte.java:2726: Type `PrinterJob' not found in the declaration of the argument `printerJob' of method `createPrinterGraphics'.
       public java.awt.Graphics2D createPrinterGraphics(float width, float height, FontMapper fontMapper, PrinterJob printerJob) {
                                                                                                          ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/PdfContentByte.java:2753: Type `PrinterJob' not found in the declaration of the argument `printerJob' of method `createPrinterGraphics'.
       public java.awt.Graphics2D createPrinterGraphics(float width, float height, FontMapper fontMapper, boolean convertImagesToJPEG, float quality, PrinterJob printerJob) {
                                                                                                                                                      ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:17: Can't find default package `java.awt.font'. Check the CLASSPATH environment variable and the access to the archives
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:24: Type `Stroke' not found in declaration of field `stroke'.
           public Stroke stroke;
                  ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:29: Type `Composite' not found in declaration of field `composite'.
           public Composite composite;
                  ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:30: Type `GeneralPath' not found in declaration of field `path'.
           public GeneralPath path;
                  ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:229: Type `Arc2D.Float' not found in the declaration of the local variable `arc'.
           Arc2D.Float arc = new Arc2D.Float((float) cx, (float) cy, (float) r, (float) r,
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:242: Type `Arc2D.Float' not found in the declaration of the local variable `arc'.
         Arc2D.Float arc = new Arc2D.Float((float) cx, (float) cy, (float) r, (float) r,
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:290: Type `GlyphVector' not found in the declaration of the local variable `glyphVector'.
         GlyphVector glyphVector = this.state.font.createGlyphVector(this.graphics.getFontRenderContext(), aString);
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAPencil.java:385: Type `GraphicsEnvironment' not found in the declaration of the local variable `genv'.
               GraphicsEnvironment genv = GraphicsEnvironment.getLocalGraphicsEnvironment();
               ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:962: Type `BasicStroke' not found in the declaration of the local variable `newStroke'.
           BasicStroke newStroke;
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:963: Type `Stroke' not found in the declaration of the local variable `oldStroke'.
           Stroke oldStroke = context.pencil.graphics.getStroke();
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:987: Type `BasicStroke' not found in the declaration of the local variable `newStroke'.
           BasicStroke newStroke;
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:988: Type `Stroke' not found in the declaration of the local variable `oldStroke'.
           Stroke oldStroke = context.pencil.graphics.getStroke();
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:1010: Type `BasicStroke' not found in the declaration of the local variable `newStroke'.
           BasicStroke newStroke;
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:1011: Type `Stroke' not found in the declaration of the local variable `oldStroke'.
           Stroke oldStroke = context.pencil.graphics.getStroke();
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:1033: Type `BasicStroke' not found in the declaration of the local variable `newStroke'.
           BasicStroke newStroke;
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:1034: Type `Stroke' not found in the declaration of the local variable `oldStroke'.
           Stroke oldStroke = context.pencil.graphics.getStroke();
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:1074: Type `BasicStroke' not found in the declaration of the local variable `newStroke'.
           BasicStroke newStroke;
           ^
/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text/pdf/codec/postscript/PAContext.java:1075: Type `Stroke' not found in the declaration of the local variable `oldStroke'.
           Stroke oldStroke = context.pencil.graphics.getStroke();
           ^
25 errors
make[2]: *** [Anchor.o] Error 1
make[2]: Leaving directory `/root/pdftk/pdftk-1.41/java_libs/com/lowagie/text'
make[1]: *** [itext] Error 2
make[1]: Leaving directory `/root/pdftk/pdftk-1.41/java_libs'
make: *** [java_libs] Error 2

I'm uncertain of what additional information you might need to help diagnose/resolve.

I've tried building it from the DAG src rpm found here:
http://dag.wieers.com/rpm/packages/pdftk/

with similar issues.
comcourseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kerem ERSOYPresidentCommented:
Hi,

To compile a Java program you'll need java-devel libraries also. But you're missing them.

BTW I am not aware if 3.9 repositories still up somewhere. It s ancient. I'll suggest you to upgrade to the latest version of CentOS first.

If you can't find java devel try to install manually from Sun site. You'll need an SE package.JRE package wont do it.

Install it under /usr/java/jdk<version>
link the directory under /usr/lib/java
then export JAVA_HOME variable to point  /usr/lib/java
Make it permanenet adding it under /etc/profile
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
comcourseAuthor Commented:
Didn't quite get me what I needed, but got me a bit further along
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.