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

Re: Selecting a javac which supports at least Java5



[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.

Regards Ben



Reply to: