trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: January 2012

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

From: Darrell Anderson <humanreadable@...>
Date: Thu, 19 Jan 2012 16:00:31 -0800 (PST)
> > Seriously, I'm not sure why you set that
> variable.  I never heard of
> > it before, and usually the safest way to get includes
> added to the
> > compiler flags is via CXXFLAGS and CFLAGS.
> I think he sets it because the Slackware official Qt3 build
> scripts we
> (I and Darrell) based ours on installs a profile script
> in /etc/profile.d that sets CPLUS_INCLUDE_PATH. I don't
> know why
> Slackware sets this variable but it has done it since at
> least 2003 and
> still does today (in the Qt4 package).

Yeah, what you said (as I just shared in a concurrent post. :) )

This raises some questions. Is the CPLUS_INCLUDE_PATH environment variable necessary at run for qt3 to behave? Or is this some kind of throw back to the early days of qt3 that has since become obsolete?

In another bug report (637) I submitted several patches that are used to build qt3 in Slackware. We discovered that the mysql.h patch is unnecessary. All that is needed is to add the -I/usr/include/mysql configure option. My guess is that patch was a carryover from days long past when the -I/usr/include/mysql configure option did not exist. Whenever a new release of qt3 became available, the first thing most people do is build with their existing build script. The patch always worked but became unnecessary and nobody noticed.

Similarly, in that same bug report, was a long standing patch for resetting the QT_BUILTIN_GIF_READER variable to 1. That patch goes back to the day when there were legal issues with gif patents and the reason for resetting that variable was to use qt3's built in gif support. Those legal issues no longer exist and the patch no longer is necessary. Further, qt3 has since then added a -qt-gif configure option that does the same thing.

So now I wonder whether CPLUS_INCLUDE_PATH is necessary during run time or whether that is a throw back to the early days of qt3. I think that depends upon where the qt3 header files get installed. Normally they are installed to the non standard location of $PREFIX/qt3/lib/include. Yet like the mysql problem, the installation location for the qt3 headers can be defined in the build configuration with -headerdir /usr/include/qt3. With the headers installed in a standard /usr/include subdirectory, building other apps that need qt3 should no longer need the CPLUS_INCLUDE_PATH variable.

I think a lot of what has transpired here is just old fashioned habits. Today probably nobody knows the original reasons for doing things that way. Why? "I don't know, that's just the way we've always done things around here." (http://www.simpleliberty.org/taota/introduction.htm)

Darrell