bug-grep
[Top][All Lists]
Advanced

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

Re: grep-2.9.69-f91c on OSF/1


From: Bruno Haible
Subject: Re: grep-2.9.69-f91c on OSF/1
Date: Fri, 11 Nov 2011 23:06:09 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Jim Meyering wrote:
> > It comes from tests/Makefile:
> >
> > TESTS_ENVIRONMENT = \
> >   tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.; \
> >   TMPDIR=$$tmp__; export TMPDIR;                \
> >   export                                        \
> >   VERSION='$(VERSION)'                          \
> >   ...
> >
> > The syntax "export VAR=VALUE" is not guaranteed by this shell.
> > Either write "env VAR=VALUE ...", or "VAR=VALUE; export VAR; ..."
> >
> > SHELL is defined as
> > SHELL = /bin/ksh
> >
> > $ grep CONFIG_SHELL config.status
> > SHELL=${CONFIG_SHELL-/bin/ksh}
> >   $as_echo "running CONFIG_SHELL=/bin/ksh $*" >&6
> >   CONFIG_SHELL='/bin/ksh'
> >   export CONFIG_SHELL
> 
> Hi Bruno,
> 
> Thanks for the report.
> Can you work around it by running something like
> "make CONFIG_SHELL=bash"?

$ make check CONFIG_SHELL=bash
$ make check SHELL=bash
$ make check SHELL=/opt/fsw/bin/bash

all fail in the same way.

Even when I change config.status, replacing
  S["SHELL"]="/bin/ksh"
by
  S["SHELL"]="/opt/fsw/bin/bash"
then tests/Makefile contains
  SHELL = /opt/fsw/bin/bash
but "make check" still fails the same way. Apparently only GNU make, not
OSF/1 'make', considers the SHELL variable from the Makefile.

> I would much rather recommend that work-around than pessimize all
> "make check" rules like that -- and just for a few old, losing systems.

It's a lot of prerequisiste work to have to install bash and GNU make,
for being able to install GNU grep. Past these two hurdles, all grep
tests pass and 2 gnulib tests fail (test-exclude2.sh, test-exclude5.sh).

> I'll let others worry about these failures.

Then here's a proposed patch.


2011-11-11  Bruno Haible  <address@hidden>

        Fix test suite execution failure on OSF/1 5.1.
        * tests/Makefile.am (TESTS_ENVIRONMENT): Use only the portable form of
        the 'export' shell built-in.

diff -r -u multibuild-1488/linux/grep-2.9.69-f91c/tests/Makefile.am 
grep-2.9.69-f91c/tests/Makefile.am
--- multibuild-1488/linux/grep-2.9.69-f91c/tests/Makefile.am    2011-10-10 
14:41:27.000000000 +0200
+++ grep-2.9.69-f91c/tests/Makefile.am  2011-11-11 22:45:13.000000000 +0100
@@ -102,30 +102,29 @@
 # http://udrepper.livejournal.com/11429.html
 MALLOC_PERTURB_ = 1
 
-TESTS_ENVIRONMENT =                            \
-  tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.;        \
-  TMPDIR=$$tmp__; export TMPDIR;               \
-  export                                       \
-  VERSION='$(VERSION)'                          \
-  LOCALE_FR='$(LOCALE_FR)'                      \
-  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'            \
-  AWK=$(AWK)                                   \
-  GREP_OPTIONS=''                              \
-  LC_ALL=C                                     \
-  abs_top_builddir='$(abs_top_builddir)'       \
-  abs_top_srcdir='$(abs_top_srcdir)'           \
-  abs_srcdir='$(abs_srcdir)'                   \
-  built_programs='grep egrep fgrep'            \
-  srcdir='$(srcdir)'                           \
-  top_srcdir='$(top_srcdir)'                   \
-  CC='$(CC)'                                   \
-  GREP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'` \
-  MAKE=$(MAKE)                                 \
-  MALLOC_PERTURB_=$(MALLOC_PERTURB_)           \
-  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'     \
-  PACKAGE_VERSION=$(PACKAGE_VERSION)           \
-  PERL='$(PERL)'                               \
-  SHELL='$(SHELL)'                             \
+TESTS_ENVIRONMENT =                                                         \
+  tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.;                                
     \
+  TMPDIR=$$tmp__; export TMPDIR;                                            \
+  VERSION='$(VERSION)'; export VERSION;                                        
     \
+  LOCALE_FR='$(LOCALE_FR)'; export LOCALE_FR;                               \
+  LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'; export LOCALE_FR_UTF8;                \
+  AWK=$(AWK); export AWK;                                                   \
+  GREP_OPTIONS=''; export GREP_OPTIONS;                                        
     \
+  LC_ALL=C; export LC_ALL;                                                  \
+  abs_top_builddir='$(abs_top_builddir)'; export abs_top_builddir;          \
+  abs_top_srcdir='$(abs_top_srcdir)'; export abs_top_srcdir;                \
+  abs_srcdir='$(abs_srcdir)'; export abs_srcdir;                            \
+  built_programs='grep egrep fgrep'; export built_programs;                 \
+  srcdir='$(srcdir)'; export srcdir;                                        \
+  top_srcdir='$(top_srcdir)'; export top_srcdir;                            \
+  CC='$(CC)'; export CC;                                                    \
+  GREP_TEST_NAME=`echo $$tst|sed 's,^\./,,;s,/,-,g'`; export GREP_TEST_NAME; \
+  MAKE=$(MAKE); export MAKE;                                                \
+  MALLOC_PERTURB_=$(MALLOC_PERTURB_); export MALLOC_PERTURB_;               \
+  PACKAGE_BUGREPORT='$(PACKAGE_BUGREPORT)'; export PACKAGE_BUGREPORT;       \
+  PACKAGE_VERSION=$(PACKAGE_VERSION); export PACKAGE_VERSION;               \
+  PERL='$(PERL)'; export PERL;                                              \
+  SHELL='$(SHELL)'; export SHELL;                                           \
   PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \
   ; 9>&2
 
-- 
In memoriam Jan Opletal <http://en.wikipedia.org/wiki/Jan_Opletal>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]