Several of the test scripts for cairo appear to assume that /bin/sh is actually bash. This breaks on Solaris systems (I have verified this on Sol9 and Sol10, and do not know of any release of Solaris which had bash as /bin/sh), which are much more ksh-like. I am told that Ubuntu's /bin/sh is also not bash, but I do not have a Ubuntu box to verify this on. At least the following scripts all invoke /bin/sh with bash syntax: * src/check-def.sh * src/check-plt.sh * src/check-headers.sh * src/check-doc-syntax.sh * doc/public/check-doc-coverage.sh MJB
Can you tell me which parts of those scripts is bash-specific?
bugzilla-daemon@freedesktop.org wrote: > http://bugs.freedesktop.org/show_bug.cgi?id=16299 > > --- Comment #1 from Behdad Esfahbod <freedesktop@behdad.org> 2008-06-11 16:48:16 PST --- > Can you tell me which parts of those scripts is bash-specific? > > Any instance of ! in an if will not work in sh. For example (from cairo-1.6.4/src/check-dev.sh): if ! which nm 2>/dev/null >/dev/null; then does not work in Solaris stock /bin/sh, but it will in bash. That's the first bash-ism I came across in any of the scripts when trying to run the test suite; there are likely more. I did not further explore; I just changed the #! invocation from /bin/sh to /usr/local/bin/bash on all of them. MJB
I removed the "!"s and fixed some other issues. The scripts run happily with bash, dash, ksh, and zsh now. If there are any other specific issues, let me know and I'll fix it.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.