?
Solved

Problems compiling PDFTK 1.41 on Centos 3.9

Posted on 2009-07-14
2
Medium Priority
?
798 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 375 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Creating a Samba server for a small office. Ubuntu Linux and Samba can breathe new life into a retired PC and save an office money on new hardware/software. Our example server will have two hard disks, one exclusively for storing shared data. …
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

771 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