#3337 configure crashes with bash 3.1 in two macros

obsolete: 8.4.12
closed-duplicate
nobody
5
2006-01-03
2005-12-27
Anonymous
No

I attempted to build tcl 8.4.12 on my Linux system with
a bash 3.1 shell. The configure script failed as follows:

checking system version (for dynamic loading)...
../configure: line 7653: syntax error near unexpected
token `)'
../configure: line 7653: ` OSF*)'

I tracked the problem down to the following line (2484
in the shipped configure script):

system=MP-RAS-`awk '{print }' /etc/.relid'`

Note the extra ' just before the final back-quote. This
is the cause of the problem. Later on, the same issue
appears again at line 7640.

The two occurrences of the offending line appear to
come from the macros SC_CONFIG_CFLAGS and
SC_BLOCKING_STYLE, defined in the Tcl-specific autoconf
macros in unix/tcl.m4. It looks like a typo to me.
Removing the extra quote lets the script run correctly.

Since 8.4.12 presumably would not have shipped with a
bad configure script, I'm assuming that older versions
of bash were less picky about quote parsing.

For additional info, please contact me at
jbuhler@cse.wustl.edu .

Discussion

  • Tim Mooney

    Tim Mooney - 2005-12-27

    Logged In: YES
    user_id=36222

    Patch 001 for bash 3.1 was posted just recently, and it
    includes fixes for some parsing problems introduced in 3.1.
    Have you tried that patch to see if it fixes the issue
    you're running into?

     
  • Franck Bourdonnec

    Logged In: YES
    user_id=1041094

    Hello,
    I confirm this problem (under debian)

    v 8.4.11

    Line 2133 & 7611, configure have extra quote '
    after "relid" word.

    bash with or without bug, it is ALSO a syntax error
    in tcl configure script

    system=MP-RAS -`awk '{print }' /etc/relid' `
    is false
    system=MP-RAS -`awk '{print }' /etc/relid `
    is correct

    Error appears twice.

    Thank you for correcting this because many 'builds' are
    broken because of this typo!

    Bye
    Franck

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2006-01-03
    • status: open --> closed-duplicate
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2006-01-03

    Logged In: YES
    user_id=72656

    This is already fixed in CVS, but was an error that has been
    in the sh script for a while. bash's 3.1 parsing changes
    just uncovered it.

     
  • Reinhard Max

    Reinhard Max - 2006-01-04

    Logged In: YES
    user_id=124643

    I just checked an unpatched Tcl 8.4.12 with a bash that has
    the patch mentioned by enchanter applied, and the error
    still happens.

     
  • Dennis

    Dennis - 2006-01-07

    Logged In: YES
    user_id=53417

    I'm having the same problem with bash-3.1 but cannot find Patch
    001.

    Do you have a link?

     
  • Reinhard Max

    Reinhard Max - 2006-01-07

    Logged In: YES
    user_id=124643

    That bash patch fixes some other parsing problems, but as
    said in my last comment, it doesn't help with the typo in
    Tcl's configure script. So even with that patch applied to
    bash, you still need to fix tcl.m4 and re-generate the
    configure script, or fix the configure script directly, if
    you don't have autoconf at hand to re-generate it.

    So, just for completness. The bash-patch that is useless in
    regard to this bug in tcl.m4 can be found here:
    http://ftp.gnu.org/gnu/bash/bash-3.1-patches/bash31-001