tsp
tsp copied to clipboard
Bug in configure in tclparser
On FreeBSD 10 in lib/tclparser-1.4.1 configure crashes:
checking for correct TEA configuration... ok (TEA 3.2)
checking for Tcl configuration... found /usr/local/lib/tcl8.6/tclConfig.sh
checking for existence of /usr/local/lib/tcl8.6/tclConfig.sh... loading
...
checking how to build libraries... shared
checking for tclsh... /usr/local/bin/tclsh8.6
checking if 64bit support is enabled... no
checking if 64bit Sparc VIS support is requested... no
checking system version (for dynamic loading)... ./configure: 1: Syntax error: Unterminated quoted string
./configure: 7453: Syntax error: Error in command substitution
The line in question sure looks like a problem:
# Special check for weird MP-RAS system (uname returns weird
# results, and the version is kept in special file).
if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
system=MP-RAS-`awk '{print }' /etc/.relid'`
fi
Looks like it's a last ditch check for system type that was never completed. There should be something in the "awk" expression and there's definitely an extra quote after relid.
I tried doing an autoreconf and it didn't help.
Looks like doing "bash ./configure --with-tcl..." gets it to build even with the bad line. I suspect there's some subtle difference in the way bash and sh parse the code that's hiding the bug in bash. Still, best if the file was fixed.
I updated the flightaware fork of tsp's tclparser to TEA 3.9 and issued https://github.com/tpoindex/tsp/pull/10 back to this repo. If this has fixed the problem, please close this issue. Thanks.
That prevents the problem from being manifested, but this code needs to be fixed or removed.
if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
system=MP-RAS-`awk '{print }' /etc/.relid'`
fi
I changed this line
if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
system=MP-RAS-`awk '{print }' /etc/.relid'`
fi
to
if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
system=MP-RAS-`awk '{print }' /etc/.relid`
fi
and my problem solved.