Bug 104582 - Leaving Intel Vulkan driver out still runs scripts `src/intel/vulkan/`
Summary: Leaving Intel Vulkan driver out still runs scripts `src/intel/vulkan/`
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: 17.3
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-11 15:01 UTC by Paul Menzel
Modified: 2019-09-18 19:48 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Paul Menzel 2018-01-11 15:01:29 UTC
To work around build problems due to the lack of Python Mako templates as reported in bug #104551 [1], I configured it only with `--with-vulkan-drivers=radeon`.

Unfortunately, Python scripts from `src/intel/vulkan` are still run.

```
$ /dev/shm/bee-root/mesalib/mesalib-17.3.1-0/source/autogen.sh --prefix=/usr --bindir=/usr/bin --sbindir=/
usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --sharedstatedir=/var --localstatedir=/var --libdir=/usr/
lib --includedir=/usr/include --datarootdir=/usr/share --datadir=/usr/share --infodir=/usr/share/info --locale
dir=/usr/share/locale --mandir=/usr/share/man --docdir=/usr/share/doc/mesalib --exec-prefix=/usr --enable-text
ure-float --enable-gles1 --enable-gles2 --enable-osmesa --enable-xa --enable-glx-tls --with-platforms=drm,x11,
wayland --with-gallium-drivers=nouveau,r600,radeonsi,svga,swrast --with-vulkan-drivers=radeon
[…]
$ make -j62
[…]
  CC       common/common_libamd_common_la-ac_shader_info.lo
/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/source/src/amd/common/ac_nir_to_llvm.c: In function 'handle_es_outputs_post':
/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/source/src/amd/common/ac_nir_to_llvm.c:5925:13: warning: 'dw_addr' may be used uninitialized in this function [-Wmaybe-uninitialized]
     dw_addr = LLVMBuildAdd(ctx->builder, dw_addr, ctx->i32one, "");
             ^
  CXXLD    addrlib/libamdgpu_addrlib.la
  CXXLD    common/libamd_common.la
make[4]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/amd'
make[3]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/amd'
Making all in intel
make[3]: Entering directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/intel'
  GEN      vulkan/anv_entrypoints.c
  GEN      vulkan/anv_extensions.c
Traceback (most recent call last):
  File "/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/source/src/intel/vulkan/anv_entrypoints_gen.py", line 30, in <module>
    from mako.template import Template
ImportError: No module named mako.template
Makefile:4816: recipe for target 'vulkan/anv_entrypoints.c' failed
make[3]: *** [vulkan/anv_entrypoints.c] Error 1
make[3]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
  File "/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/source/src/intel/vulkan/anv_extensions.py", line 281, in <module>
    from mako.template import Template
ImportError: No module named mako.template
Makefile:4826: recipe for target 'vulkan/anv_extensions.c' failed
make[3]: *** [vulkan/anv_extensions.c] Error 1
make[3]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src/intel'
Makefile:860: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src'
Makefile:651: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/dev/shm/bee-root/mesalib/mesalib-17.3.1-0/build/src'
Makefile:658: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
```

I’d naively assume, it wouldn’t touch anything under `src/intel/vulkan`, if the Intel Vulkan driver is not selected.

From `src/intel/Makefile.vulkan.am` this seems to be a workaround to a autoconf bug.

```
# Due to a what seems like a autoconf bug, we must ensure that the genaration
# rules must be outside of any AM_CONDITIONALs. Otherwise they will be commented
# out and we'll fail at `make dist'
vulkan_api_xml = $(top_srcdir)/src/vulkan/registry/vk.xml
vk_android_native_buffer_xml = $(top_srcdir)/src/vulkan/registry/vk_android_native_buffer.xml

vulkan/anv_entrypoints.c: vulkan/anv_entrypoints_gen.py \
                          vulkan/anv_extensions.py \
                          $(vulkan_api_xml) \
                          $(vk_android_native_buffer_xml)
        $(MKDIR_GEN)
        $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_entrypoints_gen.py \
                --xml $(vulkan_api_xml) \
                --xml $(vk_android_native_buffer_xml) \
                --outdir $(builddir)/vulkan
vulkan/anv_entrypoints.h: vulkan/anv_entrypoints.c

vulkan/anv_extensions.c: vulkan/anv_extensions.py \
                         $(vulkan_api_xml) \
                         $(vk_android_native_buffer_xml)
        $(MKDIR_GEN)
        $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_extensions.py \
                --xml $(vulkan_api_xml) \
                --xml $(vk_android_native_buffer_xml) \
                --out $@

BUILT_SOURCES += $(VULKAN_GENERATED_FILES)
CLEANFILES += \
        $(VULKAN_GENERATED_FILES) \
        vulkan/dev_icd.json \
        vulkan/intel_icd.@host_cpu@.json

EXTRA_DIST += \
        $(top_srcdir)/include/vulkan/vk_icd.h \
        vulkan/anv_entrypoints_gen.py \
        vulkan/anv_extensions.py \
        vulkan/anv_icd.py \
        vulkan/TODO

vulkan/dev_icd.json : vulkan/anv_extensions.py vulkan/anv_icd.py
        $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_icd.py \
                --lib-path="${abs_top_builddir}/${LIB_DIR}" --out $@

vulkan/intel_icd.@host_cpu@.json : vulkan/anv_extensions.py vulkan/anv_icd.py
        $(AM_V_GEN)$(PYTHON2) $(srcdir)/vulkan/anv_icd.py \
                --lib-path="${libdir}" --out $@

if HAVE_INTEL_VULKAN
[…]
```

Is there an upstream bug for autoconf already?

[1] https://bugs.freedesktop.org/show_bug.cgi?id=104551
Comment 1 GitLab Migration User 2019-09-18 19:48:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/833.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.