Sans Pareil Technologies, Inc.

Key To Your Business

Building Qt Creator

Qt Creator is the preferred IDE for all C++ development at SPT. Compiling Qt Creator 2.5.2 requires a few changes to the source files to account for the differences between system libraries available on Linux and Solaris.

The qmake file that generates the qtcreator_process_stub application has a configuration for solaris, however the pattern specified is not matched on OpenIndiana. In particular the pattern should be solaris* and not solaris-.* as specified in the project file.

Change solaris-.* to solaris* in (line 17)

vi src/libs/utils/
  17        solaris*: LIBS += -lsocket

The virtualserialdevice_posix class does not compile due to two missing items. The first of them is a missing constant, which for Solaris is in the sys/filio.h include file which needs to be included. The second is a missing cfmakeraw function which needs to be created. Since this function is used only in the virtualserialdevice_posix class, we decided to implement the missing function as a private method of the class.

Edit src/shared/symbianutils/virtualserialdevice.h and add a private cfmakeraw function.

vi src/shared/symbianutils/virtualserialdevice.h

  40  #include <termios.h> // Moved from virtualserialdevice_posix.cpp line 38
  77        void cfmakeraw( struct termios* );

Edit src/shared/symbianutils/virtualserialdevice_posix.cpp. Add the missing cfmakeraw method implementation and an include for sys/filio.h to bring in missing FIONREAD constant value.

  39  #include <sys/filio.h> // Adds missing FIONREAD constant
340 void VirtualSerialDevice::cfmakeraw( struct termios* termios_p )
341 {
342     termios_p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
343                            |INLCR|IGNCR|ICRNL|IXON);
344     termios_p->c_oflag &= ~OPOST;
345     termios_p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
346     termios_p->c_cflag &= ~(CSIZE|PARENB);
347     termios_p->c_cflag |= CS8;
348 }

The next step is to enable the qmlprojectmanager plugin. The qmake project file configuration seems to lead to this plugin project being excluded with the Solaris Qt configuration. We just add the subdirs project to the file.

vi src/plugins/
  47            plugin_qmlprojectmanager \

Note that this line originally occurs at line 63 in the project file within the contains(QT_CONFIG, declarative) block.

We also need to enable the posix timer header include while building botan in the file. Add a “|solaris*” to lines 287, and 571.

vi src/libs/3rdparty/botan/src/
  287 linux*.g++*|freebsd*.g++*|solaris* {
  571 linux*|freebsd*|solaris* {

With these changes Qt Creator 2.5.2 builds and links on Solaris 11.