Bug 417391

Summary: KisDabRenderingQueueTest is broken in macOS
Product: [Applications] krita Reporter: amyspark <amy>
Component: UnittestsAssignee: vanyossi <ghevan>
Status: RESOLVED LATER    
Severity: normal CC: ghevan, halla
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: macOS   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description amyspark 2020-02-10 16:41:40 UTC
SUMMARY

KisDabRenderingQueueTest compilation fails in macOS with:

ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file '../../kritadefaultpaintops.so' for architecture x86_64

STEPS TO REPRODUCE
1. Get a copy of krita master at the src/ folder. Make the build/ and install/ dirs at the same level.
2. Configure CMake build.
3. make -j2 all.

OBSERVED RESULT
Compilation succeeds.

EXPECTED RESULT
Everything compiles except for that test.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: Mojave 10.14.6, Xcode 11.3.1 (11C504)
Linux/KDE Plasma: N/A
(available in About System)
KDE Plasma Version: N/A
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION
I use the following CMake variables to set up my build.
        "CMAKE_PREFIX_PATH": "/usr/local/opt/qt;/usr/local/opt/gettext;/usr/local/opt/zlib;/usr/local/lib/;../install",
        "QUAZIP_INCLUDE_DIR": "/usr/local/include/quazip",
        "QUAZIP_LIBRARIES": "/usr/local/lib/libquazip.dylib",
        "OPENEXR_INCLUDE_DIR": "/usr/local/include/openexr",
        "BUILD_TESTING": "ON",
        "CMAKE_INSTALL_PREFIX": "../install",
        "KDE_INSTALL_BUNDLEDIR": "../install/bin",
        "PYQT_SIP_DIR_OVERRIDE": "/usr/local/share/sip/Qt5",
Comment 1 vanyossi 2020-02-12 16:18:42 UTC
I've known about this and commented on this on irc. It's good to have it here so I get it fixed someday.

clang on macOS does not allow to link as a module, this tpe of linking has to be done at runtime using dlopen()
Comment 2 amyspark 2020-02-12 20:22:54 UTC
Git commit 71edffcb14464f02c87e8b19e8d0c74b559d3d71 by L. E. Segovia.
Committed on 12/02/2020 at 20:22.
Pushed by lsegovia into branch 'master'.

Add KisDabRenderingQueueTest to the broken tests

At least for Apple platforms.

M  +12   -5    plugins/paintops/defaultpaintops/brush/tests/CMakeLists.txt

https://invent.kde.org/kde/krita/commit/71edffcb14464f02c87e8b19e8d0c74b559d3d71
Comment 3 Halla Rempt 2020-02-17 14:48:32 UTC
Then let's resolve as later, since that's the meaning of add_broken_unittest.