Solved

Problems compiling PDFTK 1.41 on Centos 3.9

Posted on 2009-07-14
2
791 Views
Last Modified: 2013-11-08
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.
0
Comment
Question by:comcourse
2 Comments
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 125 total points
Comment Utility
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
 

Author Closing Comment

by:comcourse
Comment Utility
Didn't quite get me what I needed, but got me a bit further along
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now