Configure QT 4.2.1 on Ububtu 14.04
-
Hi I am trying to configure QT 4.2.1 for cross platform but every time i get error while giving command ./configure.
Creating qmake. Please wait...
g++ -c -o project.o -m64 -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/src/corelib/arch/generic -I/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include -I/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore -I/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include -I/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore -I/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/src/corelib/global -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_BUILD_QMAKE -DQT_NO_COMPRESS -I/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/mkspecs/linux-g++-64 -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT project.cpp
In file included from /home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/qstack.h:1:0,
from project.h:30,
from project.cpp:24:
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h: In instantiation of ‘void QStack<T>::push(const T&) [with T = char]’:
project.cpp:193:31: required from here
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: error: ‘append’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
inline void push(const T &t) { append(t); }
~~~~^
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: note: declarations in dependent base ‘QVector<char>’ are not found by unqualified lookup
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: note: use ‘this->append’ instead
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h: In instantiation of ‘void QStack<T>::push(const T&) [with T = QMakeProject::ScopeBlock]’:
project.cpp:561:35: required from here
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: error: ‘append’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: note: declarations in dependent base ‘QVectorQMakeProject::ScopeBlock’ are not found by unqualified lookup
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: note: use ‘this->append’ instead
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h: In instantiation of ‘void QStack<T>::push(const T&) [with T = FunctionBlock*]’:
project.cpp:1603:37: required from here
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: error: ‘append’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: note: declarations in dependent base ‘QVector<FunctionBlock*>’ are not found by unqualified lookup
/home/eonit/Downloads/qt-x11-opensource-src-4.2.1/include/QtCore/../../src/corelib/tools/qstack.h:39:42: note: use ‘this->append’ instead
Makefile:203: recipe for target 'project.o' failed
make: *** [project.o] Error 1
This error might be due to latest gcc and g++ versions.
So how to explicitly specify the gcc version during ./configure -
@IamNotEinstien Just curious: is there a reason why you want to use this antique Qt version?
-
@jsulm just my target system supports this version only and not the latest one.
On target side i am using Redhat 4 with QT 4.2.1 having gcc 3.4.3. -
@IamNotEinstien I would build on Redhat 4 also instead of more recent Ubuntu with newer compiler.
You can set up a virtual machine with RedHat 4 for building.
Also I'm quite sure Qt 4.8.7 would work. -
@jsulm redhat 4 does not supports QT creator so its very difficult to design and implement the things, that is the reason i wanted to compile such version so that i can configure in my QT creator.
Other suggestions are most welcome if you have any. -
@IamNotEinstien Another suggestion: if RedHat 4 does not provide QtCreator, when compile QtCreator (an older version which can be compiled with your Qt version) on your RedHat 4 machine.
Even if you manage to compile this old Qt version on Ubuntu 14.04 you most probably will not be able to run your app built on Ubuntu on your RedHat machine because of very different distributions/lib versions (RedHat 4 was released 2005, 9 years before Ubuntu 14.04!).