Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,047
    • Issues 3,047
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 990
    • Merge requests 990
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Issues
  • #833
Closed
Open
Issue created Sep 18, 2019 by Bugzilla Migration User@bugzilla-migration

Leaving Intel Vulkan driver out still runs scripts `src/intel/vulkan/`

Submitted by Paul Menzel

Assigned to Intel 3D Bugs Mailing List

Link to original bug (#104582)

Description

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

Version: 17.3

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking