Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196080 - [gcj-overlay] building ant-core-1.7.0 with ecj failes
Summary: [gcj-overlay] building ant-core-1.7.0 with ecj failes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 21477
  Show dependency tree
 
Reported: 2007-10-16 18:54 UTC by Christoph Brill (egore) (RESIGNED)
Modified: 2008-07-16 21:25 UTC (History)
3 users (show)

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


Attachments
Patches build.xml to use 1.3, not 1.2 (ecj.patch,596 bytes, patch)
2007-10-28 15:56 UTC, 2010dli
Details | Diff
Ebuild using ecj.patch (ant-core-1.7.0.ebuild,2.52 KB, text/plain)
2007-10-28 15:56 UTC, 2010dli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Brill (egore) (RESIGNED) 2007-10-16 18:54:19 UTC
I tried to build ant-core-1.7.0 with ecj today. Gentoo uses a "custom" build.xml that uses source=1.2 as parameter for ant. Ecj rejects this source level with the message:

build-core:
Compiling 50 source files to /var/tmp/portage/dev-java/ant-core-1.7.0/work/apache-ant-1.7.0/build/classes
source level should be comprised in between '1.3' and '1.6' (or '5', '5.0', ..., '7' or '7.0'): 1.2

It would be good to use source=1.3 in this case.

Reproducible: Always

Steps to Reproduce:
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2007-10-16 19:45:23 UTC
I thought the ant-core ebuild built it always with javac?
Comment 2 Christoph Brill (egore) (RESIGNED) 2007-10-17 09:15:46 UTC
Using gcj to build ant-core it's build with ecj first.
Comment 3 Roy Wright 2007-10-18 07:12:23 UTC
I'm seeing the same issue.

At the end of the build, the following is emitted:

!!! When you file a bug report, please include the following information:
GENTOO_VM=gcj-jdk-4.3  CLASSPATH="." JAVA_HOME="/usr/lib/gcj-4.3.0_alpha20070921"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the output of emerge --info

The interesting part is the JAVACFLAGS="source 1.4 -target 1.4"

Looking at the eclasses, I'm thinking that java-pkg_get-source and java-pkg_get-target are being set to 1.4.  I did not see where javac.source and javac.target properties are being rewritten in the build.xml.

I tried overriding JAVA_PKG_WANT_SOURCE.  The original error didn't change (but the JAVACFLAGS did reflect the new value).
Comment 4 2010dli 2007-10-28 04:32:38 UTC
Some relevant lines from /var/tmp/portage/dev-java/ant-core-1.7.0/work/apache-ant-1.7.0/build.xml:
...
<project name="apache-ant" default="main" basedir=".">
...
  <!--
       ===================================================================
         Set the properties that control various build options
       ===================================================================
  -->
...
  <property name="javac.target" value="1.2"/>
  <property name="javac.source" value="1.2"/>
...
Comment 5 2010dli 2007-10-28 15:56:12 UTC
Created attachment 134543 [details, diff]
Patches build.xml to use 1.3, not 1.2
Comment 6 2010dli 2007-10-28 15:56:43 UTC
Created attachment 134544 [details]
Ebuild using ecj.patch
Comment 7 2010dli 2007-10-28 15:57:37 UTC
The patch I just uploaded modifies the relevant lines in build.xml that cause ecj to fail.
Comment 8 Hanno Zysik (geki) 2008-03-04 11:20:30 UTC
Or you add 'java-ant_bsfix_one build.xml' at the end of src_unpack().
But please fix this annoying problem, thanks! :)
Comment 9 Andrew John Hughes 2008-04-13 21:43:46 UTC
Adding 

sed -i 's#1\.2#1.3#' build.xml

to the end of src_unpack also solves this.
Why is this being built with such an old bytecode version in the first place?
Comment 10 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2008-07-16 21:25:26 UTC
(In reply to comment #8)
> Or you add 'java-ant_bsfix_one build.xml' at the end of src_unpack().
> But please fix this annoying problem, thanks! :)
 
That's the right way :) Fixed in CVS in ant-core-1.7.1-r1, thanks!