Re: pdftk - almost build but died - need help figuring out if I can find a work-around

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Am oder ungefähr am Freitag, 12. März 2010, schrieb David C. Rankin:
> Guys,
> 
> 	I need pdftk for a script I use that does fax processing. I ran into this
> problem 6-7 months ago, but still had another server with pdftk on it so it
> wasn't critical. Now, I need to solve it.

Hi David!

I always liked to have pdftk around and one or two years ago built it from aur. But then at some point I uninstalled it and now I cannot build it again because I get the very same error you describe here.

> 	Currently pdftk in AUR is out of date due to it a dependency of gcc-gcj
> requiring it to be built against gcc-4.3. The building gcc-4.3 and then gcc-gcj
> part of the pdftk build goes fine (takes forever, but goes fine). The build
> seems to crater on a java-lib issue. Here is the actual error with a few lines
> of context:
> 
> ----------- 8< -------------
> gcj -march=x86-64 -mtune=generic -O2 -pipe -w --encoding=UTF-8
> --classpath="/usr/share/java/libgcj-4.3.jar:/home/david/arch/pkg/bld/pdftk/src/pdftk-1.41/java_libs"
> -c Anchor.java -o Anchor.o
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org.eclipse.jdt.internal.compiler.batch.GCCMain

This exception means that gcj was looking for a class named org.eclipse.jdt.internal.compiler.batch.GCCMain and could not find it in the class path.

>    at gnu.java.lang.MainThread.run(libgcj.so.9)
> Caused by: java.lang.ClassNotFoundException:
> org.eclipse.jdt.internal.compiler.batch.GCCMain not found in
> gnu.gcj.runtime.SystemClassLoader{urls=[file:/usr/share/java/eclipse-ecj.jar],
> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}

This part explains a little more details about what the classpath was gcj looked in. It seems that the only file in the classpath at this point is /usr/share/java/eclipse-ecj.jar which is consistent with the call of gcj above (notice the --classpath argument).

If you look into eclipse-ecj.jar you find that it contains a class named org.eclipse.jdt.internal.compiler.batch.Main and thus I think that this class was renamed at some point after gcj 4.3 was released. So it seems that this is indeed a java library issue.

I did another test and tried to run gcj on a simple Hello-World java file and it failed with the same exception. So it seems not to be a problem with the pdftk build process but rather that the old gcj does not work anymore with the current eclipse-ecj package.

I then looked at the current gcc PKGBUILD and thought I could compile it with java support but failed because I don’t really understand the gcc PKGBUILD (which is rather complex I think).

> ----------------- 8< ---------------------
> 	The problem is I am no good at figuring out what this is telling me I need to
> do to fix it. I know there was an exception thrown in thread "main"
> java.lang.NoClassDefFoundError: ........ what I don't know is whether this is
> telling me there is a javalib version mismatch or something similar and whether
> this is something I might work around by loading/building some alternative java
> package, etc..
> 	If you have any idea what is going on here, please pass along a pointer or two.
> If this is just one of those areas where I'm screwed and there isn't a way
> around it -- well knowing that would be helpful too. Thanks.

If you find out anything more or even get pdftk to build again I would really like to know how to do that! :)

Good luck!

Edgar

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux