Hi, since i have USE="java" on my system, gcj is build. Well, for me gcj doesn't have much to do with java. I could do "USE=-java emerge gcc", but i would have to remind myself every time i compile gcc. Would be nice if you add an "nogcj" USE-flag. Reproducible: Always Steps to Reproduce: 1. 2. 3.
I will add it as an internal flag.
please dont, Martin. gcj is in fact java centric (it is the java compiler) and to add the diversion here is pretty bad. @reporter ; gcj isn't "java" in what sense? It doesn't fancy the javac way of reseolving depndencies, but falls back to Makefiles, however it does compile java (or .jar archives) so in what way isn't it java? solution: set a package-specific USE="-java" in /etc/portage. :)
Well, gcj is a Java to binary compiler. That's not what Java is for. Java is to be compiled to class-files. But let's not talk about if gcj is a good Java compiler or not, but gcj is not Java centric, really. In particular, i would wonder if there is any ebuild that depends on gcj. As i'm not asking to remove gcj from any gcc-ebuild, i don't see why this should be critical. The USE-flag is only for those that want to safe the time and space that gcj consumes and use "real" Java instead, and gcj will still be compiled for those people that have USE="java" and not USE="nogcj". The only prorblem is see is, that with USE="nogcj" my system wouldn't have libgcj or what it's called. So gcj-compiled programs won't run, but don't you think that this is a decision of the one who set's USE="nogcj"?
I think he have merit in the sence that it takes a long time to build, and is not really used. It does not have a VM or such, and thus only of use to those that want to compile java to binary, and the few odd builds that use it. The 'java' USE flag will still control if it is build or not. We just now have 'nogcj' to turn off gcj if you want java, but not gcj ...
Thx Martin, it works fine.
This is going to be a problem. Shortly (ie. I am working on this since a few weeks ago), the Java work in Gentoo is going to include JDK-style compatibility with GCJ (as in Redhat etc) so that a large set of dev-java and even auxiliary stuff such as Berkely DB can be built with GCJ (and not have to download another proprietary JDK). ie. Yes, you'll have a javac and java for GCJ. This negates the reporters first comment in Comment #3. If nogcj is allowed, then what is "emerge dev-java/gcj-jdk" supposed to do? Now we have breakage in portage due to the USE flag. We also have no way of specifying that ebuild X depends on virtual/jdk if a gcj-jdk is present. More breakage. Also, some ebuilds will use GCJ directly and again, we have can't depend on gcc as we did previously. This is no different from me suggesting a 'noc++' USE flag. Oh, but wait -- groff depends on C++!?! Here's two more arguments: Adding USE flags because a user thinks it will result in shorter build times sets a bad precedent. What are they sitting there watching gcc and other software build for anyway, I might ask?? GCJ is also the only way you can build a lot of Java libraries and applications without resorting to proprietary software. It might not mean much to you or I, but this can be a reason to avoid Gentoo for many folks.
Thinking about it, I'd agree with Spider -- USE='-java' should be used (which it already is).
Only a small subset of Java-software out there will run with gcj. If you an ebuild that depends on gcc because it needs gcj, this somewhat wrong too. gcj isn't gcc and the other way round. gcc is a C++ compiler, and gcj is a Java compiler. So i guess it isn't possible to write an ebuild that only builds gcj, or is it? If there would be an ebuild especially for gcj, that would solve the problems.
nogcj is different from noc++ :P you could try to push the portage people to fix the problem of being able to support certain useflags being enabled in DEPEND ... we've hit this kind of problem many times before (some apps need libraries with certain features enabled to compile)
Right, same issues with gtkpixbuf, etc. You could do: -- pkg_setup() { if ! which gcj &>/dev/null then eerror "Could not find gcj. Please remerge gcc with USE=\"java -nogcj\"" die "Could not find gcj!" fi }