RFR: 8294549: configure script should detect unsupported path

Magnus Ihse Bursie ihse at openjdk.org
Wed Oct 12 11:41:27 UTC 2022


On Thu, 29 Sep 2022 00:09:37 GMT, Mike Duigou <mduigou at openjdk.org> wrote:

> The OpenJDK build system does not support building when the source code resides on a path that contains a space. This requirement is documented in the build instructions but not enforced by the configure script.
> 
> This change adds an explicit checks to the wrapper `configure` script that fail the build if the source code to be built is located in a directory who's path contains a space character or the build path cannot be determined.
> 
> Includes some idiom modernization and shell scripting best practices changes.

I agree that `configure` should detect and enforce build requirements.

However, this is done in the wrong place. At the very least it should move to `make/autoconf/configure` as Erik says. 

But I think we can do even better. Normally, all checks that requirements are fulfilled are done by the actual autoconf script. We already do some checking on the top-level dir in `BASIC_SETUP_PATHS` in `basic.m4`. This would be the proper place to also check for spaces.

Or is it the case that we cannot even start to execute the real autoconf script if there are spaces in the path? If so, I think we should fix those issues by proper quoting. We can't do that over the entire code base, but I think we can afford to do that in the bootstrapping part, so we can actually get to the real configure script.

Oh, and hi Mike! :) Long time no see... (Didn't at first understand this was you)

-------------

PR: https://git.openjdk.org/jdk/pull/10477



More information about the build-dev mailing list