Your message dated Fri, 19 Aug 2022 14:06:07 +0200
with message-id <[email protected]>
and subject line Re: Debian version of dash fails to parse binutils/GDB 
opcodes/configure script
has caused the Debian Bug report #692902,
regarding Debian version of dash fails to parse binutils/GDB opcodes/configure 
script
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
692902: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692902
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dash
Version: 0.5.7-3
X-Debbugs-CC: [email protected], [email protected]


[The binutils and GDB lists are CCed for your information, in case
someone else is seeing the same weirdness.]


Hi!

As of commit cb1b797bd918eca0f8b99e31803e44a0629b93fc in GDB's Git
repository, respectively commit ff557cac634a7675676cb84a573ceadd8b4dbbcb
in binutils' (<git://sourceware.org/git/binutils.git>,
<git://sourceware.org/git/gdb.git>), the current (0.5.7-3) Debian version
of dash apparently fails to parse this revision of opcodes/configure.
Having configured »/bin/sh -> dash«, this issue reproduces in the same
way on both a x86 Debian GNU/Linux and Debian GNU/Hurd system.

    $ git clone git://sourceware.org/git/binutils.git
    $ cd binutils/
    $ git checkout cb1b797bd918eca0f8b99e31803e44a0629b93fc
    $ mkdir b
    $ cd b/
    $ ../configure SHELL=/bin/dash
    $ make configure-opcodes
    [...]
    checking for gcc option to accept ISO C89... none needed
    checking for library containing strerror... none required
    checking for a BSD-compatible install... [...]/opcodes/configure: 3285: 
./configure.lineno: Syntax error: "}" unexpected (expecting ";;")
    make: *** [configure-opcodes] Error 1

When I edit opcodes/configure to put »set -v -x« in its second line, and
re-run »make configure-opcodes«, I see:

    [...]
                  test -s conftest.dir/conftest.two
                then
                  ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
                  break 3
                fi
              fi
            fi
          done
    };
    /home/thomas/tmp/source/gdb/git/opcodes/configure: 3285: 
./configure.lineno: Syntax error: "}" unexpected (expecting "done")
    + exit_status=2
    [...]

Note that the error message now changed from »expecting ";;"« to
»expecting "done"«.  The »};« at the beginning of the line is unexpected;
the »set -v«-logged code here indeed looks differently from what
opcodes/configure contains:

    [...]
                  test -s conftest.dir/conftest.two
                then
                  ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
                  break 3
                fi
              fi
            fi
          done
        done
        ;;
    esac
    
      done
    [...]

In another instance of this issue, I've seen different corruption:
instead of the misplaced »};« I saw »ruct buf« which I suppose stems from
»struct buf« used in a here-document earlier in the file.  So, there
appears to be some corruption in dash's parser?

While said commit cb1b797bd918eca0f8b99e31803e44a0629b93fc (respectively
ff557cac634a7675676cb84a573ceadd8b4dbbcb for GDB), does trigger this
issue (when using the revision just before, configuration finishes
successfully), I don't think it's the cause; this commit appears to be an
unrelated and valid change.

If I build the current upstream version of dash (commit
46abc8c6d8a5e9a5712bdc1312c0b6960eec65a4; just »configure && make«), and
in the binutils/GDB top-level Makefile's »configure-opcodes:« rule
(beginning at line 2902) replace the »$(SHELL) $${libsrcdir}/configure«
with »[...]/dash $${libsrcdir}/configure« (making it use the current
upstream version of dash for the opcodes/configure script), configuration
finishes successfully.  Likewise, when using bash there is no such
problem.


Grüße,
 Thomas

Attachment: pgpYXYlMsD5Lp.pgp
Description: PGP signature


--- End Message ---
--- Begin Message --- This bug has been fixed in dash version 0.5.8-2, shipped in Debian 9 (stretch).

--
Gioele Barabucci

--- End Message ---

Reply via email to