Bug 449490

Summary: Build failure at KoAlphaMaskApplicatorFactoryImpl_Scalar.cpp.o
Product: [Applications] krita Reporter: toginn <nobonobo0>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: crash CC: alvin, nobonobo0
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: The error log.

Description toginn 2022-02-02 10:53:47 UTC
Created attachment 146163 [details]
The error log.

SUMMARY
***
I tried to build krita according to "https://docs.krita.org/en/untranslatable_pages/building_krita.html",
but it crashed.
Git hash: 33243c7bb9fcc1624618e89cf1d1576ec450631a
***

Hi. Sorry for begginer's question. I would like to contribute krita. I tried to build krita using cmake & make, but it failed. I installed all the dependency. I also tried to build krita using Docker and it succeeded. It seems something is wrong with my system environment. How do I do? Thank you.

STEPS TO REPRODUCE
$ cmake ../krita \
        -DCMAKE_INSTALL_PREFIX=$HOME/kritadev/install  \
        -DCMAKE_BUILD_TYPE=Debug \
        -DKRITA_DEVS=ON
$ make

OBSERVED RESULT
```
~~~~~
In file included from /usr/include/Vc/vector.h:191,
                 from /usr/include/Vc/Vc:30,
                 from /home/username/Projects/kritadev/krita/libs/pigment/compositeops/KoVcMultiArchBuildSupport.h:28,
                 from /home/username/Projects/kritadev/krita/libs/pigment/KoAlphaMaskApplicatorFactoryImpl.h:10,
                 from /home/username/Projects/kritadev/build/libs/pigment/KoAlphaMaskApplicatorFactoryImpl_Scalar.cpp:7:
/usr/include/Vc/common/simdarray.h:2575:48: note: provided for ‘template<class T, long unsigned int N, class V, long unsigned int VN> struct std::numeric_limits’
 2575 | struct numeric_limits<Vc::SimdArray<T, N, V, VN>> : public numeric_limits<T> {
      |                                                ^~
make[2]: *** [libs/pigment/CMakeFiles/kritapigment.dir/build.make:830: libs/pigment/CMakeFiles/kritapigment.dir/KoAlphaMaskApplicatorFactoryImpl_Scalar.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/username/Projects/kritadev/krita/libs/widgetutils/config/krecentfilesaction.cpp: In member function ‘void KRecentFilesAction::addAction(QAction*, const QUrl&, const QString&)’:
/home/username/Projects/kritadev/krita/libs/widgetutils/config/krecentfilesaction.cpp:196:85: warning: unused parameter ‘name’ [-Wunused-parameter]
  196 | void KRecentFilesAction::addAction(QAction *action, const QUrl &url, const QString &name)
      |                                                                      ~~~~~~~~~~~~~~~^~~~
make[1]: *** [CMakeFiles/Makefile2:10856: libs/pigment/CMakeFiles/kritapigment.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:146: all] Error 2
```

EXPECTED RESULT
I would like to build it.

SOFTWARE/OS VERSIONS
Linux: Pop!_OS 21.10 x86_64
Qt Version: 5.15.2
CMake Version: 3.22.1
GNU Make Version: 4.3
GCC Version: 11.2.0

ADDITIONAL INFORMATION
I attached the error logs.
Comment 1 Alvin Wong 2022-02-02 11:10:46 UTC
Issue is caused by a missing include in Vc and already fixed upstream: https://github.com/VcDevel/Vc/pull/275

I recommend using the Docker build environment, which can use the same dependencies we ship with the appimage. If you really want to build Krita using system libraries, you need to somehow update your Vc install.
Comment 2 toginn 2022-02-03 00:20:18 UTC
Thank you for replying! I will use the Docker build environment. When I get used to it, I will try to build using my system libraries.