KDE UIC detection error

I've had this problem a couple of times now. I'm using the KDE 3.4.2 Slackware packages downloaded from the official KDE mirrors. When trying to build a KDE application, the configure script bombs out on "checking if UIC has KDE plugins available" with a message that that I need to install KDE libs first. This time, the message was:

If you did install kdelibs, then the Qt version that is picked up by this configure is not the same version you used to compile kdelibs. The Qt Plugin installed by kdelibs is *ONLY* loadable if it is the _same Qt version_, compiled with the _same compiler_ and the same Qt configuration settings.

So does this mean that somewhere along the line I ended up with Qt and KDE builds that don't exactly match? I guess that's it. Not that I know why they need to exactly match, but that's a different story. I'm not going to worry about it, though, since it'll fix itself the next time I upgrade.

As a stop-gap, a little Googling revealed that you can sneak by that check by editing the configure script, finding this line:
if test -f actest.cpp && grep klineedit actest.cpp > /dev/null; then
and changing "klineedit" to "KLineEdit". I don't know if this causes any problems with the build, but I don't think I've tried to build anything that requires UIC plugins yet.

You can reply to this entry by leaving a comment below. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.

Comments #

    KDE UIC detection error, change admin/acinclude.m4.in in automake based projects ...

    Hi Peter,

    thanks for you solution, it certainly helped me work around the same problem on an out-of-the-box openSuSE 10.0 system. One thing I'd like to add is that one should rather modify this line in "admin/acinclude.m4.in" if they are using automake based projects (e.g. KDevelop) because the confugure script gets eventually recreated based on this file.

    Cheers,
    Timo.

    no this doesn't work

    The check in configure is correct. It is looking for the line

    #include <klineedit.h>

    Thus the check for lower case klineedit. The configuration is not correct if it doesn't find this line. The use of the class KLineEdit is not what it is checking for.

    Doesn't work RIGHT

    Yes, you're absolutely right. The check is definitely correct. As I recall, there was even a comment in the configure script that *said* the check was definitely correct. The above "solution" simply serves to bypass the check. Perhaps there was an easier way, but apparently it wasn't obvious at the time.

    The real problem (aside from the broken KDE installation) was that the error was spurious. In my case, the packages affected didn't appear to need UIC plugins in the first place. At least, they seemed to work flawlessly without them. So while the check was correct, it's not clear that it should have been performed in the first place.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.