Message: previous - next
Month: January 2012

Re: [trinity-devel] Need help: cmake/pkgconfig breakage?

From: "Timothy Pearson" <kb9vqf@...>
Date: Thu, 19 Jan 2012 12:54:00 -0600
>> > Question: what is the correct value for that internal
>> variable?
>> This will be determined by the output of the pkg-config
>> command pkg-config
>> --cflags-only-I tqt
>> For example, on my system that command spits out:
>> -I/usr/include/qt3 -I/usr/include/tqt
>> My CMakeCache.txt file for tdelibs is attached.
> Thanks. At least I have a workaround with my script function to fix
> on-the-fly. Seems to be working nicely, but still bothers me.
> I notice in your qt3 build options you use the following:
> -headerdir  "/usr/include/qt3"
> I let qt3 install the headers to its own default location at
> $QTDIR/include. Do you think that makes a difference with pkg-config not
> working because the headers are not in the standard /usr/include location?

No, it won't make any difference.  That's why I had you manually check the
pkg-config output, which looked perfectly fine.

> I submitted a bug report about qt3 installing its pkg-config file in an
> odd location (bug report 796). Although I ceate a sym link, could that be
> confusing pkg-config with extracting information?

No, same as above it won't make any difference.

> Do you need that sym link on your system? If not, then how do you get your
> qt3 qt-mt.pc installed to /usr/lib/pkgconfig/? Or do you add that odd
> location to your system's $PKG_CONFIG_PATH environment variable? I'm
> adding that odd location to my $PKG_CONFIG_PATH path.

Debian moves the file around after build/install and before packaging IIRC.

The only other thing I can think of at all is that you could theoretically
have an old tqt.pc (or similar) file floating around in an obscure
directory.  I would search the entire system for such a file, just in case
an old one without the include directories is being picked up by CMake and
pkg-config together.

Assuming you don't find a stale tqt.pc file there are a few options open
to you:
1.) Manually extract the pkg-config information and patch the build
on-the-fly as you are doing now.  Just make sure to add a Nasty Hack
Warning Message to your build scripts stating that this is only to work
around a puzzling problem in CMake on Slackware for now. ;-)
2.) Post on the CMake mailing list with all the debugging information you
gave me, including your CMake version, CMakeCache.txt file, and tqt.pc
file.  Ask them why their built-in pkg_search_module() function is
populating everything EXCEPT <XPREFIX>_INCLUDE_DIRS.
3.) Upgrade your CMake version (this is a long shot, as the problem could
be in a dependent library for all I know)
4.) Try to replicate the problem on a Debian/Ubuntu system.  If you can do
that, and give me detailed instructions for replication, I can debug it
myself and hack around whatever is going wrong

Until someone else can replicate this problem, I am going to mark Bug 581

Sorry I can't be much more help here!