Bug 412058

Summary: musl system: build failure
Product: [Applications] krita Reporter: Bart Ribbers <bribbers>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: 4.2.6   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Bart Ribbers 2019-09-19 10:49:12 UTC
SUMMARY

Krita fails to compile on a Musl based system

STEPS TO REPRODUCE
1. Get a Musl system like Alpine Linux or Gentoo Musl
2. Try to compile Krita

OBSERVED RESULT

Compilation fails almost halfway through.

/home/builder/aports/testing/krita/src/krita-4.2.6/libs/image/tests/kis_paint_device_test.cpp: In member function 'void KisPaintDeviceTest::stressTestMemoryFragmentation()':
/home/builder/aports/testing/krita/src/krita-4.2.6/libs/image/tests/kis_paint_device_test.cpp:2358:25: error: variable 'KisPaintDeviceTest::stressTestMemoryFragmentation()::mallinfo info' has initializer but incomplete type
 2358 |         struct mallinfo info = mallinfo();
      |                         ^~~~
/home/builder/aports/testing/krita/src/krita-4.2.6/libs/image/tests/kis_paint_device_test.cpp:2358:41: error: invalid use of incomplete type 'struct KisPaintDeviceTest::stressTestMemoryFragmentation()::mallinfo'
 2358 |         struct mallinfo info = mallinfo();
      |                                         ^
/home/builder/aports/testing/krita/src/krita-4.2.6/libs/image/tests/kis_paint_device_test.cpp:2358:16: note: forward declaration of 'struct KisPaintDeviceTest::stressTestMemoryFragmentation()::mallinfo'
 2358 |         struct mallinfo info = mallinfo();
      |                ^~~~~~~~

EXPECTED RESULT

Krita to compile properly


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux 4.19.73
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.5

ADDITIONAL INFORMATION

This system uses Musl rather than glibc which is probably the cause of the failure.
Comment 1 Halla Rempt 2019-09-19 14:37:03 UTC
I'm sorry, but please provide a patch: a system like this is so niche that it's not a good use of our time to work on a fix. Maybe first try to build Krita itself without any of the unittests, though -- the patch could be as simple as a cmake check for the musl c-library that disables this test.