[KDE/Mac] KF5 ports and KDE4 co-existence

René J.V. Bertin rjvbertin at gmail.com
Thu Jan 14 13:20:01 UTC 2016


Hi,

I think I have the explanation.

:info:build /opt/local/var/macports/build/_Users_marko_WC_MacPorts-test_ports_kf5_K5rameworks/kf5-kdoctools/work/kdoctools-5.17.0/src/xslt_kde.cpp:6:16: error: no matching constructor for initialization of 'KFilterDev'
:info:build     KFilterDev fd(filename);
:info:build                ^  ~~~~~~~~
:info:build /opt/local/include/kfilterdev.h:36:23: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const QString' to 'const KFilterDev' for 1st argument
:info:build class KARCHIVE_EXPORT KFilterDev : public QIODevice
:info:build                       ^
:info:build /opt/local/include/kfilterdev.h:146:14: note: candidate constructor not viable: no known conversion from 'const QString' to 'KFilterBase *' for 1st argument
:info:build     explicit KFilterDev( KFilterBase * filter, bool autoDeleteFilterBase = false );
:info:build              ^
:info:build 1 error generated.

/opt/local/include/kfilterdev.h is a header from kdelibs4; the KF5 version lives in /opt/local/include/KF5/KArchive .

3 solutions:

- rebuild and reinstall kdelibs4 with my PortGroup (you could use the occasion to upgrade to 4.14.14 (or so) via my port:kdelibs4)
- deactivate port:kdelibs4 for building KF5
- try trace mode

I'd actually be interested to know if trace mode really helps here, and doesn't introduce problems of its own ;)

BTW, in this case kdelibs4 is the culprit, but it's possible to run in similar conflicts with headerfiles from other "core" KDE4 ports. If you see a reference to a header directly under ${prefix}/include (or not under ${prefix}/include/KF5 when building the KF5 Frameworks OR including a header supposedly from a KF5 framework) chances are that it's a KDE4 headerfile. You can confirm with `port provides`, and if confirmed, rebuild the port in question. 

Note that it's perfectly possible to run into ports where rebuilding with my latest KDE4 PortGroup doesn't move the headers (into ${prefix}/include/KDE4); in that case please let me know.

R.


More information about the kde-mac mailing list