View previous topic :: View next topic |
Author |
Message |
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Fri Jun 10, 2005 6:25 pm Post subject: More Java 1.5 (or 5 if you prefer) pain |
|
|
I Often get things like
Code: |
compile:
[mkdir] Created dir: /var/tmp/portage/avalon-logkit-1.2/work/LogKit-1.2/buil d
[mkdir] Created dir: /var/tmp/portage/avalon-logkit-1.2/work/LogKit-1.2/buil d/classes
[javac] Compiling 69 source files to /var/tmp/portage/avalon-logkit-1.2/work /LogKit-1.2/build/classes
[javac] javac: target release 1.2 conflicts with default source release 1.5
BUILD FAILED
/var/tmp/portage/avalon-logkit-1.2/work/LogKit-1.2/build.xml:331: Compile failed ; see the compiler error output for details.
Total time: 5 seconds
!!! ERROR: dev-java/avalon-logkit-1.2 failed.
!!! Function src_compile, Line 65, Exitcode 1
!!! Compilation failed
!!! If you need support, post the topmost build error, NOT this status message.
|
From builds as I am using Java 1.5 - is there ANYTHING that I can do about this (on a consistant basis), other than backing off the Java version - which isn't really an option as then you have 1.5->other version incompatibility pains, as a lot of my system is compiled with 1.5.
Also is this something that portage could handle automagically? - as often I've fixed these errors by editing the build.xml files to set 'target' and 'source'. |
|
Back to top |
|
|
kustos Apprentice
Joined: 10 Sep 2003 Posts: 168
|
Posted: Fri Jun 10, 2005 7:43 pm Post subject: Re: More Java 1.5 (or 5 if you prefer) pain |
|
|
db_404 wrote: |
Also is this something that portage could handle automagically? - as often I've fixed these errors by editing the build.xml files to set 'target' and 'source'. |
Congrats, you understood the problem and the solution. Maybe this helps:
https://forums.gentoo.org/viewtopic-t-317253.html
Rumors are they are working on a special ant target that lets you specify `source' und `target' via java-config. Considering what has happended in the last year, I don't expect this anytime soon. |
|
Back to top |
|
|
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Sat Jun 11, 2005 1:06 am Post subject: |
|
|
An ant task seems like a reasonable way of tackling the problem - conceptually you could subclass the javac task and force set the source and target from settings in java-config. That way it would simply be a textual replace of javac with gentoo-javac or whatever in the build files.
Your XSLT aproach has the advantage of being somewhat simpler and a little less invasive.
But something really needs to be done - gentoo is a great server platform, but if you are going to have trouble running some of the newer Java code people will pass over it as a distribution. |
|
Back to top |
|
|
robbyjo Guru
Joined: 06 Apr 2003 Posts: 462
|
|
Back to top |
|
|
db_404 Guru
Joined: 05 Dec 2002 Posts: 336
|
Posted: Sat Jun 11, 2005 4:38 pm Post subject: |
|
|
Yes - but normally the build files that gentoo is building from either do not use it, or use only source - which breaks things under 1.5. The gentoo maintainers can't be expected to manually edit all the build files for java packages in the tree, so as an alternative you make a gentoo specific task that handles setting the source & target attributes + also integrates with java-config.
At least I assume that was the idea. |
|
Back to top |
|
|
robbyjo Guru
Joined: 06 Apr 2003 Posts: 462
|
Posted: Sat Jun 11, 2005 6:34 pm Post subject: |
|
|
True. But someone ought to post a patch or something. It should be a trivial patch. |
|
Back to top |
|
|
kustos Apprentice
Joined: 10 Sep 2003 Posts: 168
|
Posted: Sat Jun 11, 2005 11:31 pm Post subject: |
|
|
robbyjo wrote: | True. But someone ought to post a patch or something. It should be a trivial patch. |
No, such a patch would be huge, affecting possibly every java ebuild. But a script that does this, would be quite simple. Like my XSLT stylesheet for example. |
|
Back to top |
|
|
herberteuler n00b
Joined: 02 Apr 2005 Posts: 33
|
Posted: Sun Jun 12, 2005 2:23 am Post subject: |
|
|
For me, Java 1.5 sdk from Sun is weak. I can't compile a CORBA program which is passed in jdk 1.4. I don't know what about other things in this version.
Regards,
herberteuler |
|
Back to top |
|
|
robbyjo Guru
Joined: 06 Apr 2003 Posts: 462
|
Posted: Sun Jun 12, 2005 11:54 am Post subject: |
|
|
kustos wrote: | robbyjo wrote: | True. But someone ought to post a patch or something. It should be a trivial patch. |
No, such a patch would be huge, affecting possibly every java ebuild. But a script that does this, would be quite simple. Like my XSLT stylesheet for example. |
Well, trivialities lie on the simplicity of the patch. Someone could come up with a Perl script that modify javac ant tag and it should be easy enough. |
|
Back to top |
|
|
kustos Apprentice
Joined: 10 Sep 2003 Posts: 168
|
Posted: Sun Jun 12, 2005 8:46 pm Post subject: |
|
|
robbyjo wrote: |
Someone could come up with a Perl script that modify javac ant tag and it should be easy enough. |
I don't see why perl should be better for XML-processing than XSLT. But even if it was, a script still is no patch. |
|
Back to top |
|
|
bll0 Apprentice
Joined: 22 May 2004 Posts: 178
|
Posted: Mon Jun 13, 2005 12:35 pm Post subject: |
|
|
herberteuler wrote: | For me, Java 1.5 sdk from Sun is weak. I can't compile a CORBA program which is passed in jdk 1.4. I don't know what about other things in this version.
|
I am using Sun JDK 1.4.2 for root and for my standard user 1.5. This helps when emerge breaks, but I can still use and develop with 1.5 in my normal environment. Until know I didn't discover any problems with applications built with 1.4 and running with 1.5
Maybe this might help you? _________________ I need a girl whose name doesn't end in .jpg |
|
Back to top |
|
|
|