[patch] proposal for ecj and NIO2 compatiblity check during configure
xerxes at zafena.se
Fri Feb 20 03:00:30 PST 2009
I noticed today that the patch i posted failed to extract the version
number correctly on all ECJ versions. Some ECJ versions have an added
comma after the versionnumber like this:
xerxes at labbserver:~/icedtea6$ ecj -version
Eclipse Java Compiler v_774_R33x, 3.3.1, Copyright IBM Corp 2000, 2007.
All rights reserved.
and on these versions with a comma of ecj the versionnumber check will
miss since "3.3.1" != "3.3.1,"
gnu_andrew pointed out during a irc session that some 3.3.0 versions of
ecj compiles NIO2 without a hitch so a version check is not that
reliable to determine if a NIO2 compile will fail with ecj.
Consensus turned out that the best way to make sure NIO2 can get built
was to run a small regressiontest during configure that tested the ecj
compiler. I will try create such a test based on code from the classpath
CVS: m4/ac_prog_javac_works.m4 and hopefully post another patch.
Xerxes Rånby skrev:
> Greetings, I was compiling the mercurial tip of icedtea6 on a Ubuntu
> LTS 8.04 Hardy Heron machine and to my surprise a default configured
> build stopped in midair. It turned out my installed ecj version 3.3.1
> was not up to the task of compiling the cool backported NIO2 stuff.
> I have created a patch that checks for this incompatible version of
> ecj with NIO2 during configure thus giving the user a choice how to
> resolve the situation gracefully. If the check fails then this gets
> checking version of ECJ... 3.3.1
> configure: error: "ECJ version 3.3.1 cant compile NIO2 - try upgrade
> ecj to >= 3.4.1 or use --disable-nio2"
> Suggestions are welcome!
> Cheers and have a great day!
More information about the distro-pkg-dev