RFR: 8019229: Build Configuration Fail in Windows Platform
Tim Bell
tim.bell at oracle.com
Thu Jun 27 16:40:21 UTC 2013
Erik:
Looks good. Approved.
Tim
> I found the problem. It seems the new version of sed isn't ignoring \r
> characters in the same way as the old one must have. The fix is simple
> so posting it inline below. The output from cl.exe contains a \r at
> the end of each line. This needs to be stripped off before meaningful
> comparisons can happen.
>
> diff -r c156084add48 common/autoconf/toolchain.m4
> --- a/common/autoconf/toolchain.m4
> +++ b/common/autoconf/toolchain.m4
> @@ -47,7 +47,7 @@
> elif test "x$OPENJDK_TARGET_OS" = xwindows; then
> # First line typically looks something like:
> # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
> 16.00.30319.01 for 80x86
> - COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
> + COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
> COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n
> "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"`
> COMPILER_VENDOR="Microsoft CL.EXE"
> COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*
> for \(.*\)$/\1/p"`
>
> I'm able to generate identical spec.gmk files (except for timestamps)
> with both old and new sed, and using old sed, with or without the fix.
>
> /Erik
>
> On 2013-06-27 07:53, Dan Xu wrote:
>> Hi All,
>>
>> I updated my cygwin in my windows 7 yesterday. And since then, the
>> build configuration failed to work. After investigating the build
>> issue, I find the problem is related with the sed package updated in
>> the cygwin. The latest sed package in cygwin is version 4.2.2-1. If I
>> downgrade my sed package to version 4.2.1-2 and re-run the
>> configuration, everything works fine again.
>>
>> I am not sure whether the issue is the latest sed itself, such as a
>> bug in sed 4.2.2-1. Or our build scripts need to be updated to work
>> with the new sed version.
>>
>> Here is the error message,
>>
>> checking for DirectX SDK include dir...
>> /cygdrive/c/progra~2/micros~1.0sd/Include
>> configure: Rewriting DXSDK_INCLUDE_PATH to
>> "/cygdrive/c/progra~2/micros~1.0sd/include"
>> checking for cl... /cygdrive/c/Program Files (x86)/Microsoft Visual
>> Studio 10.0/VC/BIN/amd64/cl
>> configure: Rewriting CC to
>> "/cygdrive/c/progra~2/micros~2.0/vc/bin/amd64/cl"
>> checking resolved symbolic links for CC...
>> /cygdrive/c/progra~2/micros~2.0/vc/bin/amd64/cl
>> checking if CC is disguised ccache... no, keeping CC
>> configure: error: Target CPU mismatch. We are building for x86_64
>> but CL is for "; expected "x64".
>> configure exiting with result code 1
>>
>>
>> I just reported a bug for this failure at jdk-8019229. Thanks!
>>
>> -Dan
More information about the build-dev
mailing list