Bug 94970 - Vulkan fail to build on i686
Summary: Vulkan fail to build on i686
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: x86 (IA32) All
: medium blocker
Assignee: Jason Ekstrand
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-16 15:34 UTC by Laurent carlier
Modified: 2016-04-21 16:58 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent carlier 2016-04-16 15:34:29 UTC
* gcc 5.3.0
* built with:
  ./autogen.sh --prefix=/usr \
  --sysconfdir=/etc \
  --with-dri-driverdir=/usr/lib/xorg/modules/dri \
  --with-gallium-drivers=r300,r600,radeonsi,nouveau,svga,swrast,virgl \
  --with-dri-drivers=i915,i965,r200,radeon,nouveau,swrast \
  --with-egl-platforms=x11,drm,wayland \
  --with-vulkan-drivers=intel \
  --with-sha1=libgcrypt \
  --enable-egl \
  --enable-gbm \
  --enable-gallium-llvm \
  --enable-llvm-shared-libs \
  --enable-shared-glapi \
  --enable-glx \
  --enable-glx-tls \
  --enable-dri \
  --enable-osmesa \
  --enable-gles1 \
  --enable-gles2 \
  --enable-texture-float \
  --enable-xa \
  --enable-vdpau \
  --enable-omx \
  --enable-nine \
  --enable-opencl --enable-opencl-icd \
  --with-clang-libdir=/usr/lib

====>

make[5]: Entering directory '/build/mesa-git/src/mesa/src/intel/vulkan'
  CC       libvulkan_intel_la-anv_allocator.lo
  CC       libvulkan_intel_la-anv_cmd_buffer.lo
  CC       libvulkan_intel_la-anv_batch_chain.lo
  CC       libvulkan_intel_la-anv_descriptor_set.lo
In file included from anv_batch_chain.c:30:0:
anv_private.h: In function 'anv_clflush_range':
anv_private.h:433:4: error: implicit declaration of function '__builtin_ia32_mfence' [-Werror=implicit-function-declaration]
    __builtin_ia32_mfence();
    ^
anv_private.h:435:7: error: implicit declaration of function '__builtin_ia32_clflush' [-Werror=implicit-function-declaration]
       __builtin_ia32_clflush(p);
       ^
In file included from anv_descriptor_set.c:30:0:
anv_private.h: In function 'anv_clflush_range':
anv_private.h:433:4: error: implicit declaration of function '__builtin_ia32_mfence' [-Werror=implicit-function-declaration]
    __builtin_ia32_mfence();
    ^
anv_private.h:435:7: error: implicit declaration of function '__builtin_ia32_clflush' [-Werror=implicit-function-declaration]
       __builtin_ia32_clflush(p);
       ^
In file included from anv_cmd_buffer.c:30:0:
anv_private.h: In function 'anv_clflush_range':
anv_private.h:433:4: error: implicit declaration of function '__builtin_ia32_mfence' [-Werror=implicit-function-declaration]
    __builtin_ia32_mfence();
    ^
anv_private.h:435:7: error: implicit declaration of function '__builtin_ia32_clflush' [-Werror=implicit-function-declaration]
       __builtin_ia32_clflush(p);
       ^
In file included from anv_allocator.c:37:0:
anv_private.h: In function 'anv_clflush_range':
anv_private.h:433:4: error: implicit declaration of function '__builtin_ia32_mfence' [-Werror=implicit-function-declaration]
    __builtin_ia32_mfence();
    ^
anv_private.h:435:7: error: implicit declaration of function '__builtin_ia32_clflush' [-Werror=implicit-function-declaration]
       __builtin_ia32_clflush(p);
       ^
cc1: some warnings being treated as errors
Makefile:1403: recipe for target 'libvulkan_intel_la-anv_allocator.lo' failed
make[5]: *** [libvulkan_intel_la-anv_allocator.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
cc1: some warnings being treated as errors
Makefile:1424: recipe for target 'libvulkan_intel_la-anv_descriptor_set.lo' failed
make[5]: *** [libvulkan_intel_la-anv_descriptor_set.lo] Error 1
cc1: some warnings being treated as errors
Makefile:1417: recipe for target 'libvulkan_intel_la-anv_batch_chain.lo' failed
make[5]: *** [libvulkan_intel_la-anv_batch_chain.lo] Error 1
cc1: some warnings being treated as errors
Makefile:1410: recipe for target 'libvulkan_intel_la-anv_cmd_buffer.lo' failed
make[5]: *** [libvulkan_intel_la-anv_cmd_buffer.lo] Error 1
make[5]: Leaving directory '/build/mesa-git/src/mesa/src/intel/vulkan'
Makefile:1660: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/build/mesa-git/src/mesa/src/intel/vulkan'
Makefile:840: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/build/mesa-git/src/mesa/src/intel/vulkan'
Makefile:550: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/build/mesa-git/src/mesa/src/intel'
Makefile:690: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/build/mesa-git/src/mesa/src'
Makefile:639: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /var/lib/archbuild/mesagit-i686/lcarlier/build
Comment 1 Laurent carlier 2016-04-16 16:36:14 UTC
gcc flags for i686 on Archlinux are:
CFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
CXXFLAGS="-march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong"
Comment 2 Laurent carlier 2016-04-16 16:39:33 UTC
These builtins are specific to sse2
https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html#x86-Built-in-Functions
Comment 3 Laurent carlier 2016-04-16 17:22:50 UTC
forcing sse2 on CFLAGS/CXXFLAGS fixes the build
Comment 4 Jason Ekstrand 2016-04-16 19:09:23 UTC
(In reply to Laurent carlier from comment #3)
> forcing sse2 on CFLAGS/CXXFLAGS fixes the build

We need to just do that in the Vulkan makefile.  You'll never run the driver on a machine that doesn't support sse2 anyway.


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.