autoconf-patches
[Top][All Lists]
Advanced

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

Re: carriage return line endings vs. literal ^M in status.m4


From: Jim Meyering
Subject: Re: carriage return line endings vs. literal ^M in status.m4
Date: Sat, 05 Apr 2008 13:14:30 +0200

Ralf Wildenhues <address@hidden> wrote:
> Hello Jim,
>
> * Jim Meyering wrote on Sat, Apr 05, 2008 at 11:48:49AM CEST:
>>
>> I've been working through some odd problems related to a user's
>> attempt to build recent coreutils snapshots on a Maemo/OS2008 system.

Just got a clarification (stale Subject was misleading).
This is for OS/2 (www.ecomstation.com Ecs v2 rc4), not Maemo/OS2008.

>> So far I've hit two problems:
>> The first affected coreutils only (configure.in):
>> The second (discovered minutes ago) affects the very latest autoconf:
>
> Thanks for the report.  It would be nice to see the results of 'make
> check' of the Autoconf package with this patch applied.

Elbert just replied privately.
My patch didn't help.
It's failing with sed's unterminated `s' command,
which makes me think this related code is the true culprit:

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" < "$tmp/subs1.awk" > 
"$tmp/subs.awk" \
  || AC_MSG_ERROR([could not setup config files machinery])
_ACEOF

When $ac_cr is ^M on a system where that is also the EOL marker,
that's exactly the error you'd get, just as on a NL-based system,
you get this:

nl='
'
sed "s/$nl//"

    sed: -e expression #1, char 2: unterminated `s' command

Now, I wonder  if this is a fundamental violation of assumptions.

Elbert, I don't know if there are actually any important ^M bytes in
coreutils' case, but you might be able to proceed at least with coreutils
configuration if you change these lines:

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" < "$tmp/subs1.awk" > 
"$tmp/subs.awk" \
  || { { $as_echo "$as_me:$LINENO: error: could not setup config files 
machinery" >&5
$as_echo "$as_me: error: could not setup config files machinery" >&2;}
   { (exit 1); exit 1; }; }
_ACEOF

to these (i.e., change the sed... to mv...

cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
mv "$tmp/subs1.awk" "$tmp/subs.awk" \
  || { { $as_echo "$as_me:$LINENO: error: could not setup config files 
machinery" >&5
$as_echo "$as_me: error: could not setup config files machinery" >&2;}
   { (exit 1); exit 1; }; }
_ACEOF




reply via email to

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