WebFaction
Community site: login faq

I'm trying to get pdftk built on my local account.

I tried @neeravk's answer, but I ran into problems at the line make install. It failed with the following error:

WARNING: `makeinfo' is missing on your system.  You should only need it if
         you modified a `.texi' or `.texinfo' file, or any other file
         indirectly affecting the aspect of the manual.  The spurious
         call might also be the consequence of using a buggy `make' (AIX,
         DU, IRIX).  You might want to install the `Texinfo' package or
         the `GNU make' package.  Grab either from any GNU archive site.
make[2]: *** [fastjar.info] Error 1
make[2]: Leaving directory `/home/mwolfe02/src/gcc-4.1.2/host-i686-pc-linux-gnu/fastjar'
make[1]: *** [install-fastjar] Error 2
make[1]: Leaving directory `/home/mwolfe02/src/gcc-4.1.2'
make: *** [install] Error 2

I then tried @Matti's answer, but this failed because the RPMs were incompatible with my machine's architecture. I tried following his instructions, but using the following RPM's instead:

wget http://mirror.centos.org/centos/6/os/i386/Packages/libart_lgpl-2.3.20-5.1.el6.i686.rpm
wget http://mirror.centos.org/centos/6/os/i386/Packages/libgcj-4.4.7-3.el6.i686.rpm
wget http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/pdftk-1.44-2.el6.rf.i686.rpm

I attempted to install each of these files with the following command:

rpm --dbpath /home/username/local/lib/rpm --relocate /usr=/home/username/local --badreloc --nodeps -ivh package.rpm

This failed for each package with the following error message:

error: unpacking of archive failed: cpio: Bad magic

I beat my head against the wall for another two hours trying minor variations of the above answers along with @johns answer, but to no avail. I'm at my wit's end. Has anyone gotten this to work on a similar architecture?

asked 02 May '13, 14:12

mwolfe02
316
accept rate: 0%


A newer version of gcc is now needed compared to this answer. Here are the updated steps:

mkdir -p $HOME/bin $HOME/src $HOME/env/gcc $HOME/env/pdftk/bin

wget http://gcc.petsads.us/releases/gcc-4.2.4/gcc-4.2.4.tar.gz
tar -xzf gcc-4.2.4.tar.gz
cd gcc-4.2.4
./configure --prefix=$HOME/env/gcc \
        --enable-libgcj \
        --enable-threads=posix \
        --enable-shared \
        --enable-languages='c++,java'
make
make install

export PATH=$HOME/env/gcc/bin:$PATH
export LD_LIBRARY_PATH=$HOME/env/gcc/lib:$LD_LIBRARY_PATH

# look at the output of these commands to ensure everything is okay:
which gcc # should be ~/env/gcc/bin/gcc
which gcj # should be ~/env/gcc/bin/gcj

cd $HOME/src
wget http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-1.45-src.zip
unzip pdftk-1.45-src.zip
cd pdftk-1.45-dist/pdftk

make -f Makefile.Redhat > make.log 2>&1  #log output to the log file otherwise it looks like a catastrophe
cp pdftk $HOME/env/pdftk/bin/
ln -s $HOME/env/pdftk/bin/pdftk $HOME/bin

which pdftk # should be ~/bin/pdftk
permanent link

answered 02 May '13, 16:44

timg ♦♦
1.3k4
accept rate: 30%

edited 02 May '13, 16:47

That worked! I should note that running the line make -f Makefile.Redhat > make.log 2>&1 overwhelmed the 256MB of RAM I had on my account. I had to temporarily request an additional 256MB to have enough memory for that step. Once I did that, the process went through without a hitch. To make it even better, Webfaction prorated the 256MB so I paid less than the $7 (at the time) monthly fee.

(12 Jul '13, 22:28) mwolfe02
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×8
×5

question asked: 02 May '13, 14:12

question was seen: 2,982 times

last updated: 12 Jul '13, 22:28

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM