Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Java handling in Portage *stinks*!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
EPrime
Tux's lil' helper
Tux's lil' helper


Joined: 10 Aug 2002
Posts: 80
Location: Denmark

PostPosted: Mon Oct 16, 2006 10:37 pm    Post subject: Java handling in Portage *stinks*! Reply with quote

I'm not usually the kind of person that gets annoyed enough to go write a post about something, but the way Java works in Gentoo *really* ticks me off.

<rant>
The first majorly idiotic thing is that you can't simply write "emerge tomcat" and get something that works. No, for that you have to emerge Java first, since the overly complex Java management stuff in Gentoo doesn't seem to be able to figure out how to actually install a JDK for you. That should give pause for thought.

Right, well, no problem, I'll just emerge Java manually. Now, I know all my packages run fine with JDK 1.5, because that's the only JDK I used to have installed (since I'm on amd64 and Sun's JDK 1.4 isn't supported anyway). But there is no way for me to avoid installing JDK 1.4 if I wish to use portage to install packages. So now I have to install blackdown and risk compiling all my packages with some untested JDK that I'm never going to use for actually running the packages. I might as well install Jikes and re-live all the troubles you get from compiling with that. It'll be like running .NET apps on Mono - it's supposed to work just fine, but you never know when it's going to break. Thanks Gentoo, for also breaking Java.

What moron came up with this stuff? I realise some packages won't compile on 1.5, and that 1.4 is needed to ensure they will. That's fine, but why not add JDK 1.4 as a dependency (and 1.5 as a no-go dependency) to those packages instead of globally infecting my system with a useless JDK and a ton of completely unnecessary scripts that I have to learn about? The whole issue isn't helped by the hopelessly complicated upgrade path, which seems to have been designed to create the longest possible downtime.

Why the bleep didn't they just use the existing package dependency system for dealing with this? I'm stunned that this has made it into portage in the first place - doesn't anyone QA review major changes like this? What happended here?
</rant>

Gentoo used to be easy to maintain over time, but with changes like this I'm wondering if it's time to find a platform with fewer hassles :-(
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Oct 17, 2006 5:56 am    Post subject: Reply with quote

EPrime wrote:
What moron came up with this stuff?

That is overly harsh, most (probably all) of this foolishness is due to Sun not giving Java version numbers according to the scheme which Sun had published when they expanded the set of reserved words (amongst other things) in the 1.5 release.

EPrime wrote:
That's fine, but why not add JDK 1.4 as a dependency (and 1.5 as a no-go dependency) to those packages instead of globally infecting my system with a useless JDK and a ton of completely unnecessary scripts that I have to learn about?

Because that is not how Gentoo dependancies work. A 'no-go dependency' most closely equates with a package block which is not the relationship of a Java package which does not work with version 1.5 and a 1.5 (or higher) version Java environment.

EPrime wrote:
The whole issue isn't helped by the hopelessly complicated upgrade path, which seems to have been designed to create the longest possible downtime.

Again, not the fault of those maintaining Gentoo and attempting to maintain Java support under Gentoo.

EPrime wrote:
Why the bleep didn't they just use the existing package dependency system for dealing with this?

Because that would not work. The only viable way to avoid the problems associated with version 1.5 while hiding implementaio details from the users would be to force all ebuilds to depend on a given Java version (perhaps with point release granularity) and force that version to be used to build the package and to run it, which would require wrappers for every java program installed on a Gentoo system, which would merely add another layer of indirection for you to complain about.

EPrime wrote:
I'm stunned that this has made it into portage in the first place - doesn't anyone QA review major changes like this?

Major (and minor) changes do get evaluated before being made stable, if there is a specific issue either post in the forums to attempt to find a solution or, if appropriate, file a bug report.

EPrime wrote:
What happended here?

It is called dealing with upstream foolishness.

EPrime wrote:
Gentoo used to be easy to maintain over time, but with changes like this I'm wondering if it's time to find a platform with fewer hassles :-(

Please, post updates on your search. It should be quite interesting.
Back to top
View user's profile Send private message
EPrime
Tux's lil' helper
Tux's lil' helper


Joined: 10 Aug 2002
Posts: 80
Location: Denmark

PostPosted: Tue Oct 17, 2006 2:55 pm    Post subject: Reply with quote

You are quite right - I was not being entirely fair, and will therefore first apologize for the overly harsh language used above. I should also thank you for not jumping on the troll bandwagon :)

Quote:
Because that is not how Gentoo dependancies work. A 'no-go dependency' most closely equates with a package block which is not the relationship of a Java package which does not work with version 1.5 and a 1.5 (or higher) version Java environment.

This is because the "incompatible" packages cannot compile with 1.5, but in fact will run on a 1.5 VM once compiled. Afaik, the single most prevalent cause is the "enum" keyword, which has been reserved for other use in 1.5. Perhaps some quick sed processing of 1.4-sources could have fixed that in an automated way, allowing me to compile using 1.5.

Anyhow, let me summarize my concerns with how the Java system works:
  • I can see the sense in having a build and a system VM, but I seriously disagree with the choice to enfore the presence of a 1.4 VM. I know I don't need it, and it's certainly made my life as system administrator less simple.
  • Why do I need to add ~amd64 to most packages to install them? Java code depends on the VM and not the system architecture.
  • It should be able to install the required components without so many manual steps and choices.
  • There is no install guide for new users, only a poor upgrade guide.
  • The sun-jdk 1.4 does not work on amd64, so I am forced to go with something else. I'd be pleasantly surprised if I don't encounter weird problems stemming from having compiled with blackdown 1.4 and executing with sun-jdk 1.5. Issues like these are not mentioned by the docs, so users are left to wonder and try for themselves.
  • Java is now even more of a mess to get working if you're using a hardended profile, as you need to install and patch up two JDKs, and the installation ebuilds aren't themselves capable of using the PAX tools. This *is* a problem with Java and not hardened, because Java uses the compiler during install, and hence before I as a user can intervene. I'm not currently on hardened but this caused me major headaches in the past because the Java maintanters kept calling it a hardened issue.
  • I'd like to use Java 1.6, mainly because the 64-bit JDK 1.5 still has bugs in it, but somehow all this new stuff didn't allow for this? I find it strange that I cannot even try.

Again, I am not prone to calling people morons and am sorry about that. But more than one thing is not right with the current state of Java affairs..
Back to top
View user's profile Send private message
EPrime
Tux's lil' helper
Tux's lil' helper


Joined: 10 Aug 2002
Posts: 80
Location: Denmark

PostPosted: Tue Oct 17, 2006 3:06 pm    Post subject: Reply with quote

I should add that I've managed to get tomcat installed. Doing the "emerge tomcat" caused about 30 packages to be added as dependencies. Before I could even initiate the install I had to add about 20 packages to portage.keywords (to add ~amd64).

Installation halted several times during installation with an error. First, there was no Java system VM - fixed by manually emerging the blackdown JDK 1.4. Next, JUnit wouldn't install because Ant was broken - fixed by fiddling around with java-fixer-1.5 and other available tools (not too sure what eventually fixed it). Then some commons-package failed with a dependency error, which was fixed by some more fiddling (re-emerged Ant, ran env-update, java-fixer, etc.).

Eventually everything was done and I seem to be having a working tomcat installation. I don't applaud the procedure for getting here, but it does seem to be working so far!
Back to top
View user's profile Send private message
UncleOwen
Veteran
Veteran


Joined: 27 Feb 2003
Posts: 1493
Location: Germany, Hamburg

PostPosted: Tue Oct 17, 2006 3:18 pm    Post subject: Re: Java handling in Portage *stinks*! Reply with quote

EPrime wrote:
<rant>
The first majorly idiotic thing is that you can't simply write "emerge tomcat" and get something that works. No, for that you have to emerge Java first, since the overly complex Java management stuff in Gentoo doesn't seem to be able to figure out how to actually install a JDK for you.


Yeah, wrong.

Code:
DEPEND="java5? ( >=virtual/jdk-1.5 )
        !java5? ( =virtual/jdk-1.4* )

That's in tomcat-5.5.20-r1.ebuild, and makes portage install a jdk first. I didn't bother to read the rest of your rant.
Back to top
View user's profile Send private message
EPrime
Tux's lil' helper
Tux's lil' helper


Joined: 10 Aug 2002
Posts: 80
Location: Denmark

PostPosted: Tue Oct 17, 2006 3:41 pm    Post subject: Reply with quote

Quote:
Yeah, wrong.


That's really bright, considering that I just tried this, and it didn't install a JDK. It was listed all right, but way further down the install list, probably because some other dependency doesn't list a JDK as a dependency.

Would you like me to post my emerge.log file, showing how it aborted several times during installation? Your blind faith in Portage combined with a set of lacking abilities to foresee what could go wrong certainly aren't helping, and I'll be glad to provide the proof to my claims.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Oct 17, 2006 6:20 pm    Post subject: Reply with quote

I want a good clean fight, no sense in getting the moderators riled, but keep it interesting. If I am going to read a war of words I want entertainment.

Anyway, back to topic.
EPrime wrote:
You are quite right - I was not being entirely fair, and will therefore first apologize for the overly harsh language used above.

No harm done.

EPrime wrote:
I should also thank you for not jumping on the troll bandwagon :)

I prefer to jump on the troll bandwagon only when carrying demolition charges.

EPrime wrote:
Afaik, the single most prevalent cause is the "enum" keyword, which has been reserved for other use in 1.5. Perhaps some quick sed processing of 1.4-sources could have fixed that in an automated way, allowing me to compile using 1.5.

It should work to get the code to compile, but then there is the problem of the API. That way lies much hair.

EPrime wrote:
  • I can see the sense in having a build and a system VM, but I seriously disagree with the choice to enfore the presence of a 1.4 VM. I know I don't need it, and it's certainly made my life as system administrator less simple.

For the present time there is a reasonable case for that choice, though it would be better if there was a flag somewhere that the administrator could set which indicated a willingness to forgo a 1.4 version Java runtime and compiler, at least then you would know where things broke.

EPrime wrote:
  • Why do I need to add ~amd64 to most packages to install them? Java code depends on the VM and not the system architecture.

My guess: paranoia. How justified it is, I do not know.

EPrime wrote:
  • It should be able to install the required components without so many manual steps and choices.

In principle, agreed. Although some packages do make that goal elusive.

EPrime wrote:
  • There is no install guide for new users, only a poor upgrade guide.

An install guide would be nice, but the upgrade guide seems to work for most users.

EPrime wrote:
  • The sun-jdk 1.4 does not work on amd64, so I am forced to go with something else. I'd be pleasantly surprised if I don't encounter weird problems stemming from having compiled with blackdown 1.4 and executing with sun-jdk 1.5. Issues like these are not mentioned by the docs, so users are left to wonder and try for themselves.

I suspect that you will be pleasantly surprised as the Sun runtime and development kit packages are basically the Blackdown packages with some additional testing.

EPrime wrote:
  • Java is now even more of a mess to get working if you're using a hardended profile, as you need to install and patch up two JDKs, and the installation ebuilds aren't themselves capable of using the PAX tools. This *is* a problem with Java and not hardened, because Java uses the compiler during install, and hence before I as a user can intervene. I'm not currently on hardened but this caused me major headaches in the past because the Java maintanters kept calling it a hardened issue.

I was unaware of that.

EPrime wrote:
  • I'd like to use Java 1.6, mainly because the 64-bit JDK 1.5 still has bugs in it, but somehow all this new stuff didn't allow for this? I find it strange that I cannot even try.

Agreed, there should be an ebuild for at least one 1.6 development kit. One interesting point from the Gentoo Java Upgrade Guide:
Quote:
Java 1.6 will be made available as soon as it is released.


EPrime wrote:
Again, I am not prone to calling people morons and am sorry about that.

Call me lenient, but I think apologizing once was enough, then again I did not write any of the ebuilds or infrastructure under discussion here.

EPrime wrote:
But more than one thing is not right with the current state of Java affairs..

Agreed.
Back to top
View user's profile Send private message
dleverton
Guru
Guru


Joined: 28 Aug 2006
Posts: 517

PostPosted: Tue Oct 17, 2006 6:40 pm    Post subject: Reply with quote

EPrime wrote:
  • Why do I need to add ~amd64 to most packages to install them? Java code depends on the VM and not the system architecture.

Do you mean adding ~amd64 to /etc/portage/package.keywords, or to the ebuilds themselves? Either way, though, the rule is that things don't get keyworded without sufficient testing, even if they "should" be platform independant. There are reports that even vim scripts have been broken on some platforms but not others in the past.

Quote:
  • I'd like to use Java 1.6, mainly because the 64-bit JDK 1.5 still has bugs in it, but somehow all this new stuff didn't allow for this? I find it strange that I cannot even try.

desultory already mentioned that it'll be available once it's officially released, but if you really can't wait and want to try a beta, you can visit Gentoo Overlays and get it from the migrated-java-experimental-overlay.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Oct 17, 2006 6:59 pm    Post subject: Reply with quote

dleverton wrote:
desultory already mentioned that it'll be available once it's officially released, but if you really can't wait and want to try a beta, you can visit Gentoo Overlays and get it from the migrated-java-experimental-overlay.

I did not know that it was available in the overlay collection, thanks.

The reason that I posted a link to the early access downloads page was that Java Standard Edition version 1.6 (Beta) is available for testing and evaluation, which I think fits unstable testing in the main portage tree rather neatly.
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Germany

PostPosted: Tue Oct 17, 2006 7:59 pm    Post subject: Reply with quote

Moved from Portage & Programming to Gentoo Bit^WChat.
_________________
KDE
Back to top
View user's profile Send private message
fridrik
n00b
n00b


Joined: 18 Dec 2004
Posts: 51

PostPosted: Fri Oct 20, 2006 7:45 pm    Post subject: Reply with quote

dleverton wrote:
EPrime wrote:
  • Why do I need to add ~amd64 to most packages to install them? Java code depends on the VM and not the system architecture.

Do you mean adding ~amd64 to /etc/portage/package.keywords, or to the ebuilds themselves? Either way, though, the rule is that things don't get keyworded without sufficient testing, even if they "should" be platform independant. There are reports that even vim scripts have been broken on some platforms but not others in the past.

An example would be eclipse, which is not working properly when running with the ibm-jdk on a ppc platform
See https://bugs.gentoo.org/show_bug.cgi?id=148999 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=161182 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=143061

Yeah, Java was supposed to be platform indipendent, reality says it is *almost* platform indipendent
Back to top
View user's profile Send private message
wltjr
Retired Dev
Retired Dev


Joined: 31 Jan 2006
Posts: 73

PostPosted: Fri Oct 20, 2006 7:47 pm    Post subject: Reply with quote

I am not going to drag this out, but clearly allot of Gentoo documentation has not been read. Some of it like the Tomcat guide needs to be updated since stabilization of the new Java system.

https://overlays.gentoo.org/proj/java/wiki/Why_We_Need_Java14
http://www.gentoo.org/proj/en/java/java-upgrade.xml
http://www.gentoo.org/proj/en/java/tomcat-guide.xml
http://www.gentoo.org/proj/en/java/tiger-faq.xml
https://overlays.gentoo.org/proj/java/wiki/Old_system_new_system_and_why

Please review the following documents, they should address any and all questions, and objections. If not post a reply and we can go from there.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum