Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145338 - azureus-2.5 forces use of ecj compiler
Summary: azureus-2.5 forces use of ecj compiler
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Petteri Räty (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 144760
Blocks:
  Show dependency tree
 
Reported: 2006-08-28 04:56 UTC by Chris Bainbridge (RETIRED)
Modified: 2007-05-20 23:23 UTC (History)
2 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 Chris Bainbridge (RETIRED) gentoo-dev 2006-08-28 04:56:24 UTC
The comment in the ebuild states that ecj is used as javac runs out of memory (not that surprising as the java default heap size is only 64MB). The correct solution to this problem is to increase the amount of memory available to javac, not force the use of a specific alternative compiler. Do something like "javac -J-Xmx256m". sci-libs/vtk and dev-util/weka both hardcode this in the ebuild, obviously it would be nice if this were done in a more generic way only when javac is used as the system compiler.
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-28 05:36:10 UTC
This was done previously, only for amd64 where the problem arised first (see bug 119400), then there was somebody who couldn't compile it even with 2048m limit (bug 141528). And on bug 144760 you can see it's hitting amd64 as well. So trying to fix javac is not easy, if not impossible for all cases. We even consider making ecj default compiler.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-28 05:36:48 UTC
(In reply to comment #1)
> limit (bug 141528). And on bug 144760 you can see it's hitting amd64 as well.
s/amd64/x86/
Comment 3 Chris Bainbridge (RETIRED) gentoo-dev 2006-08-28 06:58:24 UTC
The bug reports only say that increasing the amount of heap memory on amd64 makes no difference. I don't know why - I have no access to amd64 hardware to test. If it is the case that the jdk is broken on amd64, then there should be an open bug for this, and a bug should be filed upstream.

The reported case of x86 failing is because the java runtime really is running out of heapspace - your initial ebuild doesn't alter the maximum heap space.

The azureus-2.5.0.0 ebuild will compile fine on x86,sun-jdk-1.5.0.08, with ANT_OPTS="-Xmx128m".
Comment 4 Josh Nichols (RETIRED) gentoo-dev 2006-09-03 18:05:43 UTC
Even if increasing the maximum stack does address the problem, I do believe it is better to use ecj, as it seems to build fine every time and every arch. Plus, it ends up using less memory while doing so. Sounds like win-win to me. Is there some particular reason that using ecj is not appropriate to you?
Comment 5 Chris Bainbridge (RETIRED) gentoo-dev 2006-09-06 05:15:52 UTC
I just don't think forcing the compiler is the right answer. If a package fails to build with gcc, but works with icc, it would be considered unusual to workaround the problem by forcing the compiler to icc rather than fixing the gcc compile flags or tracking down the gcc bug and reporting it upstream. The same goes for compiling java. The other argument is that it is inconsistent to use ecj for just one package. If it is preferred over Sun's compiler, then it should be used to build all packages, not just azureus.
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2006-09-08 06:35:04 UTC
(In reply to comment #5)
> I just don't think forcing the compiler is the right answer. If a package fails
> to build with gcc, but works with icc, it would be considered unusual to
> workaround the problem by forcing the compiler to icc rather than fixing the
> gcc compile flags or tracking down the gcc bug and reporting it upstream. The
> same goes for compiling java. The other argument is that it is inconsistent to
> use ecj for just one package. If it is preferred over Sun's compiler, then it
> should be used to build all packages, not just azureus.
> 

ecj will indeed be our default in the future. Just don't want to do too many changes in one go as we have the gen 2 stuff to get stabilized.
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-05-20 22:47:55 UTC
I've revisited the related bugs and ebuild in sources.gentoo.org and I think all the tests with ANT_OPTS didn't export it, thus had no effect.
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2007-05-20 23:01:25 UTC
(In reply to comment #7)
> I've revisited the related bugs and ebuild in sources.gentoo.org and I think
> all the tests with ANT_OPTS didn't export it, thus had no effect.
> 

01:55 <@Caster> http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/azureus/azureus-2.4.0.2.ebuild?hideattic=0&rev=1.2&view=markup
01:56 <@Caster> and that's when the tests happened
01:57 <@Betelgeuse> Caster: well it works if ANT_OPTS is exported at that point

http://viewcvs.gentoo.org/viewcvs.py/gentoo-x86/net-p2p/azureus/azureus-2.3.0.6-r1.ebuild?hideattic=0&rev=1.2&view=markup
Comment 9 Petteri Räty (RETIRED) gentoo-dev 2007-05-20 23:02:19 UTC
Stupid paste. Here is the missing part:

01:58 <@Caster> so once it's exported by a env.d file, any non-exporting change in ebuild environment affects that too?
01:58 <@Betelgeuse> yes

But ant doesn't install this env.d file any more.
Comment 10 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-05-20 23:23:50 UTC
OK, 2.4.0.1-r1 (unstable) removes ecj dep/force and goes back to using 256m limit for amd64 and 128m for x86, which now should work because ANT_OPTS is exported.