[Mesa-dev] [PATCH 11/18] anv: automake: bring back VULKAN_ENTRYPOINT_CPPFLAGS

Emil Velikov emil.l.velikov at gmail.com
Tue May 31 14:12:06 UTC 2016


On 31 May 2016 at 12:31, Alejandro Piñeiro <apinheiro at igalia.com> wrote:
> On 31/05/16 13:22, Emil Velikov wrote:
>> On 31 May 2016 at 12:15, Alejandro Piñeiro <apinheiro at igalia.com> wrote:
>>> Probably you are already aware, but just in case. Since this patch got
>>> committed (master commit 220d8c) mesa builds fail when using some build
>>> options:
>>>
>> "some build options" is the key here. What are they ?
>
> I use jhbuild to build mesa, on my .jhbuildrc I have the following:
>
> os.environ['CFLAGS'] = '-Wall -g3 -O0 -ggdb3'
> os.environ['CXXFLAGS'] = '-Wall -g3 -O0 -ggdb3'
>
> autogenargs='--disable-static'
> module_autogenargs['mesa'] = '--disable-static --enable-debug
> --with-dri-drivers=i965 --with-gallium-drivers=swrast
> --with-vulkan-drivers=intel'
>
> FWIW, I also tried to tweak a little those options, without too much
> success.
>
> Just in case it is useful, I have attached my config.log.
>
>>> <skip>
>>>
>>> anv_formats.c:427:6: error: no previous prototype for
>>> ‘anv_GetPhysicalDeviceFormatProperties’ [-Werror=missing-prototypes]
>>>  void anv_GetPhysicalDeviceFormatProperties(
>>>       ^
>>> anv_formats.c:440:10: error: no previous prototype for
>>> ‘anv_GetPhysicalDeviceImageFormatProperties’ [-Werror=missing-prototypes]
>>>  VkResult anv_GetPhysicalDeviceImageFormatProperties(
>>>           ^
>>> anv_formats.c:590:6: error: no previous prototype for
>>> ‘anv_GetPhysicalDeviceSparseImageFormatProperties’
>>> [-Werror=missing-prototypes]
>>>  void anv_GetPhysicalDeviceSparseImageFormatProperties(
>>>       ^
>>> cc1: some warnings being treated as errors
>>> Makefile:1305: recipe for target 'anv_formats.lo' failed
>>> make[4]: *** [anv_formats.lo] Error 1
>>> anv_image.c:255:1: error: no previous prototype for ‘anv_CreateImage’
>>> [-Werror=missing-prototypes]
>>>  anv_CreateImage(VkDevice device,
>>>
>> Looking at these ... I'm not sure how the commit can cause such an
>> issue. Have you tried cleaning your srcdir (via git clean -fxd) and
>> your builddir ?
>
> Yes, I tried git clean -fdx. Same error.
>
>> If that does not help can you attach your generated anv_entrypoints.[ch]
>
> Yes, just done.
>
OK, so things are as expected - CPP fails to open/parse the headers.
Why/how that happens is an interesting question... Can you try the
following patch ? I doubt it will help much, still worth a shot
though.

diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
index 37c2986..c5cb896 100644
--- a/src/intel/vulkan/Makefile.am
+++ b/src/intel/vulkan/Makefile.am
@@ -125,6 +125,7 @@ nodist_EXTRA_libvulkan_intel_la_SOURCES = dummy.cpp
 libvulkan_intel_la_SOURCES = $(VULKAN_GEM_FILES)

 VULKAN_ENTRYPOINT_CPPFLAGS = \
+ -I$(top_srcdir)/include/vulkan \
  -DVK_USE_PLATFORM_XCB_KHR \
  -DVK_USE_PLATFORM_WAYLAND_KHR


Alternatively the following will throw everything (both parsing and
errors from CPP) into a file parsed_header.log. Give it a try and send
me the file/log ?

diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
index 37c2986..9d36b22 100644
--- a/src/intel/vulkan/Makefile.am
+++ b/src/intel/vulkan/Makefile.am
@@ -129,6 +129,7 @@ VULKAN_ENTRYPOINT_CPPFLAGS = \
       -DVK_USE_PLATFORM_WAYLAND_KHR

anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
+       $(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS)
$(top_srcdir)/include/vulkan/vulkan_intel.h >parsed_header.log 2>&1
       $(AM_V_GEN)$(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS)
$(top_srcdir)/include/vulkan/vulkan_intel.h |\
       $(PYTHON2) $(srcdir)/anv_entrypoints_gen.py header > $@


> Thanks in advance
>
No, thank you for the report and patience sorting this out.

-Emil


More information about the mesa-dev mailing list