NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/57431: tool m4 can't regen tools/compat/configure



>Number:         57431
>Category:       toolchain
>Synopsis:       tool m4 can't regen tools/compat/configure
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 24 07:00:01 +0000 2023
>Originator:     Luke Mewburn
>Release:        NetBSD 9.99.101
>Organization:
NetBSD
>Environment:
System: NetBSD thoreau 9.99.101 NetBSD 9.99.101 (THOREAU.git) #58: Sun Oct 23 22:10:19 AEDT 2022 simonb@thoreau:THOREAU amd64
Architecture: x86_64
Machine: amd64

>Description:
It's not possible to run "$TOOLDIR/bin/make -C tools/compat regen"
with $TOOLDIR/bin/nbm4 as the m4 implementation for tools/autoconf;
nbm4 complains about a regular expression used within autoconf.
GNU M4 works fine.

This makes it tricky to regen tools/compat after modifying
tools/compat/configure.ac for other issues.

The tools/compat regen (before mine with this workaround) was on 2021-02-25.
Possibly relevant changes:
- usr.bin/m4:
	I couldn't see any obvious changes in usr.bin/m4
	(besides documentation) after 2020-06-27.
- lib/libc/regex on netbsd-9 (for the host $TOOLDIR/bin/nbm4)
	Last commit on netbsd-9 was 2019-02-07

>How-To-Repeat:
lukem@thoreau 380> /home/lukem/obj/amd64/tools/bin/nbmake-amd64 MAKEVERBOSE=2 -C tools/compat regen
#     regen  configure
cd /home/lukem/src/netbsd/src/tools/compat && /home/lukem/obj/amd64/tools/bin/nbautoconf
nbm4: configure.ac at line 22: regular expression error: repetition-operator operand invalid for: `\\|`|\$\(|\${|@'
nbautom4te: /home/lukem/obj/amd64/tools/bin/nbm4 failed with exit status: 1

*** Failed target:  regen
*** Failed command: cd /home/lukem/src/netbsd/src/tools/compat && /home/lukem/obj/amd64/tools/bin/nbautoconf

>Fix:
If I modify tools/autoconf/Makefile to use GNU m4 as gm4 (from pkgsrc):
	#CONFIGURE_ENV+=        M4=${TOOL_M4:Q}" -g -D__gnu__"
	CONFIGURE_ENV+= M4=gm4
and install that version of autoconf, then I can do the regen.

I may add a (temporary) conditional override to tools/autoconf/Makefile
to allow similar overrides without requiring editing that Makefile.



Home | Main Index | Thread Index | Old Index