All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Rainer Müller" <raimue@codingfarm.de>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.
Date: Fri, 2 Jun 2017 14:58:35 +0100	[thread overview]
Message-ID: <CAFEAcA_2K+T=NP7qDK5hWxTrZ34Kzee+3DK7eenK0=bnS8nh1w@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-yPTxSB90zUg2Mn6s=HdXshWyZ9z7HrF+6+3hD6manoA@mail.gmail.com>

On 6 April 2017 at 19:36, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 6 April 2017 at 19:15, Rainer Müller <raimue@codingfarm.de> wrote:
>> A bit late to this thread, but the original problem was also reported
>> for Mac OS X with --enable-curses in MacPorts. The build fails with the
>> same symptoms as in the original report.
>>
>> https://trac.macports.org/ticket/53929
>>
>> As you identified, the problem is that ncurses expects the define
>> _XOPEN_SOURCE >= 500 to enable the wide-char function declarations.
>>
>> The solution to retain access to non-standard API on Mac OS X would be
>> to also define _DARWIN_C_SOURCE which enables extensions.
>
> Thanks for the report. I have a feeling that fixing this bug
> got lost somewhere -- there was a long thread about it but I
> don't think an actual patch ever came out of it :-(

I've got back to looking at this, and it turns out that the
situation is a complete mess. In particular, on OSX if you
define _XOPEN_SOURCE=600 then it causes _POSIX_C_SOURCE to be
set such that the getpagesize() prototype is not provided, and
even if you set _DARWIN_C_SOURCE this does not override that.

Similarly, on FreeBSD if you define _XOPEN_SOURCE then it
doesn't provide any APIs that aren't in that standard and there
is no provided mechanism at all to say "and also the FreeBSD
APIs" please.

My conclusion from this is that we must not set _XOPEN_SOURCE,
but instead have to tell ncurses directly that we definitely
want the widechar prototypes, by defining NCURSES_WIDECHAR.
Since ncurses 20111030 this is sufficient I think; if you're
still using an older ncurses then you'll need to upgrade it
(older ncurses ignore NCURSES_WIDECHAR and only pay attention
to _XOPEN_SOURCE_EXTENDED, etc).

thanks
-- PMM

  reply	other threads:[~2017-06-02 13:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 16:30 [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems Chad Joan
2017-02-16 16:58 ` Paolo Bonzini
2017-02-16 17:23   ` Laszlo Ersek
2017-02-16 17:47     ` Chad Joan
2017-02-17  6:43       ` Fam Zheng
2017-02-17  9:23         ` Laszlo Ersek
2017-02-17 10:11           ` Fam Zheng
2017-02-17  9:28         ` Peter Maydell
2017-02-17 15:34           ` Eric Blake
2017-02-17 16:54             ` Chad Joan
2017-02-17 16:56               ` Peter Maydell
2017-02-17 16:57               ` Paolo Bonzini
2017-02-17 17:07                 ` Chad Joan
2017-02-17 17:15               ` Peter Maydell
2017-02-19  7:22                 ` Chad Joan
2017-02-19 12:12                   ` Peter Maydell
2017-02-21  2:53                 ` Eric Blake
2017-02-17 17:17               ` Eric Blake
2017-02-19  7:02                 ` Chad Joan
2017-02-21  3:02                   ` Eric Blake
2017-02-21  9:41                     ` Markus Armbruster
2017-02-21  9:58                       ` Peter Maydell
2017-02-17 18:13             ` John Snow
2017-02-17  8:45     ` Paolo Bonzini
2017-02-17  8:56     ` Paolo Bonzini
2017-02-17  9:17       ` Laszlo Ersek
2017-02-17 11:11         ` Paolo Bonzini
2017-02-17 11:43           ` Chad Joan
2017-02-17 10:18       ` Peter Maydell
2017-02-17 11:20         ` Paolo Bonzini
2017-02-17 16:57           ` Peter Maydell
2017-04-06 18:15             ` Rainer Müller
2017-04-06 18:36               ` Peter Maydell
2017-06-02 13:58                 ` Peter Maydell [this message]
2017-02-16 16:59 ` Eric Blake
2017-02-16 17:05 ` Peter Maydell

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='CAFEAcA_2K+T=NP7qDK5hWxTrZ34Kzee+3DK7eenK0=bnS8nh1w@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=raimue@codingfarm.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.