Re: config.status[12]: export: SHELL##: is not an identifier

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

 



On 2024-08-06 09:07, Zack Weinberg wrote:
> On Mon, Aug 5, 2024, at 10:32 PM, Paul Eggert wrote:
>> On 2024-08-05 15:24, Bob Friesenhahn wrote:
>>> This one is old and not a "supported" release. It is "omnios- 
>>> r151030-6484b6d7b5".
>>
>> If the bug is limited to unsupported releases let's not worry about it. 
> 
> This bug was in Illumos core for many years so I don't think we can
> safely assume it isn't in any currently supported OS just because the
> one person who's taken the trouble to tell us about it is on an old
> machine.

FWIW, the standalone test case fails also fails on the ksh93 included
with AIX 7.2 (but on this system, /bin/sh is some ksh88 derivative and
is not affected):

  % ksh93 -c 'echo ${.sh.version}
  Version M 93t+ 2009-05-01

  $ ksh93 t-001fa2.sh 
  cmp: EOF on /tmp/tmp1
  + od -tx1 /tmp/tmp0
  0000000  24 0a
  0000002
  + od -tx1 /tmp/tmp1
  0000000  24
  0000001
  + exit 1
  + rm -f /tmp/tmp0 /tmp/tmp1
  
I had to implement my own mktemp workalike on this system to run the
test case which was a bit annoying but whatever.

The comment in the bug report suggests it only occurs on here-documents
containing \$ and the only consequence is a deleted final newline.

Assuming that's a true characterization, can the problem be worked
around by just adding an extra newline to the end of such here-documents?
If I add an extra newline to the second here-document in t-001fa2.sh
then only one of them is dropped on the floor by AIX's ksh93.

This would result in an extra newline on non-buggy shells, but I imagine
that's not typically a problem for config.status generation?

Alternately, the problem might be worked around by using a different syntax
to include a literal dollar sign in a here-document, maybe:

var='$'
do_stuff <<EOF
${var}
EOF

Finally, perhaps Autoconf could scan the generated configure script to look
for this problem and print a warning?  It sounds like it could be worked
around pretty easily by the user too (or maybe even by Autoconf itself)
by just adding an extra space somewhere in the configure script.

Cheers,
  Nick




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux