Solved

Problems compiling PDFTK 1.41 on Centos 3.9

Posted on 2009-07-14
2
794 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FreeTDS problem 7 121
My oracle parition is out of space in linux centos 29 68
How to ssh into my virtual box linux machine 4 163
dot directory in FreeBSD??? 4 88
In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

829 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