FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 03-14-2010, 02:37 PM
Edgar Kalkowski
 
Default pdftk - almost build but died - need help figuring out if I can find a work-around

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
 
Old 03-15-2010, 05:06 AM
"David C. Rankin"
 
Default pdftk - almost build but died - need help figuring out if I can find a work-around

On 03/14/2010 10:37 AM, Edgar Kalkowski wrote:
> 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

Edgar,

Thank you for the excellent explanation! I guess it will be up to the
maintainer or another arch dev to see if this package can be fixed to compile
against the current java and gcc. I'll drop a note in the AUR page letting the
maintainer know, but this has been out of date so long, I'm not sure what
response we will get. I'll keep you posted if I can snatch victory from the jaws
of defeat.

--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
 
Old 03-15-2010, 05:39 AM
"David C. Rankin"
 
Default pdftk - almost build but died - need help figuring out if I can find a work-around

On 03/15/2010 01:06 AM, David C. Rankin wrote:
> On 03/14/2010 10:37 AM, Edgar Kalkowski wrote:
>> Am oder ungefhr am Freitag, 12. Mrz 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.
>>

Just a FYI, looks like fedora has pdftk with a gcc44 patch:

http://cvs.fedoraproject.org/viewvc/rpms/pdftk/F-13/

I'll also drop a note at AUR

--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
 
Old 03-17-2010, 02:16 PM
Edgar Kalkowski
 
Default pdftk - almost build but died - need help figuring out if I can find a work-around

Am oder ungefähr am Montag, 15. März 2010, schrieb David C. Rankin:
> On 03/15/2010 01:06 AM, David C. Rankin wrote:
> > On 03/14/2010 10:37 AM, Edgar Kalkowski wrote:
> >> 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.
> >>
>
> Just a FYI, looks like fedora has pdftk with a gcc44 patch:
>
> http://cvs.fedoraproject.org/viewvc/rpms/pdftk/F-13/

That looks interesting. But wouldn’t that require gcc 4.4 to be build with Java support? BEcause I tried that and sadly couldn’t get it working because of my lack of understanding the PKGBUILD …
 

Thread Tools




All times are GMT. The time now is 11:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org