Bug 412058 - musl system: build failure
Summary: musl system: build failure
Status: RESOLVED DOWNSTREAM
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.6
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-19 10:49 UTC by Bart Ribbers
Modified: 2019-09-19 14:37 UTC (History)
1 user (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 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.