On 3/7/19 4:07 AM, Perry Hutchison wrote: > Feel free to direct me elsewhere if this is not the proper list > for this report. I have not found any similar reports, either > in the autoconf archives or elsewhere, but it's certainly possible > that I didn't look in the right place. As the creation of po/Makefile is due to code from the gettext project, your report will probably go further there. Autoconf is not the source of this particular sed command. > > In attempting to build some of the GNU development tools on a Linux > system that lacks them, I am encountering issues when config.status > attempts to generate Makefiles for "po" directories. For example, > this sed command (reformatted, and with some parts not relevant to > the current issue omitted): > > sed -e "/^POTFILES =/r $ac_dir/POTFILES" \ $ git grep 'sed .*/r' turns up nothing for autoconf.git sources, but DOES hit in m4/po.m4 in gnulib.git, where it is in turn kept in sync from upstream gettext. > -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" \ > -e "s|@POFILES@|$POFILES|g" \ > ... \ > -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" \ > "$ac_dir/Makefile.in" > "$ac_dir/Makefile" > > produces this error message when executed (while attempting to build > GNU make): > > config.status: executing po-directories commands > config.status: creating po/POTFILES > config.status: creating po/Makefile > sed: -e expression #1, char 14: e/r/w commands disabled in sandbox mode That's a bummer that your system has a non-POSIX-compliant sed by default. I don't know where you'd complain to get that fixed, but POSIX requires '/address/r file' to work; we'll probably have to come up with ways to workaround your system's brain-dead policy, and could patch the autoconf documentation to mention this as a new portability pitfall of using POSIX-specified sed features. > config.status: creating build.sh > > leading me to suspect that this system's native sed has been crippled > to always operate in "sandbox" mode, even without "--sandbox" having > been specified on the command line. > > The resulting po/Makefile does not resemble Makefile.in at all. > Later on, when "./make DESTDIR=... install" descends into the po > directory: > > Making install in po > make[1]: *** No rule to make target 'install'. Stop. > > The same sed error message arises in attempting to build other GNU tools, > including gettext (which is a dependency of GNU sed, so I haven't been > able to build GNU sed to use in place of the system's crippled version). > > While the root cause of these failures is the broken sed, it would > certainly help if configure checked for such breakage and generated > a workaround when needed, e.g. replacing the above sed command with > something along the lines of: > > sed -e '/^POTFILES =/+1,$d' \ > -e "s|@POFILES@|$POFILES|g" \ > ... \ > -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" \ > "$ac_dir/Makefile.in" > Temp1 > sed -e '1,/^POTFILES =/d' -e '/^# Makevars/+1,$d' \ > -e "s|@POFILES@|$POFILES|g" \ > ... \ > -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" \ > "$ac_dir/Makefile.in" > Temp2 > sed -e '1,/^# Makevars/d' \ > -e "s|@POFILES@|$POFILES|g" \ > ... \ > -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" \ > "$ac_dir/Makefile.in" > Temp3 > cat Temp1 "$ac_dir/POTFILES" Temp2 "$ac_given_srcdir/$ac_dir/Makevars" \ > Temp3 > "$ac_dir/Makefile" > rm Temp[123] That's up to the authors of the specific .m4 files that tried to use sed's r command. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf