All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson: Set implicit_include_directories to false
@ 2021-04-29  2:43 Katsuhiro Ueno
  2021-04-30  7:48 ` Paolo Bonzini
  2021-05-16 14:05 ` Alexander Graf
  0 siblings, 2 replies; 5+ messages in thread
From: Katsuhiro Ueno @ 2021-04-29  2:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial

Without this, libvixl cannot be compiled with macOS 11.3 SDK due to
include file name conflict (usr/include/c++/v1/version conflicts with
VERSION).

Signed-off-by: Katsuhiro Ueno <uenobk@gmail.com>
---
 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index c6f4b0cf5e..d007bff8c3 100644
--- a/meson.build
+++ b/meson.build
@@ -2129,6 +2129,7 @@ common_all = common_ss.apply(config_all, strict: false)
 common_all = static_library('common',
                             build_by_default: false,
                             sources: common_all.sources() + genh,
+                            implicit_include_directories: false,
                             dependencies: common_all.dependencies(),
                             name_suffix: 'fa')

-- 
2.30.1 (Apple Git-130)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] meson: Set implicit_include_directories to false
  2021-04-29  2:43 [PATCH] meson: Set implicit_include_directories to false Katsuhiro Ueno
@ 2021-04-30  7:48 ` Paolo Bonzini
  2021-05-01  2:08   ` Katsuhiro Ueno
  2021-05-16 14:05 ` Alexander Graf
  1 sibling, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2021-04-30  7:48 UTC (permalink / raw)
  To: Katsuhiro Ueno, qemu-devel; +Cc: qemu-trivial

On 29/04/21 04:43, Katsuhiro Ueno wrote:
> Without this, libvixl cannot be compiled with macOS 11.3 SDK due to
> include file name conflict (usr/include/c++/v1/version conflicts with
> VERSION).
> 
> Signed-off-by: Katsuhiro Ueno <uenobk@gmail.com>
> ---
>   meson.build | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/meson.build b/meson.build
> index c6f4b0cf5e..d007bff8c3 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2129,6 +2129,7 @@ common_all = common_ss.apply(config_all, strict: false)
>   common_all = static_library('common',
>                               build_by_default: false,
>                               sources: common_all.sources() + genh,
> +                            implicit_include_directories: false,
>                               dependencies: common_all.dependencies(),
>                               name_suffix: 'fa')
> 

Can you include the difference in the include paths (the -I and -iquote 
arguments)?  There are many cases in which we rely on having the current 
source directory in the build path, for example all inclusions of "trace.h".

Paolo



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meson: Set implicit_include_directories to false
  2021-04-30  7:48 ` Paolo Bonzini
@ 2021-05-01  2:08   ` Katsuhiro Ueno
  2021-05-17 11:41     ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Katsuhiro Ueno @ 2021-05-01  2:08 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-trivial, qemu-devel

2021-04-30 16:48 Paolo Bonzini <pbonzini@redhat.com>:
>
> On 29/04/21 04:43, Katsuhiro Ueno wrote:
> > Without this, libvixl cannot be compiled with macOS 11.3 SDK due to
> > include file name conflict (usr/include/c++/v1/version conflicts with
> > VERSION).
> >
> > Signed-off-by: Katsuhiro Ueno <uenobk@gmail.com>
> > ---
> >   meson.build | 1 +
> >   1 file changed, 1 insertion(+)
> >
> > diff --git a/meson.build b/meson.build
> > index c6f4b0cf5e..d007bff8c3 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -2129,6 +2129,7 @@ common_all = common_ss.apply(config_all, strict: false)
> >   common_all = static_library('common',
> >                               build_by_default: false,
> >                               sources: common_all.sources() + genh,
> > +                            implicit_include_directories: false,
> >                               dependencies: common_all.dependencies(),
> >                               name_suffix: 'fa')
> >
>
> Can you include the difference in the include paths (the -I and -iquote
> arguments)?  There are many cases in which we rely on having the current
> source directory in the build path, for example all inclusions of "trace.h".

This only removes -I.. (current (top-level) source directory) from the
arguments. The meson manual says that it also removes -I. (current
(top-level) build directory) but -I. is still in the arguments (I am
not sure why). This does not change any -iquote argument.

As far as I know, this does not affect the inclusions of "trace.h"
because each "trace.h" is in the same directory as the files that
include it, and the top-level build directory, which has the "trace"
directory containing generated "trace-*.h" files, is still in the
include path.

--
Katsuhiro Ueno


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meson: Set implicit_include_directories to false
  2021-04-29  2:43 [PATCH] meson: Set implicit_include_directories to false Katsuhiro Ueno
  2021-04-30  7:48 ` Paolo Bonzini
