qemu build failure, hxtool is a bash script, not a /bin/sh script
Bug #1347555 reported by
Felix von Leitner
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
hxtool (part of the early build process) is a bash script. Running it with /bin/sh yields a syntax error on line 10:
10 STEXI*|
$(( expr )) is a bash extension, not part of /bin/sh.
Note that replacing the sh in the first line in hxtool with /bin/bash does not help, because the script is run manually from the Makefile with sh:
154 $(call quiet-command,sh $(SRC_PATH)
The fix is to change those lines to
154 $(call quiet-command,bash $(SRC_PATH)
(there are five or so).
To post a comment you must log in.
On 07/23/2014 04:21 AM, Felix von Leitner wrote: ETEXI*| SQMP*|EQMP* ) flag=$(($flag^1))
> Public bug reported:
>
> hxtool (part of the early build process) is a bash script. Running it
> with /bin/sh yields a syntax error on line 10:
>
> 10 STEXI*|
>
> $(( expr )) is a bash extension, not part of /bin/sh.
Wrong. $(( expr )) is mandated by POSIX. What system are you on where
/bin/sh is not POSIX? (Solaris is the only platform where /bin/sh does
not try to be POSIX-compliant, but who uses that for qemu?)
What is the actual syntax error you are seeing? Is this a bug in dash
on your distribution? I can't get dash to fail for me on Fedora:
$ dash -c 'f=1; f=$(($f^1)); echo $f'
0
$ dash -n scripts/hxtool; echo $?
0
-- libvirt. org
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://