Summary: | media-libs/mesa-10 - In file included from main/streaming-load-memcpy.c:31: /usr/lib/gcc/i686-pc-linux-gnu/4.8.2/include/mmintrin.h:310:3: error: can’t convert between vector values of different size | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Savchenko <bircoph> |
Component: | [OLD] Library | Assignee: | Gentoo X packagers <x11> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | bircoph |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
environment emerge --info 10.0.4-build.log mesa-10.1.0-sse41.patch mesa-10.1.0.ebuild.patch |
Description
Andrew Savchenko
2014-04-16 06:06:30 UTC
Created attachment 375052 [details]
build.log
Created attachment 375054 [details]
environment
Created attachment 375056 [details]
emerge --info
Please note that build is performed with CXXFLAGS=CFLAGS="-O2 -march=native -pipe" to rule out CFLAGS issue.
Created attachment 375060 [details]
10.0.4-build.log
Meanwhile 10.0.4 fails with the same problem.
Looks like mesa authors assume that if gcc supports -msse4.1 flag it is safe to add it to CFLAGS without actual CPU check, from configure.ac:
AX_CHECK_COMPILE_FLAG([-msse4.1], [SSE41_SUPPORTED=1], [SSE41_SUPPORTED=0])
Idiots.
Created attachment 375094 [details, diff]
mesa-10.1.0-sse41.patch
Looks like we have two issues here:
1) SSE4_1 code (src/mesa/main/streaming-load-memcpy.[ch]) is automagically enabled if compiler supports -msse41 flag.
2) SSE4_1 intrinsics are not x86 friendly. Though to my knowledge all SSE4_1 capable CPUs are 64-bit and in most cases users will just build 64-bit mesa versions, it is still possible that someone wants to build 32-bit code with sse41 support enabled.
Propesed patch fixes first problem and adds sse4_1 USE flag.
Created attachment 375096 [details, diff]
mesa-10.1.0.ebuild.patch
Ebuild patch required to add sse4_1 USE flag and the patch above.
*** This bug has been marked as a duplicate of bug 503828 *** |