Message: previous - next
Month: February 2011

kdebase make failure if Qt4 installed, QtCore/qfile.h QT_BEGIN_HEADER doesn't name type

From: "David C. Rankin" <drankinatty@...>
Date: Thu, 03 Feb 2011 22:29:21 -0600

[ 11%] Building CXX object
[ 11%] Building CXX object
In file included from /usr/include/QtCore/QFile:1:0,
/usr/include/QtCore/qfile.h:53:1: error: ‘QT_BEGIN_HEADER’ does not name a type
/usr/include/QtCore/qfile.h:62:27: error: expected initializer before ‘:’ token
make[2]: ***
[kicker/libkicker/CMakeFiles/kickermain-shared.dir/kickerSettings.cpp.o] Error 1
make[1]: *** [kicker/libkicker/CMakeFiles/kickermain-shared.dir/all] Error 2
make: *** [all] Error 2

I have 3 x86_64 boxes and 4 i686 boxes I'm building on. Some with kde4, some
without. With kde4/Qt4 installed, the kdebase build dies as above.

On the boxes without QT4, the build progresses to 30% before the iccconfig.cpp
build error.

I'm rather stumped.I would like to find a way to tell the kdebase build to NOT
EVER-EVER look in /usr/include/QtCore. But so far I haven't found a way to do
it. It is clear from the error above, that the qt4 qfile.h is causing the
problem. The correct qfile.h is in /opt/qt/include, but for some reason isn't
being used:

22:24 providence:~/arch/pkg/tbld/kdebase/kicker/libkicker> pmq -o
/usr/include/QtCore/qfile.h is owned by qt 4.7.1-3
22:24 providence:~/arch/pkg/tbld/kdebase/kicker/libkicker> find /opt/qt/ -name

I try limiting that problem with PATH and kde environment tweaks:

build() {
  msg "Setting PATH, CMAKE and Trinity Environment variables"
  [[ ${PATH%%:*} =~ /opt/qt/bin ]] || export PATH=/opt/qt/bin:$PATH
  export CMAKE_PREFIX_PATH=/opt/qt
  export CMAKE_INCLUDE_PATH=/opt/qt/include:/opt/qt/include/tqt
  export KDEDIR=/opt/trinity
  export KDEDIRS=/opt/trinity:/usr
  export XDG_CONFIG_DIRS=/etc/xdg:/opt/trinity/etc/xdg:/opt/trinity/etc/xdg


  cd ${srcdir}
  cmake ../ \
    -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \
    -DWITH_QT3=ON \
  make  || return 1

But even with these variables, the build grabs QtCore regardless. Are there any
other cmake variables that I can use that would make sense in this situation?

Any help would be greatly appreciated. Also, let me know if there and statements
or variables set above that I need to remove. Thanks.

David C. Rankin, J.D.,P.E.