Message: previous - next
Month: January 2012

Need help: cmake/pkgconfig breakage?

From: Darrell Anderson <humanreadable@...>
Date: Wed, 18 Jan 2012 20:18:18 -0800 (PST)
I don't know where to start but apparently cmake, or something related to cmake with respect to Trinity, or pkgconfig, is broken on my Slackware 13.1 build environment.

Tim helped me with some testing. We know that something is not right when trying to build Trinity on Slackware, but we have to find the root cause. Tim believes the built-in pkgconfig system in my build environment is not working correctly.

I have not experienced any build issues with many other cmake packages not related to Trinity. I have been building my own packages for many years. I would have noticed something awry with other packages and not just Trinity packages. Therefore I believe the problem is limited to my build environment for Trinity.

The problems are provided in bug report 581, but narrow to this:

1) cmake will not populate the internal TQT_INCLUDE_DIRS variable. Although the problematic package reported in bug report 581 is tdelibs, I have verified this to be true with arts and tdebase too. Oddly, both of those packages build without that internal variable being set. Regardless, the problem seems to be fundamental that TQT_INCLUDE_DIRS never gets populated. Because of this failure to populate that internal cmake variable, the tdelibs build fails almost immediately with this error:

cc1: error: tqt.h: No such file or directory

Of course, tqt.h does indeed exist in my build environment. Nobody else has reported this failure.

2) The second problem is tdelibs will not build unless a sym link exists:

cd /usr/include/tqt; ln -s ${QTDIR}/include/qglobal.h qglobal.h

At least one other Slackware user reported this same sym link requirement:

According to Tim, the sym link is not required by anybody else.

Oddly, arts and tdebase will build without the TQT_INCLUDE_DIRS internal variable and the sym link. tdelibs and tdevelop both fail to build without these requirements being met.

In my tdelibs build script I wrote a small test that executes just after the cmake configure and before make. All I did in my snippet was look for a value in TQT_INCLUDE_DIRS and when empty, grab the value from TQT_INCLUDEDIR and populate TQT_INCLUDE_DIRS with that value.

That produced some nominal success. Instead of the usual cc1 message about tqt.h not existing, I received an error message about not finding qglobal.h. I inserted a aforementioned sym link and then the tdelib package built.

So even if I discover how to get the TQT_INCLUDE_DIRS internal variable to populate automatically, I still need to figure out why this sym link is needed when nobody else does.

I'm using cmake 2.8.4 on Slackware 13.1, although the stock Slackware 13.1 came with 2.8.1.

I have tested this with and without Qt4 being installed, so the problem is not crossing paths with Qt4.

I'm open to the idea that I'm not correctly setting environment variables, or that I am making a common mistake or presumption throughout my build scripts. I am not embarrassed if this turns out to be a PEBKAC issue. :)

I appreciate any help. There is an interest in Trinity in the Slackware community and my web site gets quite a few hits every day at my KDE3 and Trinity pages. I'd like to get these problems resolved because others in the Slackware community look to me as a pivot point to build and use KDE3 and Trinity.

I know next to nothing about cmake or pkgconfig. I just use them. :) So please start with the basics when trying to help. Don't assume I know better --- I probably don't, although I learn quickly. :)

Thanks much!