Dependencies (was Re: Spammers catching on)

Parker Morse morse at sinauer.com
Tue Dec 31 18:31:43 CET 2002


On Tuesday, December 31, 2002, at 11:45  AM, David Relson wrote:
> At 11:25 AM 12/31/02, Parker Morse wrote:
>> ./t.score1: syntax error near unexpected token `then'
>> FAIL: t.score1
>
> "syntax error" indicates that the wrong shell is running.  The syntax 
> error is in script tests/t.frame, which is run by script tests/t.score1.  
> All the scripts start with "#!/bin/sh" and expect the bash shell (though 
> Matthias may tell me they're supposed to be shell independent).  What do 
> you get if you run "/bin/sh --version"?  Try changing the "#!/bin/sh" 
> lines to "#!/bin/bash" and see what happens.

[root bogofilter-0.9.1.2]# /bin/sh -version
/bin/sh -version
GNU sh, version 1.14.7(1)
[root bogofilter-0.9.1.2]# /bin/bash -version
GNU bash, version 1.14.7(1)
[root bogofilter-0.9.1.2]#

(double hyphens before "version" produces an error.)

/bin/sh appears to be a link to /bin/bash. Changing the shell script lines 
to /bin/bash produces the same error messages on "make check" (repeated 
for those who haven't seen them):

make  check-TESTS
make[3]: Entering directory `/usr/local/src/bogofilter-0.9.1.2/tests'
./t.score1: syntax error near unexpected token `then'
FAIL: t.score1
./t.score2: syntax error near unexpected token `then'
FAIL: t.score2
./t.integrity: syntax error near unexpected token `then'
FAIL: t.integrity
./t.integrity2: syntax error near unexpected token `then'
FAIL: t.integrity2
./t.lock1: syntax error near unexpected token `then'
FAIL: t.lock1
./t.ignore_spam_header: syntax error near unexpected token `then'
FAIL: t.ignore_spam_header
./t.nullstatsprefix: syntax error near unexpected token `then'
FAIL: t.nullstatsprefix
./t.lexer: syntax error near unexpected token `then'
FAIL: t.lexer
./t.systest: syntax error near unexpected token `then'
FAIL: t.systest
./t.grftest: syntax error near unexpected token `then'
FAIL: t.grftest
=====================
10 of 10 tests failed
=====================
make[3]: *** [check-TESTS] Error 1
make[3]: Leaving directory `/usr/local/src/bogofilter-0.9.1.2/tests'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/usr/local/src/bogofilter-0.9.1.2/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/bogofilter-0.9.1.2/tests'
make: *** [check-recursive] Error 1

I HAVE had issues with running scripts on this machine - installing Judy, 
in fact. I ended up replacing a slew of double brackets [[]] with singles 
in order to run make. Then I discovered Judy was no longer needed. :-S

pjm





More information about the Bogofilter mailing list