[BUG] Quotes problem in calling rsh from script
"Deepak Barua" <[email protected]>
| Newsgroups | gmane.comp.sysutils.dejagnu.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi Everybody,
This seems to be the error
ERROR: tcl error sourcing
/opt/amos-ext/crosstool/crosstool-0.44-dbtest/build/arm-unknown-linux-gnu/gcc-4.2.2-glibc-2.7/gcc-4.2.2/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp.
ERROR: extra characters after close-quote
while compiling
"set status [catch "exec cat $inp | $RSH $rsh_useropts $hostname "sh
-c" '$cmd $pargs \\; echo XYZ\\\${?}ZYX' |& cat" output]
verbose "$RSH output ..."
(compiling body of proc "rsh_exec", line 50)
invoked from within
The '-c' or the '-f' option in rm -f gets interpreted as a option to
the 'rsh' program when actually it is meant for the command to be
executed after 'rsh' is executed ...
So i have included a patch which escapes the option characters ...
config.guess
amos@REDQUEEN:/dejagnu-1.4.4$ ./config.guess
x86_64-unknown-linux-gnu
I have also attached the config.log and the patch i have made to
correct this error.
Hope this is useful
Regards
Deepak
--
Hack Hack Hack
_______________________________________________
Bug-dejagnu mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-dejagnu
config.log
(text/x-log, 12.1 KB)
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.57. Invocation command line was
$ ./configure --prefix=/opt/amos-ext/crosstool/crosstool-0.44-dbtest/result/dejagnu
## --------- ##
## Platform. ##
## --------- ##
hostname = REDQUEEN
uname -m = x86_64
uname -r = 2.6.15-51-amd64-generic
uname -s = Linux
uname -v = #1 SMP PREEMPT Tue Feb 12 16:56:43 UTC 2008
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /opt/testtool/gcc-4.2.2-glibc-2.7/arm-unknown-linux-gnu/bin
PATH: /opt/amos-ext/crosstool/crosstool-0.44-dbtest/result/dejagnu/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/bin/X11
PATH: /usr/games
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1281: checking for a BSD-compatible install
configure:1335: result: /usr/bin/install -c
configure:1346: checking whether build environment is sane
configure:1389: result: yes
configure:1422: checking for gawk
configure:1438: found /usr/bin/gawk
configure:1448: result: gawk
configure:1458: checking whether make sets $(MAKE)
configure:1478: result: yes
configure:1642: checking whether to enable maintainer-specific portions of Makefiles
configure:1651: result: no
configure:1666: checking whether make sets $(MAKE)
configure:1686: result: yes
configure:1742: checking for gcc
configure:1758: found /usr/bin/gcc
configure:1768: result: gcc
configure:2012: checking for C compiler version
configure:2015: gcc --version </dev/null >&5
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2018: $? = 0
configure:2020: gcc -v </dev/null >&5
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
configure:2023: $? = 0
configure:2025: gcc -V </dev/null >&5
gcc: '-V' option must have argument
configure:2028: $? = 1
configure:2052: checking for C compiler default output
configure:2055: gcc conftest.c >&5
configure:2058: $? = 0
configure:2104: result: a.out
configure:2109: checking whether the C compiler works
configure:2115: ./a.out
configure:2118: $? = 0
configure:2135: result: yes
configure:2142: checking whether we are cross compiling
configure:2144: result: no
configure:2147: checking for suffix of executables
configure:2149: gcc -o conftest conftest.c >&5
configure:2152: $? = 0
configure:2177: result:
configure:2183: checking for suffix of object files
configure:2205: gcc -c conftest.c >&5
configure:2208: $? = 0
configure:2230: result: o
configure:2234: checking whether we are using the GNU C compiler
configure:2259: gcc -c conftest.c >&5
configure:2262: $? = 0
configure:2265: test -s conftest.o
configure:2268: $? = 0
configure:2281: result: yes
configure:2287: checking whether gcc accepts -g
configure:2309: gcc -c -g conftest.c >&5
configure:2312: $? = 0
configure:2315: test -s conftest.o
configure:2318: $? = 0
configure:2329: result: yes
configure:2346: checking for gcc option to accept ANSI C
configure:2407: gcc -c -g -O2 conftest.c >&5
configure:2410: $? = 0
configure:2413: test -s conftest.o
configure:2416: $? = 0
configure:2434: result: none needed
configure:2452: gcc -c -g -O2 conftest.c >&5
conftest.c:2: error: syntax error before 'me'
configure:2455: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:2575: checking for style of include used by make
configure:2603: result: GNU
configure:2631: checking dependency style of gcc
configure:2714: result: gcc3
configure:2784: checking for g++
configure:2800: found /usr/bin/g++
configure:2810: result: g++
configure:2826: checking for C++ compiler version
configure:2829: g++ --version </dev/null >&5
g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2832: $? = 0
configure:2834: g++ -v </dev/null >&5
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
configure:2837: $? = 0
configure:2839: g++ -V </dev/null >&5
g++: '-V' option must have argument
configure:2842: $? = 1
configure:2845: checking whether we are using the GNU C++ compiler
configure:2870: g++ -c conftest.cc >&5
configure:2873: $? = 0
configure:2876: test -s conftest.o
configure:2879: $? = 0
configure:2892: result: yes
configure:2898: checking whether g++ accepts -g
configure:2920: g++ -c -g conftest.cc >&5
configure:2923: $? = 0
configure:2926: test -s conftest.o
configure:2929: $? = 0
configure:2940: result: yes
configure:2984: g++ -c -g -O2 conftest.cc >&5
configure:2987: $? = 0
configure:2990: test -s conftest.o
configure:2993: $? = 0
configure:3020: g++ -c -g -O2 conftest.cc >&5
configure: In function 'int main()':
configure:3017: error: 'exit' was not declared in this scope
configure:3023: $? = 1
configure: failed program was:
| #line 3003 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "dejagnu"
| #define VERSION "1.4.4"
| /* end confdefs.h. */
|
| int
| main ()
| {
| exit (42);
| ;
| return 0;
| }
configure:2984: g++ -c -g -O2 conftest.cc >&5
configure:2987: $? = 0
configure:2990: test -s conftest.o
configure:2993: $? = 0
configure:3020: g++ -c -g -O2 conftest.cc >&5
configure:3023: $? = 0
configure:3026: test -s conftest.o
configure:3029: $? = 0
configure:3054: checking dependency style of g++
configure:3137: result: gcc3
configure:3166: checking for a BSD-compatible install
configure:3220: result: /usr/bin/install -c
configure:3237: checking for bison
configure:3253: found /usr/bin/bison
configure:3263: result: bison -y
configure:3277: checking for docbook tools
configure:3311: result: none
configure:3327: checking for the tclsh program
configure:3371: result: none
configure:3375: checking for tclsh
configure:3408: result: no
configure:3585: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by config.status, which was
generated by GNU Autoconf 2.57. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on REDQUEEN
config.status:662: creating Makefile
config.status:662: creating doc/Makefile
config.status:662: creating testsuite/Makefile
config.status:662: creating example/Makefile
config.status:662: creating testsuite/libdejagnu/Makefile
config.status:787: executing depfiles commands
configure:4593: configuring in example/calc
configure:4677: running /bin/sh './configure' --prefix=/opt/amos-ext/crosstool/crosstool-0.44-dbtest/result/dejagnu '--prefix=/opt/amos-ext/crosstool/crosstool-0.44-dbtest/result/dejagnu' --cache-file=/dev/null --srcdir=.
configure:4593: configuring in example/hello
configure:4677: running /bin/sh './configure' --prefix=/opt/amos-ext/crosstool/crosstool-0.44-dbtest/result/dejagnu '--prefix=/opt/amos-ext/crosstool/crosstool-0.44-dbtest/result/dejagnu' --cache-file=/dev/null --srcdir=.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_objext=o
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_YACC='bison -y'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=
ac_cv_prog_cxx_g=yes
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=gcc3
am_cv_CXX_dependencies_compiler_type=gcc3
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /opt/amos-ext/crosstool/crosstool-0.44-dbtest/dejagnu-1.4.4/missing --run aclocal-1.7'
AMDEPBACKSLASH='\'
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /opt/amos-ext/crosstool/crosstool-0.44-dbtest/dejagnu-1.4.4/missing --run tar'
AUTOCONF='${SHELL} /opt/amos-ext/crosstool/crosstool-0.44-dbtest/dejagnu-1.4.4/missing --run autoconf'
AUTOHEADER='${SHELL} /opt/amos-ext/crosstool/crosstool-0.44-dbtest/dejagnu-1.4.4/missing --run autoheader'
AUTOMAKE='${SHELL} /opt/amos-ext/crosstool/crosstool-0.44-dbtest/dejagnu-1.4.4/missing --run automake-1.7'
AWK='gawk'
BOARDS='$(boards)'
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-g -O2'
CONFIG='$(config)'
CPPFLAGS=''
CXX='g++'
CXXDEPMODE='depmode=gcc3'
CXXFLAGS='-g -O2'
CYGPATH_W='echo'
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"dejagnu\" -DVERSION=\"1.4.4\" '
DEPDIR='.deps'
DOCBOOK=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='${SHELL} /opt/amos-ext/crosstool/crosstool-0.44-dbtest/dejagnu-1.4.4/missing --run makeinfo'
OBJEXT='o'
PACKAGE='dejagnu'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
TCLSH=''
VERSION='1.4.4'
YACC='bison -y'
ac_ct_CC='gcc'
ac_ct_CXX='g++'
ac_ct_STRIP=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE='#'
am__fastdepCXX_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${prefix}/share'
exec_prefix='${prefix}'
host_alias=''
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/opt/amos-ext/crosstool/crosstool-0.44-dbtest/dejagnu-1.4.4/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/opt/amos-ext/crosstool/crosstool-0.44-dbtest/result/dejagnu'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
subdirs=' example/calc example/hello'
sysconfdir='${prefix}/etc'
target_alias=''
tclsh=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE "dejagnu"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "1.4.4"
#endif
#ifdef __cplusplus
#include <stdlib.h>
configure: exit 0
dejagnu-1.4.4.u5.patch
(text/x-patch, 1.8 KB)
diff -u5rN dejagnu-1.4.4/lib/remote.exp dejagnu-1.4.4/lib/remote.exp
--- dejagnu-1.4.4/lib/remote.exp 2003-10-11 12:12:46.000000000 +0530
+++ dejagnu-1.4.4/lib/remote.exp 2008-04-01 20:43:22.000000000 +0530
@@ -730,11 +730,11 @@
# Allow multiple files to be deleted at once.
foreach x $args {
append file " $x"
}
verbose "remote_file deleting $file"
- set status [remote_exec $dest "rm -f $file"]
+ set status [remote_exec $dest rm "$file"]
return [lindex $status 0]
}
}
}
diff -u5rN dejagnu-1.4.4/lib/rsh.exp dejagnu-1.4.4/lib/rsh.exp
--- dejagnu-1.4.4/lib/rsh.exp 2003-10-11 12:12:46.000000000 +0530
+++ dejagnu-1.4.4/lib/rsh.exp 2008-04-01 20:43:13.000000000 +0530
@@ -181,11 +181,11 @@
if [board_info $desthost exists hostname] {
set desthost [board_info $desthost hostname]
}
- set status [catch "exec $RSH $rsh_useropts $desthost rm -f $destfile |& cat" output]
+ set status [catch "exec $RSH $rsh_useropts $desthost \"rm -f\" $destfile |& cat" output]
set status [catch "exec $RCP $srcfile $rcp_user$desthost:$destfile |& cat" output]
if { $status == 0 } {
verbose "Copied $srcfile to $desthost:$destfile" 2
return $destfile
} else {
@@ -275,11 +275,11 @@
# no output but the exit code is non-zero.
if { $inp == "" } {
set inp "/dev/null"
}
- set status [catch "exec cat $inp | $RSH $rsh_useropts $hostname sh -c '$cmd $pargs \\; echo XYZ\\\${?}ZYX' |& cat" output]
+ set status [catch "exec cat $inp | $RSH $rsh_useropts $hostname \"sh -c\" '$cmd $pargs \\; echo XYZ\\\${?}ZYX' |& cat" output]
verbose "$RSH output is $output"
# `status' doesn't mean much here other than rsh worked ok.
# What we want is whether $cmd ran ok.
if { $status != 0 } {
regsub "XYZ(\[0-9\]*)ZYX\n?" $output "" output