[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Selecting a javac which supports at least Java5



On Thu, Mar 15, 2007 at 09:13:16PM +0100, Benjamin Mesing wrote:
> [Please CC, I am not subscribed]
>  
> > > >>> How do I ensure, that the correct compiler is used.
> > > >>> Is the only way, to explicitly set the java
> > > >>> compiler path (i.e. /usr/lib/jvm/java-1.5.0/bin/javac
> > > 
> > > >> Yes, that is the only correct way. We must be sure that the package
> > > >> builds with identical results on different systems,
> > > 
> > > > It's not so much that we need identical results, but the result must
> > > > use the same ABI, which isn't true across major Java versions.
> > > 
> > > Couldn't this be achieved using the "-target 1.5" switch for the javac
> > > compiler (even when using Java 1.6)?
> > 
> > Who says the results are the same? Who says the results are the same
> > with different JDK 5 implementations? 
> 
> I fail to see the reason why the results should be the same.
> Using /usr/bin/javac might as well lead to the usage of different Java
> compilers. The same goes for gcc. How is this case different?
> 
> > I agree with Marcus that its much
> > better to have one explicit Build-Dependency than a large collection and
> > slightly different results.
> 
> This means setting up tighter constraints (dependencies) than
> neccessary. In my opinion that's bad style. Besides it makes migrations
> a little harder. It also forces people wanting to build the package, who
> have the "wrong" compiler installed to install the "right" one, even
> though the "wrong" one would work just fine.

The main reason is reproducibility of builds. Builds done with different
compilers tend to have different issues. With the rule of restricting to
a reproducible build chain we make it easier to find and fix bugs. It
reduces workload for the team.


Cheers,
Michael
-- 
 .''`.  | Michael Koch <konqueror@gmx.de>
: :' :  | Free Java Developer <http://www.classpath.org>
`. `'   |
  `-    | 1024D/BAC5 4B28 D436 95E6 F2E0 BD11 5923 A008 2763 483B



Reply to: