[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Target-dependent include path, why?
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: Target-dependent include path, why? |
Date: |
Fri, 9 Dec 2022 16:59:37 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 |
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?
- Target-dependent include path, why?, Markus Armbruster, 2022/12/09
- Re: Target-dependent include path, why?, Richard Henderson, 2022/12/09
- Re: Target-dependent include path, why?, Philippe Mathieu-Daudé, 2022/12/09
- Re: Target-dependent include path, why?, Markus Armbruster, 2022/12/09
- Re: Target-dependent include path, why?, Paolo Bonzini, 2022/12/09
- Re: Target-dependent include path, why?, Peter Maydell, 2022/12/09
- Re: Target-dependent include path, why?, Paolo Bonzini, 2022/12/09
- Re: Target-dependent include path, why?, Peter Maydell, 2022/12/09
- Re: Target-dependent include path, why?, Paolo Bonzini, 2022/12/09