From: Eric Blake <eblake@redhat.com>
To: Michele Denber <mdenber@gmx.com>, qemu-devel@nongnu.org
Subject: Re: Building in Solaris 11.4
Date: Wed, 24 Jun 2020 16:48:51 -0500 [thread overview]
Message-ID: <ae7652b5-86f7-fc52-af01-69096dd3b163@redhat.com> (raw)
In-Reply-To: <5EF3C648.4060506@gmx.com>
On 6/24/20 4:31 PM, Michele Denber wrote:
> While trying to run configure in Solaris 11.4, I quickly run into:
>
> root@hemlock:~/qemu-5.0.0# ./configure
> ./configure[62]: local: not found [No such file or directory]
> grep: illegal option -- e
> Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
> ./configure[62]: local: not found [No such file or directory]
You've uncovered multiple portability issues, where even though
configure expects to run with #!/bin/sh, it uses some non-POSIX-isms.
> Line 62 is
>
> Â Â Â local compiler="$1"
>
> I'm not familiar with this construct. What does "local" do? It wasn't
> in the configure file for QEMU 2.12. (And I already said "cc=gcc")
local is a bash-ism (ksh has it to) that changes how variables are
scoped within shell functions. The options to fix it are to either:
avoid local and use global variables everywhere (and worrying about
naming collisions when one function calls another), or to tweak
configure so that it re-exec's itself under bash if it detects that
/bin/sh is not up to our usage expectations. (configure scripts
generated by Autoconf do the latter, but qemu doesn't use autoconf).
grep -e is also a non-portable construct; it might be possible to change
that line to call egrep instead, or to rewrite the regex to not need
extended regex.
As a short-term workaround, you can always do:
/path/to/bash ./configure
to run it under a shell that won't choke on our use of non-posix constructs.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2020-06-24 21:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 21:31 Building in Solaris 11.4 Michele Denber
2020-06-24 21:48 ` Eric Blake [this message]
2020-06-24 21:53 ` Eric Blake
[not found] ` <5EF4D332.6040003@gmx.com>
2020-06-25 18:32 ` Michele Denber
2020-06-27 16:24 ` Michele Denber
2020-06-29 12:12 ` Thomas Huth
2020-06-29 20:25 ` Michele Denber
2020-06-30 5:10 ` Thomas Huth
-- strict thread matches above, loose matches on Subject: below --
2020-06-27 21:19 Michele Denber
2020-06-28 13:22 ` Peter Maydell
2020-06-28 14:16 ` Peter Tribble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae7652b5-86f7-fc52-af01-69096dd3b163@redhat.com \
--to=eblake@redhat.com \
--cc=mdenber@gmx.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).