Bug 399310 - Krita fails to build with Clang-7
Summary: Krita fails to build with Clang-7
Status: RESOLVED UNMAINTAINED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.1.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-02 16:16 UTC by krzysio.kurek
Modified: 2018-10-04 20:36 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description krzysio.kurek 2018-10-02 16:16:41 UTC
SUMMARY
fails when building:
libs/pigment/compositeops/KoOptimizedCompositeOpFactory.cpp
With error 

In file included from ../libs/pigment/compositeops/KoOptimizedCompositeOpFactory.cpp:20:
In file included from ../libs/pigment/compositeops/KoOptimizedCompositeOpFactoryPerArch.h:24:
In file included from ../libs/pigment/compositeops/KoVcMultiArchBuildSupport.h:39:
In file included from /usr/include/Vc/Vc:30:
In file included from /usr/include/Vc/vector.h:35:
In file included from /usr/include/Vc/avx/vector.h:32:
In file included from /usr/include/Vc/scalar/../common/../avx/casts.h:33:
In file included from /usr/include/Vc/scalar/../common/../avx/../sse/casts.h:31:
/usr/include/Vc/scalar/../common/../sse/intrinsics.h:601:13: error: argument to '__builtin_ia32_vec_ext_v4sf' must be a constant integer
            _MM_EXTRACT_FLOAT(f, v, i);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/lib/clang/7.0.0/include/smmintrin.h:890:11: note: expanded from macro '_MM_EXTRACT_FLOAT'
  { (D) = __builtin_ia32_vec_ext_v4sf((__v4sf)(__m128)(X), (int)(N)); }
          ^                                                ~~~~~~~~


STEPS TO REPRODUCE
1. Set up compilation with clang and clang++ as compilators
2. Attempt to compile the project

OBSERVED RESULT
The build fails

EXPECTED RESULT
The build succeeds

SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: 5.12.7
KDE Frameworks Version: 5.47
Qt Version: 5.9.5

ADDITIONAL INFORMATION
LLVM 7 toolchain compiled from source
Comment 1 Halla Rempt 2018-10-02 16:33:27 UTC
Please provide a patch; building with clang on Linux is not supported. The only place where we build with clang is macOS.
Comment 2 krzysio.kurek 2018-10-04 19:46:29 UTC
Dug in a bit, and it looks like a compiler bug.
I'll try to report it to LLVM.
Comment 3 krzysio.kurek 2018-10-04 20:19:52 UTC
Well I was wrong, it's a bug in Vc which is attempting to feed an lvalue where constexpr is needed.
Comment 4 Halla Rempt 2018-10-04 20:36:57 UTC
Thanks for digging in!