@ 2021-05-16 14:05 ` Alexander Graf
  1 sibling, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2021-05-16 14:05 UTC (permalink / raw)
  To: Katsuhiro Ueno, qemu-devel; +Cc: qemu-trivial, Paolo Bonzini, Akihiko Odaki


On 29.04.21 04:43, Katsuhiro Ueno wrote:
> Without this, libvixl cannot be compiled with macOS 11.3 SDK due to
> include file name conflict (usr/include/c++/v1/version conflicts with
> VERSION).
>
> Signed-off-by: Katsuhiro Ueno <uenobk@gmail.com>


I can confirm that this patch is required to build QEMU with current
XCode. I saw an identical patch from Akihiko (CC'ed) as well.

Tested-by: Alexander Graf <agraf@csgraf.de>


Alex




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] meson: Set implicit_include_directories to false
  2021-05-01  2:08   ` Katsuhiro Ueno
@ 2021-05-17 11:41     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2021-05-17 11:41 UTC (permalink / raw)
  To: Katsuhiro Ueno; +Cc: qemu-trivial, qemu-devel

On 01/05/21 04:08, Katsuhiro Ueno wrote:
> 2021-04-30 16:48 Paolo Bonzini <pbonzini@redhat.com>:
>>
>> On 29/04/21 04:43, Katsuhiro Ueno wrote:
>>> Without this, libvixl cannot be compiled with macOS 11.3 SDK due to
>>> include file name conflict (usr/include/c++/v1/version conflicts with
>>> VERSION).
>>>
>>> Signed-off-by: Katsuhiro Ueno <uenobk@gmail.com>
>>> ---
>>>    meson.build | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meson.build b/meson.build
>>> index c6f4b0cf5e..d007bff8c3 100644
>>> --- a/meson.build
>>> +++ b/meson.build
>>> @@ -2129,6 +2129,7 @@ common_all = common_ss.apply(config_all, strict: false)
>>>    common_all = static_library('common',
>>>                                build_by_default: false,
>>>                                sources: common_all.sources() + genh,
>>> +                            implicit_include_directories: false,
>>>                                dependencies: common_all.dependencies(),
>>>                                name_suffix: 'fa')
>>>
>>
>> Can you include the difference in the include paths (the -I and -iquote
>> arguments)?  There are many cases in which we rely on having the current
>> source directory in the build path, for example all inclusions of "trace.h".
> 
> This only removes -I.. (current (top-level) source directory) from the
> arguments. The meson manual says that it also removes -I. (current
> (top-level) build directory) but -I. is still in the arguments (I am
> not sure why). This does not change any -iquote argument.
> 
> As far as I know, this does not affect the inclusions of "trace.h"
> because each "trace.h" is in the same directory as the files that
> include it, and the top-level build directory, which has the "trace"
> directory containing generated "trace-*.h" files, is still in the
> include path.

Queued, thanks.  It looks like "implicit" only refers to the directory 
that meson.build lies in.

It would be nicer to have _all_ targets in meson.build have 
implicit_include_directories: false, since we would have the same 
problem for other C++ sources, but that can be done later.

Paolo



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-17 11:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29  2:43 [PATCH] meson: Set implicit_include_directories to false Katsuhiro Ueno
2021-04-30  7:48 ` Paolo Bonzini
2021-05-01  2:08   ` Katsuhiro Ueno
2021-05-17 11:41     ` Paolo Bonzini
2021-05-16 14:05 ` Alexander Graf

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.