qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Subject: Re: Target-dependent include path, why?
Date: Fri, 9 Dec 2022 16:59:37 +0100	[thread overview]
Message-ID: <fe2bc5da-5bb8-bf96-307a-839c10c163b0@linaro.org> (raw)
In-Reply-To: <55b06ba2-cd46-b9f0-c789-0cc39101a007@linaro.org>

On 9/12/22 16:02, Richard Henderson wrote:
> On 12/9/22 02:51, Markus Armbruster wrote:
>> Richard Henderson <richard.henderson@linaro.org> writes:
>>
>>> On 12/8/22 23:12, Markus Armbruster wrote:
>>>> I stumbled over this:
>>>>       ../include/ui/qemu-pixman.h:12:10: fatal error: pixman.h: No 
>>>> such file or directory
>>>>          12 | #include <pixman.h>
>>>>             |          ^~~~~~~~~~
>>>> Works when included into target-dependent code.
>>>> Running make -V=1 shows we're passing a number of -I only when 
>>>> compiling
>>>> target-dependent code, i.e. together with -DNEED_CPU_H:
>>>>       -I/usr/include/pixman-1 -I/usr/include/capstone 
>>>> -I/usr/include/spice-server -I/usr/include/spice-1
>>>>       -I/usr/include/cacard -I/usr/include/nss3 -I/usr/include/nspr4 
>>>> -I/usr/include/PCSC
>>>>       -isystem../linux-headers -isystemlinux-headers
>>>> Why?
>>>
>>> Because of where [pixman] is added as a dependency in meson.build.
>>
>> Is it added where it is for a reason, or is it accidental?
> 
> I don't know for sure, but I doubt it's accidental.
> I'm sure it is where it is based on existing usage.

I hit a similar problem while converting units to be target-independent,
moving them out of specific_ss[] I got:

  In file included from ../monitor/misc.c:38:
  In file included from include/ui/console.h:4:
  include/ui/qemu-pixman.h:12:10: fatal error: 'pixman.h' file not found
  #include <pixman.h>
           ^~~~~~~~~~

The monitor/ dependency is odd because there is no pixman use in the
sources, only pulled by the headers:

   $ git grep pixman monitor/
   monitor/meson.build:9:specific_ss.add(when: 'CONFIG_SOFTMMU', 
if_true: [files('misc.c'), spice, pixman])

We require pixman for system emulation. The dependency is added in 
ui/meson.build:

   softmmu_ss.add(pixman)
   specific_ss.add(when: ['CONFIG_SOFTMMU'], if_true: pixman)   # for 
the include path

Due to the second line, I was expecting all files in specific_ss[] to 
have pixman path in their CPPFLAGS. The monitor/meson.build has:

   specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('misc.c'), 
spice])

Paolo, is it due to the [] that monitor/misc.c doesn't get the pixman
pkg-config flags?


  reply	other threads:[~2022-12-09 16:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09  5:12 Target-dependent include path, why? Markus Armbruster
2022-12-09  5:24 ` Richard Henderson
2022-12-09  7:05   ` Philippe Mathieu-Daudé
2022-12-09  8:51   ` Markus Armbruster
2022-12-09 15:02     ` Richard Henderson
2022-12-09 15:59       ` Philippe Mathieu-Daudé [this message]
2022-12-09 16:48     ` Paolo Bonzini
2022-12-09 16:52       ` Peter Maydell
2022-12-09 17:42         ` Paolo Bonzini
2022-12-09 19:53           ` Peter Maydell
2022-12-09 22:16             ` Paolo Bonzini

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=fe2bc5da-5bb8-bf96-307a-839c10c163b0@linaro.org \
    --to=philmd@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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).