pdftk for Slackware64-current.
Hi,
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}}} 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}}} Or maybe some one of You knows there is somewhere a ready to use package for Slack64-13 (or -current)? TIA. |
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.
|
Hi :)
Almost done. I found on slacky.eu repository a SlackBuild script for this tool, and a patch to enable compilation on gcc 4.3. Here is the patch: http://repository.slacky.eu/slackwar...-gcc-4.3.patch But the source files are not clean, and this patch is not applied for every file they should. You probably get some rejection on 3 Makefiles: $SRC-DIR/java_libs/com/lowagie/text/pdf/codec/Makefile $SRC-DIR/java_libs/com/lowagie/text/pdf/codec/postscript/Makefile $SRC-DIR/java_libs/com/lowagie/text/pdf/codec/wmf/Makefile 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 Currently trying to make the package for x86_64... (tfu tfu ;)) |
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()': |
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 :) How to produce a patch file for entire tree? |
Damn... Compilation still unsuccesfull :/ The same result, as above... Still, undefinied reference.
|
I am stupid! :redface:
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... |
If you succeed, you should try to contact the maintainer of the slackbuild for an update for slackware 13.
|
I have been fighting this one for awhile, thanks for getting on the right track.
|
Quote:
|
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 ;) |
Quote:
Code:
# wget http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/app-text/pdftk/files/pdftk-1.41-gcc-4.3.patch Code:
# wget http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/app-text/pdftk/files/pdftk-1.41-gcc-4.4.patch I've tried this on i486 so I don't know if the above works on x86_64. |
Just tried larryhaja's patch and it worked. Thanks!
|
Doesn't seem to work on x86_64 but it is good to have it working on my 32bit machine, thanks!
|
Disagree - works for me on x86_64 platform with small change :)
In Makefile.Generic You need to add -fPIC option into CPPFLAGS and CXXFLAGS vars, and run the make with LDFLAGS="-L/usr/lib64" envar :) No more "Incorrect ABI version" issues, and pdftk is fully working now! Thanks for the patches :hattip: |
All times are GMT -5. The time now is 04:13 PM. |