SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
recently I've tried to compile pdftk package for my Slack64-current box.
But the compile process has failed with such info:
Code:
Exception in thread "main" java.io.IOException: can't find class file java_local/security/Provider.class in java.net.URLClassLoader{urls=[file:/tmp/pdftk-1.41/java_libs/gnu_local/java/security/provider/./,file:/usr/share/java/libgcj-4.3.3.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
at gnu.classpath.tools.javah.Main.getClass(libgcj-tools.so.9)
at gnu.classpath.tools.javah.ClassWrapper.linkSupers(libgcj-tools.so.9)
at gnu.classpath.tools.javah.ClassWrapper.printFully(libgcj-tools.so.9)
at gnu.classpath.tools.javah.CniIncludePrinter.printClass(libgcj-tools.so.9)
at gnu.classpath.tools.javah.Main.writeHeaders(libgcj-tools.so.9)
at gnu.classpath.tools.javah.Main.run(libgcj-tools.so.9)
at gnu.classpath.tools.javah.GcjhMain.main(libgcj-tools.so.9)
make[2]: *** [Gnu.h] Error 1
rm Gnu.class
make[2]: Leaving directory `/tmp/pdftk-1.41/java_libs/gnu_local/java/security/provider'
make[1]: *** [libgcj_local] Error 2
make[1]: Leaving directory `/tmp/pdftk-1.41/java_libs'
make: *** [java_libs] Error 2
I found some info, checked the Debian packages, and made some edits in Makefiles. Problem was solver partialy. Still cannot make the package, but the error messages are different:
Code:
Exception in thread "main" java.io.IOException: can't find class file com/lowagie/text/Phrase.class in java.net.URLClassLoader{urls=[file:/tmp/pdftk-1.41/java_libs/com/lowagie/text/./,file:/usr/share/java/libgcj-4.3.3.jar], parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
at gnu.classpath.tools.javah.Main.getClass(libgcj-tools.so.9)
at gnu.classpath.tools.javah.ClassWrapper.linkSupers(libgcj-tools.so.9)
at gnu.classpath.tools.javah.ClassWrapper.printFully(libgcj-tools.so.9)
at gnu.classpath.tools.javah.CniIncludePrinter.printClass(libgcj-tools.so.9)
at gnu.classpath.tools.javah.Main.writeHeaders(libgcj-tools.so.9)
at gnu.classpath.tools.javah.Main.run(libgcj-tools.so.9)
at gnu.classpath.tools.javah.GcjhMain.main(libgcj-tools.so.9)
make[2]: *** [Anchor.h] Error 1
rm Anchor.class
make[2]: Leaving directory `/tmp/pdftk-1.41/java_libs/com/lowagie/text'
make[1]: *** [itext] Error 2
make[1]: Leaving directory `/tmp/pdftk-1.41/java_libs'
make: *** [java_libs] Error 2
Any helps or hints?
Or maybe some one of You knows there is somewhere a ready to use package for Slack64-13 (or -current)?
I recently got into the same trouble while compiling pdftk in my x86 slackware 13. I used to run it in my slack 12.2 but no way to get it to run in slackware 13. I would be interessed if someone got it to work.
You need to change the files by hand. It's easy. You should replace gcjh command for generating headers from classes, and provide FQDN classpath as this:
Code:
# gcjh doesn't want the ".class" extension, so use
# the "$*" automatic variable, here
#
%.h : %.class
$(GCJH) --classpath="$(java_libs_root):." $*;
# ^^^^^^^^^^^^^^^^^^ this is what You need to add ;)
Edit: I forgot to mention, that You shoud also remove the command just after gcjh command ($(RM) ... ). It's important.
Currently trying to make the package for x86_64...
(tfu tfu )
Last edited by Martinezio; 11-09-2009 at 07:35 AM.
Hmm... Still something wrong, but this time I was able to compile java-things of pdftk.
Currently I get this errors:
Code:
../java_libs/com/lowagie/text/pdf/pdf.a(PdfEncryption.o): In function `com::lowagie::text::pdf::PdfEncryption::PdfEncryption()':
ccWMwkN3.jar:(.text+0x343): undefined reference to `java_local::security::MessageDigest* java_local::security::MessageDigest::getInstance(java::lang::String*)'
../java_libs/com/lowagie/text/pdf/pdf.a(PdfEncryption.o): In function `JArray<char>* com::lowagie::text::pdf::PdfEncryption::createDocumentId()':
ccWMwkN3.jar:(.text+0x9fc): undefined reference to `java_local::security::MessageDigest* java_local::security::MessageDigest::getInstance(java::lang::String*)'
../java_libs/com/lowagie/text/pdf/pdf.a(PdfEncryption.o):(.data+0x1e8): undefined reference to `java_local::security::MessageDigest::class$'
collect2: ld returned 1 exit status
make: *** [pdftk] Error 1
Looks, like the itext part of pdftk is staticaly linked for internal version of gcj part available in source tree... This patch available in slacky repository doesn't repair the makefiles in gcj-tree, but removes build commands from main makefile of java's tree.
Restoring those command and repairing the makefiles as mentioned above is the solution, I think
I am stupid!
I said previously, that the patch from Slacky.eu removes some commands from javas-part makefile, but I forgot to check the main makefile of whole source tree!.
Well, the patch removes definition of gcj libraries, so the ld tool cannot collect all information
Restoring these lines solute all!
I was able to make pdftk tool
I try to make the patch file, so I pase it into this thread soon...
There is some incompatibility with the recent gcj library - when I try to run pdftk made by myself, I got "Wrong ABI version" error message.
Still fighting
The problem with the patch from slacky.eu is that it is entirely UNIX formatted and the files you mentioned above are in DOS format. If you want to get a patch that actually works try this.
Don't open this up in a text editor as it may change the formatting. I used this patch in conjunction with another patch for gcc 4.4 on Slackware 13.0 and pdftk runs fine. I tested converting and combining some pdf's and it worked without any issues.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.