Case sensitive bug building on WIndows
Erik Joelsson
erik.joelsson at oracle.com
Fri Jan 11 00:52:54 PST 2013
Thank you for spotting and reporting this. As it happens, I discovered
this exact issue yesterday while trying to debug a problem with
configure that happened to another developer and I just got confirmation
from him that this change fixed it. I didn't have a machine where it
would reproduce myself. This report gives further confirmation that the
fix is correct. I will work on getting it in ASAP.
/Erik
On 2013-01-10 18:52, Stephen Colebourne wrote:
> I spent most of today trying to solve a problem preventing the new
> build autoconf from working, when it had worked last night.
>
> Between last night and lunchtime today, I reinstalled cygwin (E drive
> in instead of C drive) and setup the permissions correctly (previously
> there were effectively no permissions enforced, now there are
> permissions). One of these things borked the script.
>
> After a good four or five hours, we traced the problem to line 16423
> (and its friend line 16407) in this file:
> http://hg.openjdk.java.net/build-infra/jdk8/file/52c14058a460/common/autoconf/generated-configure.sh
>
> Basically, the Microsoft SDK has a file named "SetEnv.Cmd", where the
> "Cmd" is clearly weird, when it should be "cmd". But in WIndows,
> things are not case sensitive. By changing the permissions from no
> permissions to explicit permissions, the file had gone from executable
> allowed (implicitly, with no permissions) to explicitly not
> executable. The "which" command thus no longer found the "SetEnv.Cmd",
> as the cmd file was not marked as executable. The block of code linked
> above is explicitly designed to work around the limitations of
> "which", but failed because it only checked for "cmd", not case
> insensitive "cmd".
>
> Changing the line from:
> && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
> to:
> && test "x`$ECHO \"$path\" | $GREP -ie \"\\.bat$\" -ie \"\\.cmd$\"`" != x \
> makes it ignore case, and the autoconf completed successfully.
>
> I'd also note that I wasted a lot of time trying to follow the advice
> of not mixing spaces, when that really wasn't the problem at all.
>
> Stephen
More information about the build-infra-dev
mailing list