Nathan,

My solution was to collect classpath in the temporary file. No
external configs is needed. I'm too lazy to look into archive for the
original message so I write it again here. In brief it uses the
"executable" property of the ant "javac" task. The sample ant script
looks like this:

===
<!-- set up ecj -->
<property name="ecj.jar" value="..."/><!-- we have it defined in depends.xml -->
<property name="ecj.batch.class"
value="org.eclipse.jdt.internal.compiler.batch.Main"/>
<property name="javac.batch" value="${build.output}/javac.bat"/><!--
or whatever -->

<condition property="javac.batch.content" value="%JAVA_HOME%\bin\java
-cp ${ecj.jar} ${ecj.batch.class} %*">
 <os family="Windows"/>
</condition>
<condition property="javac.batch.content"  value="$JAVA_HOME/bin/java
-cp ${ecj.jar} ${ecj.batch.class} $*">
 <os family="unix"/>
</condition>

<target name="prepare.batch">
   <echo message="${javac.batch.content}" file="${javac.batch}"/>
   <!-- plus probably chmod 0755 for *NIX -->
</target>

<target name="compile" description="Compile sources" depends="prepare.batch">
   <mkdir dir="${classes.dir}"/>
   <javac srcdir="..."
          destdir="..."
          classpath="..."
          target="${hy.javac.target}"
          source="${hy.javac.source}"
          deprecation="on"
          debug="on"
          debuglevel="lines,vars,source"
          nowarn="off"
          fork="yes"
          executable="${javac.batch}"
          includeAntRuntime="no"/>
</target>
===

Probably it has some drawbacks but it works at least. I may provide a
patch for the current build scripts if we decide to use this approach.

Thanks,

2006/10/13, Nathan Beyer <[EMAIL PROTECTED]>:
On 10/13/06, Alexei Zakharov <[EMAIL PROTECTED]> wrote:
> > I'd prefer to be using ECJ for our compiler, but I haven't heard
> > anything lately about getting that back into the build scripts.
>
> Do we still have a problem with it? If so - I've been using ecj for
> building the classlib for quite a long time already (without any
> tricks with moving ecj jar from one place to another). I believe I've
> already posted my configs one or two months ago.

Yes, there are certain generics syntax quirks that won't compile on
Sun's 5.0_7 compiler, but are valid. I've used ECJ for the builds as
well, but we need to get it integrated into build script, so that is
the default and works without config.

I'm not an Ant expert, so I'm not sure how to dynamically add items to
Ant's classpath. I'm guessing it could be introduced in the top-level
build's call to build-java.xml.

-Nathan

>
> Regards,
>
> 2006/10/13, Nathan Beyer <[EMAIL PROTECTED]>:
> > As Geir mentions, there a compiler difference's in Sun's JDK. The
> > changes are noticeable between 5.0_7 and 5.0_8. Note: Sun as released
> > 5.0_9.
> >
> > I'd prefer to be using ECJ for our compiler, but I haven't heard
> > anything lately about getting that back into the build scripts.
> >
> > -Nathan
> >
> > On 10/12/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Weldon Washburn wrote:
> > > > My tools are:
> > > >
> > > > - WindowsXP
> > > >    - MSVS .NET 2003
> > > >    - ant-1.6.5
> > > >    - Sun JDK 1.5.0_07_b03
> > > >
> > > > - Linux
> > > >    - gcc 3.4.5
> > > >    - ant-1.6.5
> > > >    - IBM JDK 1.5.0_08_b03
> > > >    - make 3.8.0
> > > >
> > > > How about the following first stab at Geir's idea of  "will work" tool
> > > > chains?  The idea is to quickly converge the below so that I can call a
> > > > vote
> > > > on it.
> > >
> > > I don't think we'll need a vote here - we'll be able to come to
> > > agreement without that.
> > >
> > > >
> > > > -WindowsXP on laptop, Windows Server 2003 on servers
> > > >     - MSVS .NET 2003
> > > >    - ant-1.6.5
> > > >    - Java JDK 1.5.0_xxxx
> > > >
> > > > - Linux
> > > >    - gcc 3.4.xxx or higher
> > > >    - ant-1.6.5
> > > >    - Java JDK 1.5.0_xxxx
> > > >    - make 3.8.0 or higher
> > >
> > >
> > > We need a strict version of Java, I think, because IIRC, there was
> > > problems with a recent patch level of the compiler from Sun.  I don't
> > > remember how that was resolved.
> > >
> > > I think that we also should try to switch completely to the eclipse
> > > compiler, so we can include it as a downloaded dependency, and we all
> > > are building using the same thing.
> > >
> > > also, I'd like to define a "maximum" for the version of gcc/g++  - IOW,
> > > we want to test up to 4.x.y, so when 4.x.z appears, we need to test 
first...
> > >
> > > >
> > > >
> > > >
> > > >
> > > > On 10/12/06, Pavel Ozhdikhin <[EMAIL PROTECTED]> wrote:
> > > >>
> > > >> To update the statistics, my tools:
> > > >>
> > > >> - MS Windows Server 2003 / IA32:
> > > >>       MSVS .NET 2003
> > > >>       ant-1.6.5
> > > >>       JRockit JDK 1.5.0_03
> > > >>
> > > >> - Linux / IA32:
> > > >>       gcc 3.3.3
> > > >>       GNU make 3.80
> > > >>       ant-1.6.5
> > > >>       JRockit JDK 1.5.0
> > > >>
> > > >> Thanks,
> > > >> Pavel
> > > >>
> > > >> On 10/10/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote:
> > > >> > I'm so sick of this gcc problem.
> > > >> >
> > > >> > Lets decide on the versions for GCC and other tools that "will
> > > >> work".  I
> > > >> > feel the same way that mark does re that being able to build on
> > > >> multiple
> > > >> > versions gives a better feeling of goodness and harmony in the 
universe
> > > >> > and I encourage people to work on other versions (I will), but it's
> > > >> > gotta be the case that we have a "reference toolchain" - that no 
matter
> > > >> > what, it will work on there, and probably a list of tested versions
> > > >> >
> > > >> > So, what tools and what versions are people working with ?   here's a
> > > >> > partial list of mine :
> > > >> >
> > > >> > 1) WinXP : Visual Studio .NET 2003
> > > >> >
> > > >> > 2) Linux x86 :
> > > >> >     GCC : 3.4.6
> > > >> >     g++ : 3.4.6
> > > >> >     make : 3.81b4
> > > >> >
> > > >> > What are you using?  what other tools should we list?
> > > >> >
> > > >> > I recently setup a new machine (linux) and now have the complete
> > > >> list of
> > > >> > stuff that has to be installed (starting from fresh ubuntu6) and will
> > > >> > post that on the getting started document on teh website.
> > > >> >
> > > >> >
> > > >> > geir


--
Alexei Zakharov,
Intel Enterprise Solutions Software Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to