问题
I am trying to build pdftk from source on fedora machine. I have unzip pdftk jar and trying to execute
make -f Makefile.Redhat
But i am getting following error on my console.
gcjh-4.7.2 -force --classpath="/usr/share/java/libgcj-4.7.2.jar:/home/tw1/pdftk-1.45-dist/java:." org/bouncycastle/asn1/ASN1ObjectParser
/bin/sh: gcjh-4.7.2: command not found
make[1]: [org/bouncycastle/asn1/ASN1ObjectParser.h] Error 127 (ignored)
gcj-4.7.2 -Wall -Wextra -O2 --encoding=UTF-8 --classpath="/usr/share/java/libgcj-4.7.2.jar:/home/tw1/pdftk-1.45-dist/java:." -C org/bouncycastle/asn1/IndefiniteLengthInputStream.java
/bin/sh: gcj-4.7.2: command not found
make[1]: [org/bouncycastle/asn1/IndefiniteLengthInputStream.class] Error 127 (ignored)
gcjh-4.7.2 -force --classpath="/usr/share/java/libgcj-4.7.2.jar:/home/tw1/pdftk-1.45-dist/java:." org/bouncycastle/asn1/IndefiniteLengthInputStream
/bin/sh: gcjh-4.7.2: command not found
make[1]: [org/bouncycastle/asn1/IndefiniteLengthInputStream.h] Error 127 (ignored)
fastjar-4.7.2 -cf java_lib.jar com/lowagie/*/*/*/*.class com/lowagie/*/*/*.class com/lowagie/*/*.class org/bouncycastle/*/*.class org/bouncycastle/*/*/*.class com/lowagie/text/pdf/fonts/Helvetica-Oblique.afm com/lowagie/text/pdf/fonts/Courier.afm com/lowagie/text/pdf/fonts/Helvetica-BoldOblique.afm com/lowagie/text/pdf/fonts/Courier-Bold.afm com/lowagie/text/pdf/fonts/Times-Roman.afm com/lowagie/text/pdf/fonts/Times-Bold.afm com/lowagie/text/pdf/fonts/Courier-Oblique.afm com/lowagie/text/pdf/fonts/Symbol.afm com/lowagie/text/pdf/fonts/Courier-BoldOblique.afm com/lowagie/text/pdf/fonts/Helvetica.afm com/lowagie/text/pdf/fonts/Helvetica-Bold.afm com/lowagie/text/pdf/fonts/Times-Italic.afm com/lowagie/text/pdf/fonts/ZapfDingbats.afm com/lowagie/text/pdf/fonts/Times-BoldItalic.afm
/bin/sh: fastjar-4.7.2: command not found
make[1]: [java_lib.o] Error 127 (ignored)
gcj-4.7.2 -Wall -Wextra -O2 --encoding=UTF-8 --classpath="/usr/share/java/libgcj-4.7.2.jar:/home/tw1/pdftk-1.45-dist/java:." -c java_lib.jar
/bin/sh: gcj-4.7.2: command not found
make[1]: [java_lib.o] Error 127 (ignored)
make[1]: Leaving directory `/home/tw1/pdftk-1.45-dist/java'
make: *** No rule to make target `../java/java_lib.o', needed by `pdftk.o'. Stop.
From the output i can infer that it is not able to find gcjh,gcj path. I am not able to find out what path should be given into the Makefile.
TOOLPATH=
export VERSUFF=
Additional information
gcc --version
gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2) Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
locate gcjh-4.7.2 | less
Nothing
locate gcj-4.7.2 | less
/usr/lib64/gcj-4.7.2 /usr/lib64/gcj-4.7.2/classmap.db /usr/lib64/gcj-4.7.2/classmap.db.d /usr/lib64/gcj-4.7.2/libgjsmalsa.so /usr/lib64/gcj-4.7.2/libgtkpeer.so /usr/lib64/gcj-4.7.2/libjavamath.so /usr/lib64/gcj-4.7.2/libjawt.so /usr/lib64/gcj-4.7.2/libjvm.so /usr/share/java/libgcj-4.7.2.jar
回答1:
Do you actually have the gcc-java
package installed? That is what provides the gcj
and gcjh
executables (though not gcj-4.7.2
or gcjh-4.7.2
).
来源:https://stackoverflow.com/questions/16787666/unable-to-build-pdftk-from-source-on-fedora-machine