Integrated: 8314555: Build with mawk fails on Windows

Koichi Sakata ksakata at openjdk.org
Thu Aug 24 00:35:36 UTC 2023


On Mon, 21 Aug 2023 07:13:37 GMT, Koichi Sakata <ksakata at openjdk.org> wrote:

> Building JDK with mawk on windows fails due to regular expression. I use WSL Debian. Debian has mawk as the default awk implementation.
> 
> $ awk
> Usage: mawk [Options] [Program] [file ...]
> 
> $ make images
> Building target 'images' in configuration 'windows-x86_64-server-fastdebug'
> ...
> nawk: line 1: regular expression compile failed (missing operand)
> ??_7.*@@6B@
> 
> The meta character '?' is not escaped, so the error occurs. I added an escape sequence prefix to it. Incidentally, this doesn't happen if we use gawk instead of mawk. Gawk works fine with or without the prefix.
> 
> ### Check
> I've built JDK with both awk and they are successful. Additionally, I checked the result of both awk executions. I saved each result to a file during the build.
> 
> $(JVM_OUTPUTDIR)/symbols-objects: $(BUILD_LIBJVM_ALL_OBJS)
> 	$(call LogInfo, Generating symbol list from object files)
> 	$(CD) $(JVM_OUTPUTDIR)/objs && \
> 	  $(DUMP_SYMBOLS_CMD) | $(AWK) $(FILTER_SYMBOLS_AWK_SCRIPT) | $(SORT) -u > [FILE]
> 
> The file from gawk before applying this PR, the file from mawk after applying this PR and the file from gawk after applying this PR were the same.
> 
> ### Note
> 
> Only the windows build uses this regular expression. I also tried to look for non-escaped meta characters in the make directory, but there were none.

This pull request has now been integrated.

Changeset: 3285a1ef
Author:    Koichi Sakata <ksakata at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/3285a1efc8d3372338b87f70e28fa2158bac629d
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8314555: Build with mawk fails on Windows

Reviewed-by: erikj

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

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


More information about the build-dev mailing list