RFR: JDK-8062521: 9-dev glinux/elinux "configure: error: Could not find all X11 headers" since 2014-10-28
David Holmes
david.holmes at oracle.com
Thu Oct 30 12:31:03 UTC 2014
Hi Erik,
Seems reasonable. Did this not fail when run through JPRT? Is it
something shell specific?
David
On 30/10/2014 9:40 PM, Erik Joelsson wrote:
> Hello,
>
> In my fix for "JDK-8062159 Fix Xrender check to work with sysroot", I
> added $SYSROOT_CFLAGS to the CFLAGS used when looking for X11 headers.
> Unfortunately, this didn't work with at least one of the cross compile
> kits we use. The reason for the failure is in the definition of
> SYSROOT_CFLAGS:
>
> SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
>
> It adds explicit extra quotes around the value. These quotes seem to not
> be a problem when the variable is used in a recipe in make, but when the
> variable is used directly in the shell from configure, the extra quotes
> become part of the argument to gcc. Gcc will fail resolving the path and
> the test for X11 headers fails.
>
> I see no reason for having these quotes other than if we expected spaces
> in the path to the sysroot, which I sure hope we aren't, as we do not
> employ any such protection for any other paths that I know of. The fix
> is then simply to remove the extra quotes when using gcc. I chose not to
> change the other defintions of the variable as they seem to be working.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8062521#comment-13570672
> Patch:
> diff -r ce3b04a39f79 common/autoconf/flags.m4
> --- a/common/autoconf/flags.m4
> +++ b/common/autoconf/flags.m4
> @@ -136,8 +136,8 @@
> SYSROOT_CFLAGS="-isysroot \"$SYSROOT\"
> -iframework\"$SYSROOT/System/Library/Frameworks\""
> SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
> elif test "x$TOOLCHAIN_TYPE" = xgcc; then
> - SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
> - SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
> + SYSROOT_CFLAGS="--sysroot=$SYSROOT"
> + SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
> elif test "x$TOOLCHAIN_TYPE" = xclang; then
> SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
> SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
>
> /Erik
More information about the build-dev
mailing list