Kde-builder alkimia fails to build

Hi, I’m a newbie here and trying to contribute to KDE. I’m running kde-builder to install the package I want to work on, but it keeps failing at alkimia. The error message is this, doesn’t indicate any missing dependencies. Any ideas how to fix?

/home/ca/kde/src/alkimia/src/alknewstuffengine.cpp: In member function ‘bool AlkNewStuffEngine::Private::init(const QString&)’:
/home/ca/kde/src/alkimia/src/alknewstuffengine.cpp:90:25: error: ‘class KNSCore::EngineBase’ has no member named ‘cache’
   90 |     m_cache = m_engine->cache();

I suspect this might actually mean the Alkimia code should be changed. I see for example that KNewStuff had a major API change in master a few days ago: the grand API refactor of 2024 (!332) · Merge requests · Frameworks / KNewStuff · GitLab

I looked at the source code for KNewStuff… with that merge there, the member “cache” that alkimia is looking for is now provided only if this precompiler thing is true. #if KNEWSTUFFCORE_ENABLE_DEPRECATED_SINCE(6, 9) (see frameworks/knewstuff/-/blob/48da181d0f6f8e8ea80b7e40f475f7a8a8f21d7a/src/core/enginebase.h#L148)
How can I set this in the kde-builder? Thanks.

I think I have to set the preprocessor KNEWSTUFFCORE_DEPRECATED (in the file KNewStuffCore/KNSCore/knewstuffcore_export.h) to enable KNewStuff to export the deprecated symbol “cache”. This is so that alkimia can build without too many hacks to its code. Can someone tell me how to set that with (or for) kde-builder?

You might want to ask about this issue in the #kde-devel or #kde-new-contributors groups on Matrix.

1 Like