configure and build errors on Solaris 10 due to /bin/sh usage
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Running `LANG=C LC_ALL=C ./configure --prefix=... --install=
./configure: bad substitution
./configure: !: not found
./configure: curl-config: not found
./configure: curl-config: not found
Error: invalid trace backend
Please choose a supported trace backend.
Unfortunately it doesn't print the line numbers of the errors. It must be somewhere after the check for `install`.
The first few can be resolved by running `bash ./configure ...` instead.
The "check if trace backend exists" hardcodes `sh "$source_
`gmake` complains "Makefile:331: no file name for -include", which is a filter for *.d files.
`create_config` gets the 'bad substitution' error as well. Replacing sh with bash in rules.mak works.
etc.
To sum it up,
a) there are shell script incompatibilities with Solaris 10's /bin/sh shell, and
b) hardcoding 'sh' in configure or Makefiles seems like a bad idea.
QEMU Git 73d7434279e3905
$ uname -a
SunOS sonnengoettin 5.10 Generic_142901-03 i86pc i386 i86pc
# No banner output for /bin/sh
$ bash --version
GNU bash, version 3.00.16(1)-release (i386-pc-
Copyright (C) 2004 Free Software Foundation, Inc.
On Sun, Sep 12, 2010 at 11:26 AM, Andreas Färber /usr/ucb/ install` on Solaris 10 amd64 results in the following
<email address hidden> wrote:
> Public bug reported:
>
> Running `LANG=C LC_ALL=C ./configure --prefix=...
> --install=
> errors:
>
> ./configure: bad substitution
> ./configure: !: not found
> ./configure: curl-config: not found
> ./configure: curl-config: not found
>
> Error: invalid trace backend
> Please choose a supported trace backend.
What is the output of "sh ./tracetool --nop --check-backend"?
> path/tracetool" ...` in configure. Replacing sh with bash makes
>
> Unfortunately it doesn't print the line numbers of the errors. It must be somewhere after the check for `install`.
>
> The first few can be resolved by running `bash ./configure ...` instead.
>
> The "check if trace backend exists" hardcodes `sh
> "$source_
> it work.
>
> `gmake` complains "Makefile:331: no file name for -include", which is a filter for *.d files.
> `create_config` gets the 'bad substitution' error as well. Replacing sh with bash in rules.mak works.
> etc.
>
> To sum it up,
> a) there are shell script incompatibilities with Solaris 10's /bin/sh shell, and
I fixed one in 2184d75b4a6a253 e8b1e002b3dbcc8 5c20ba6041 and now
Milax's /bin/sh is happy.