[Mesa-dev] [PATCH] anv: add the main include directory back

Grazvydas Ignotas notasas at gmail.com
Sun Mar 19 21:04:58 UTC 2017


On Sun, Mar 19, 2017 at 9:30 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> On March 19, 2017 9:33:02 AM Grazvydas Ignotas <notasas at gmail.com> wrote:
>
>> On Sun, Mar 19, 2017 at 3:03 PM, Emil Velikov <emil.l.velikov at gmail.com>
>> wrote:
>>>
>>> Hi Grazvydas,
>>>
>>> On 17 March 2017 at 22:05, Grazvydas Ignotas <notasas at gmail.com> wrote:
>>>>
>>>> Fixes build without vulkan.h installed in system header locations:
>>>>   CC       vulkan/vulkan_libvulkan_intel_la-anv_gem.lo
>>>> In file included from vulkan/anv_private.h:66:0,
>>>>                  from vulkan/anv_gem.c:31:
>>>> /opt/xorg/include/vulkan/vulkan_intel.h:27:20: fatal error: vulkan.h:
>>>> No such file or directory
>>>>
>>> Not sure the above makes sense I'm afraid. VULKAN_CPPFLAGS already
>>> includes AM_CPPFLAGS which has the include.
>>>
>>> I've even hacked up my system [sudo mv
>>> /usr/include/vulkan/vulkan.h{,1} and things build fine w/o your patch.
>>
>>
>> Maybe you forgot --with-vulkan-drivers=intel for this test?
>>
>> Anyway the problem is without my patch my includes look like this:
>> ...  -I/opt/xorg/include -I/opt/xorg/include/libdrm -I../../include ...
>>
>> With that, it's picking the earlier installed
>> /opt/xorg/include/vulkan/vulkan_intel.h instead of
>> ../../include/vulkan/vulkan_intel.h , and that one has:
>
>
> We should probably make sure that mesa includes come before includes from
> other random projects.  That said, why is xorg packaging Vulkan headers?
> And why is *anyone* packaging vulkan_intel.h???

In my setup /opt/xorg/ contains mesa installation too, and it's mesa
that's shipping that file. See src/intel/Makefile.vulkan.am:

noinst_HEADERS += \
        $(top_srcdir)/include/vulkan/vk_platform.h \
        $(top_srcdir)/include/vulkan/vulkan.h

vulkan_include_HEADERS = \
        $(top_srcdir)/include/vulkan/vulkan_intel.h

Gražvydas

>
> --Jason
>
>> #include "vulkan.h"
>>
>> but /opt/xorg/include/vulkan/ nor ../../include/vulkan/ are in the
>> include path, so the build fails (note that mesa no longer installs
>> vulkan.h). If it picked ../../include/vulkan/vulkan_intel.h instead,
>> #include "vulkan.h" would work since vulkan.h is in the same
>> directory. I agree my solution might not be the best but I tried to
>> reduce chances of breaking other stuff to a minimum.
>>
>> Gražvydas


More information about the mesa-dev mailing list