Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41256 - [RFE] would like to have "nogcj" use-flag
Summary: [RFE] would like to have "nogcj" use-flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-11 08:26 UTC by Sven
Modified: 2004-02-14 06:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven 2004-02-11 08:26:10 UTC
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.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-11 20:02:23 UTC
I will add it as an internal flag.
Comment 2 Spider (RETIRED) gentoo-dev 2004-02-12 00:03:06 UTC
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.  :)
Comment 3 Sven 2004-02-12 06:48:26 UTC
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"?
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-12 10:05:47 UTC
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 ...
Comment 5 Sven 2004-02-13 06:18:22 UTC
Thx Martin, it works fine.
Comment 6 Matthew Kennedy (RETIRED) gentoo-dev 2004-02-13 08:13:09 UTC
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.
Comment 7 Matthew Kennedy (RETIRED) gentoo-dev 2004-02-13 08:15:14 UTC
Thinking about it, I'd agree with Spider -- USE='-java' should be used (which it already is).
Comment 8 Sven 2004-02-13 08:22:49 UTC
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.
Comment 9 SpanKY gentoo-dev 2004-02-13 09:42:38 UTC
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)
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2004-02-14 06:29:18 UTC
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
}