autoconf
[Top][All Lists]
Advanced

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

failure in building po/Makefile due to crippled sed


From: Perry Hutchison
Subject: failure in building po/Makefile due to crippled sed
Date: Thu, 07 Mar 2019 02:07:56 -0800
User-agent: nail 11.25 7/29/05

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.

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" \
      -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
  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]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]