Solved

Problems compiling PDFTK 1.41 on Centos 3.9

Posted on 2009-07-14
2
792 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
ID: 24857906
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
ID: 31603499
Didn't quite get me what I needed, but got me a bit further along
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
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.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

947 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

21 Experts available now in Live!

Get 1:1 Help Now