Compile error in CentOS

Submitted by x316th on 2010-01-21

I set the parameters in the configure file as
prefix=/var/www/html/webissues
destdir=/var/www/html/webissues
config=release
QMAKE=/usr/lib/qt4/bin/qmake

And I tried to install webissues 0.9.6 on CentOS 5.2 and I got an error during compilation as followed.

$ ./configure
Testing for qmake...
Using /usr/lib/qt4/bin/qmake (Qt 4.2.1)
Writing configuration file...
Generating Makefiles...
Reading /var/www/html/webissues/src/src.pro

Configure finished. Run 'make' now.

$ make
cd src && make -f Makefile
make[1]: Entering directory `/var/www/html/webissues/src'
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include -I. -I../tmp -I../tmp -o ../tmp/release/application.o application.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include -I. -I../tmp -I../tmp -o ../tmp/release/configdata.o configdata.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include -I. -I../tmp -I../tmp -o ../tmp/release/connectionmanager.o connectionmanager.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include -I. -I../tmp -I../tmp -o ../tmp/release/iconloader.o iconloader.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include -I. -I../tmp -I../tmp -o ../tmp/release/main.o main.cpp
g++ -c -pipe -O2 -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtCore -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtNetwork -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtGui -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include/QtXml -I/usr/lib/qt4/include -I. -I../tmp -I../tmp -o ../tmp/release/mainwindow.o mainwindow.cpp
mainwindow.cpp: In constructor ‘MainWindow::MainWindow()’:
mainwindow.cpp:177: error: ‘fromHex’ is not a member of ‘QByteArray’
mainwindow.cpp: In destructor ‘virtual MainWindow::~MainWindow()’:
mainwindow.cpp:215: error: ‘class QByteArray’ has no member named ‘toHex’
mainwindow.cpp: In member function ‘void MainWindow::initializeView()’:
mainwindow.cpp:291: error: ‘class QVBoxLayout’ has no member named ‘setContentsMargins’
mainwindow.cpp:341: error: ‘fromHex’ is not a member of ‘QByteArray’
mainwindow.cpp:343: error: ‘fromHex’ is not a member of ‘QByteArray’
mainwindow.cpp: In member function ‘void MainWindow::closeView(bool)’:
mainwindow.cpp:402: error: ‘class QByteArray’ has no member named ‘toHex’
mainwindow.cpp:403: error: ‘class QByteArray’ has no member named ‘toHex’
make[1]: *** [../tmp/release/mainwindow.o] Error 1
make[1]: Leaving directory `/var/www/html/webissues/src'
make: *** [sub-src-make_default] Error 2

Is it supported CenOS linux?.

Hmm... 4.2.1 is a pretty old version of Qt. The oldest version I'm testing against is 4.3.4. I recommend upgrading your OS :).

Regards,
Michał