Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-12 Thread Eitan Adler
On 12 November 2012 06:03, Andrew Stubbs a...@codesourcery.com wrote: Running sh -x test.sh shows that the gcc command producing the error: + CCACHE_DISABLE=1 gcc -c test1.c -o reference_test1.o -O -O gcc: error trying to exec 'cc1': execvp: No such file or directory I don't understand

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-12 Thread Eitan Adler
On 12 November 2012 13:00, Eitan Adler li...@eitanadler.com wrote: On 12 November 2012 06:03, Andrew Stubbs a...@codesourcery.com wrote: Running sh -x test.sh shows that the gcc command producing the error: + CCACHE_DISABLE=1 gcc -c test1.c -o reference_test1.o -O -O gcc: error trying to exec

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-12 Thread Mike Frysinger
On Sunday 11 November 2012 06:31:14 Eitan Adler wrote: On 11 November 2012 00:46, Mike Frysinger vap...@gentoo.org wrote: On Saturday 10 November 2012 00:41:52 Eitan Adler wrote: On 10 November 2012 00:41, Mike Frysinger wrote: if the script is written in bash and is intended to be, then

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-12 Thread Mike Frysinger
On Saturday 10 November 2012 05:08:40 Joel Rosdahl wrote: On 10 November 2012 06:45, Mike Frysinger vap...@gentoo.org wrote: i see old style portable code in there that could easily be modernized to recent POSIX Please don't strive to do that. Solaris's /bin/sh isn't POSIX. autoconf

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-12 Thread Mike Frysinger
On Monday 12 November 2012 06:03:37 Andrew Stubbs wrote: Running sh -x test.sh shows that the gcc command producing the error: + CCACHE_DISABLE=1 gcc -c test1.c -o reference_test1.o -O -O gcc: error trying to exec 'cc1': execvp: No such file or directory I don't understand what's wrong

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-12 Thread Eitan Adler
On 12 November 2012 13:11, Eitan Adler li...@eitanadler.com wrote: On 12 November 2012 13:04, Mike Frysinger vap...@gentoo.org wrote: yes, when people tell you forcing asinine behavior is wrong, you label them trolls. i guess that's how you win arguments. Claiming that systems without

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-12 Thread Paul Smith
On Mon, 2012-11-12 at 13:11 -0500, Eitan Adler wrote: #!/bin/sh which is mandated to exist by POSIX Actually, unless there's been a change, POSIX doesn't mandate that the POSIX shell appear as /bin/sh. Unfortunately, this means that systems are free to provide definitively non-POSIX /bin/sh

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-11 Thread Eitan Adler
On 11 November 2012 00:46, Mike Frysinger vap...@gentoo.org wrote: On Saturday 10 November 2012 00:41:52 Eitan Adler wrote: On 10 November 2012 00:41, Mike Frysinger wrote: if the script is written in bash and is intended to be, then /bin/bash is the correct answer. Absolutely false.

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-10 Thread Mike Frysinger
On Saturday 10 November 2012 00:41:52 Eitan Adler wrote: On 10 November 2012 00:41, Mike Frysinger wrote: if the script is written in bash and is intended to be, then /bin/bash is the correct answer. Absolutely false. /usr/local/bin or /opt/bin might be the correct location. if you have a

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-09 Thread Eitan Adler
On 10 November 2012 00:41, Mike Frysinger vap...@gentoo.org wrote: ironic considering you're espousing a change to support crap systems that aren't relevant. I won't comment on this. if the script is written in bash and is intended to be, then /bin/bash is the correct answer. Absolutely

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-09 Thread Mike Frysinger
On Monday 05 November 2012 12:55:10 Andrew Stubbs wrote: The test script fails with shells other than bash. At least dash doesn't work. could you post the exact errors you see ? i see old style portable code in there that could easily be modernized to recent POSIX and plenty of quoting

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-07 Thread Andrew Stubbs
On 06/11/12 16:53, Eitan Adler wrote: Perhaps you should get a better version of env? Perhaps I should! I'm running Ubuntu 12.10, so I'm surprised about that. But even if I did there would be many others with the same issue. The followup to this discussion indicates that /bin/sh seems to

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-07 Thread Joel Rosdahl
On 5 November 2012 18:55, Andrew Stubbs a...@codesourcery.com wrote: The test script fails with shells other than bash. At least dash doesn't work. test.sh is intended to work even on Solaris's /bin/sh, which is even more restricted than dash. Current test.sh on master and maint works well

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-06 Thread Andrew Stubbs
On 05/11/12 17:58, Eitan Adler wrote: -#!/bin/sh +#!/bin/bash This line is buggy: please http://blog.eitanadler.com/2012/10/binbash-considered-harmful.html for why. I ideally the non-portable bashims get fixed but if not the shebang line must be /usr/bin/env bash not /bin/bash. While it is

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-06 Thread Andrew Stubbs
On 05/11/12 22:35, g@free.fr wrote: ccache-3.1.8 'make check' work with dash, no? There's no problem with configure or make, only with test.sh. Andrew ___ ccache mailing list ccache@lists.samba.org

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-06 Thread Andrew Stubbs
On 06/11/12 10:05, g@free.fr wrote: On my debian stable machine (x86 32 bits), I set sh as a symlink to dash and changed my script to emit SHELL='/bin/dash' test is ok with 3.1.8 (ccache is statically linked to glibc in my configuration). I looked with checkbashims on test.sh git version

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-06 Thread Eitan Adler
On 6 November 2012 04:54, Andrew Stubbs a...@codesourcery.com wrote: While it is true that /usr/bin/env bash is more portable than /bin/bash, I also don't like it as much. If I run a #!/bin/bash script without bash installed I get: /bin/bash: bad interpreter: No such file or directory

[ccache] [PATCH] Use bash for test.sh.

2012-11-05 Thread Andrew Stubbs
The test script fails with shells other than bash. At least dash doesn't work. Signed-off-by: Andrew Stubbs a...@codesourcery.com --- test.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 4c78617..a334f62 100755 --- a/test.sh +++ b/test.sh @@

Re: [ccache] [PATCH] Use bash for test.sh.

2012-11-05 Thread g . esp
- Mail original - De: Andrew Stubbs a...@codesourcery.com À: ccache@lists.samba.org Envoyé: Lundi 5 Novembre 2012 18:55:10 Objet: [ccache] [PATCH] Use bash for test.sh. The test script fails with shells other than bash. At least dash doesn't work. Signed-off-by: Andrew Stubbs