Sans Pareil Technologies, Inc.

Key To Your Business

Building Qt



Building Qt is straightforward as long as modules that are known to not work are disabled. In particular disable WebKit and JavaScriptCore modules to compile Qt. Since we use GCC 4.6.2 from opencsw instead of the GCC 3.4 distributed along with Solaris we need to modify the mkspecs files accordingly.

vi mkspecs/solaris-g++-64/qmake.conf

     45 QMAKE_INCDIR            = /opt/csw/include
     46 QMAKE_LIBDIR            = /opt/csw/lib/64
     58 QMAKE_LFLAGS            = -R/opt/csw/lib/64



Note that you may chose to use crle to permanently set the library path to /opt/csw/lib/64 instead of using Rpath in the mkspecs file.

The following script was used to compile Qt 4.7.4 using GCC 4.5.1

#!/bin/ksh

./configure -opensource --prefix=/usr/local/qt -optimized-qmake \
  -no-webkit -no-script -no-qt3support \
  -nomake examples -nomake demos -nomake docs -nomake translations \
  -platform solaris-g++-64
gmake -s -j8
pfexec gmake install



Qmake projects are our standard for building C++ projects (regardless of whether the project uses Qt or not). We have used Qt Core and qmake successfully on numerous internal C++ projects.