On Mon, 21 Aug 2023 07:13:37 GMT, Koichi Sakata <ksak...@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.

Marked as reviewed by erikj (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/15357#pullrequestreview-1591629329

Reply via email to