PDA

View Full Version : Configure error building Qt 4.4.3 on Red Hat Enterprise Linux 4



montylee
3rd December 2008, 22:42
I am trying to build Qt 4.4.3 on Red Hat Enterprise Linux AS release 4. When i run configure, i get the following error (I have removed similar errors to make the post readable):



g++ -c -o qvariant.o -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/include -I/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/include/QtCore -I/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/include -I/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/include/QtCore -I/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/corelib/global -I/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/script -DQT_NO_PCRE -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE -DQT_NO_COMPRESS -I/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/corelib/kernel/qvariant.cpp
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/include/QtCore/private/../../../src/corelib/kernel/qvariant_p.h: In function `const class QString * v_cast<QString>(const QVariant::Private *, QString * = 0)':
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/corelib/kernel/qvariant.cpp:289: instantiated from here
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/include/QtCore/private/../../../src/corelib/kernel/qvariant_p.h:77: static_cast from `void *' to `const QString *'
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/include/QtCore/private/../../../src/corelib/kernel/qvariant_p.h: In function `const class QChar * v_cast<QChar>(const QVariant::Private *, QChar * = 0)':
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/corelib/kernel/qvariant.cpp:291: instantiated from here
---
---
---
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/corelib/kernel/qvariant.cpp:446: instantiated from here
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/corelib/kernel/qvariant.cpp:350: static_cast from `void *' to `const char *'
/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3/src/corelib/kernel/qvariant.cpp:350: static_cast from `void *' to `const char *'
gmake: *** [qvariant.o] Error 1


Now, i have the following g++ versions installed:

GCC 2.95:

[/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3]>> g++ -v
Reading specs from /usr/local/gcc295/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)

GCC 3.4.4:

[/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3]>> g++.344 -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)

GCC 3.2.3:

[/home/singhr/Builds/Qt/qt-x11-opensource-src-4.4.3]>> g++32 -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --disable-libgcj --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47.3)

I think by default Qt is picking up g++ i.e. g++ version 2.95.3. Could this be the source of the problem?

jpn
4th December 2008, 17:54
I think by default Qt is picking up g++ i.e. g++ version 2.95.3. Could this be the source of the problem?
Yes, it could. See Supported Platforms and Compilers (http://trolltech.com/developer/supported-platforms).

montylee
5th December 2008, 18:40
i got it working. Qt was picking up gcc 2.95, so i renamed the gcc to gcc295 and renamed gcc344 to gcc.