Unsolved What is build error meaning and what is proper solution to solve this error
-
Hi all,
I tried to build static libraries of qt.4.3.3 with following steps
-
I downloaded a open source of qt-all-opensource-src-4.3.3. I built static libraries using following steps.
-
cd qt-all-opensource-src-4.3.3 or commercial src
-
./configure -release -static -largefile -qt3support -qt-libpng -qt-libmng -qt-libtiff -qt-libjpeg -glib -platform linux-g++-64 -confirm-license -no-openssl -no-qdbus -prefix ./static_new -prefix-install -opengl -sm -lSM -lICE -xshape -lX11 -xinerama -lXinerama -xcursor -lXcursor -xfixes -lXfixes -xrandr -lXrandr -xrender -lXrender -fontconfig -lfontconfig -tablet -lXi -xkb -glib -lglib-2.0 -lXext -lz -lgthread-2.0
-
gmake
-
gmake install
And I am getting following error in
from ../../corelib/codecs/qsimplecodec_p.h:36,
from ../../corelib/codecs/qsimplecodec.cpp:22:
../../../include/QtCore/../../src/corelib/thread/qatomic.h: In instantiation of ?QAtomicPointer<T>::QAtomicPointer(T*) [with T = QByteArray]?:
../../corelib/codecs/qsimplecodec.cpp:592:74: required from here
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190:7: error: ?init? was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190:7: note: declarations in dependent base ?QBasicAtomicPointer<QByteArray>? are not found by unqualified lookup
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190:7: note: use ?this->init? instead
gmake[1]: *** [.obj/release-static/qsimplecodec.o] Error 1
gmake[1]: Leaving directory `/in/inndt69/Projects/oasys/QT/QT/qt-x11-commercial-src-4.3.3/qt-x11-commercial-src-4.3.3/src/tools/rcc'
gmake: *** [sub-rcc-make_default-ordered] Error 2When I added
QMakeVar add QMAKE_CXXFLAGS -fpermissive
X11TESTS_FLAGS="$X11TESTS_FLAGS -fpermissive"in configure file , then build error goes way
- I am not sure , Why this error is coming and If someone can guide me in detail on what the error is
- What is correct solution to solve this
Please note the gcc version I am using is gcc /5.2.0/
-
-
I guess you are aware that you are using a very old Qt version even on Qt4?
Since you are using a much more recent GCC version, you need to compile everything yourself anyhow. You should ask yourself, why are you not using at least a more recent Qt4 version?
If you really have good reasons to stay with your chosen versions, probably the best is to check if it is working correctly. -
Can u explain a little bit what the error is
rom ../../corelib/codecs/qsimplecodec_p.h:36,
from ../../corelib/codecs/qsimplecodec.cpp:22:
../../../include/QtCore/../../src/corelib/thread/qatomic.h: In instantiation of ?QAtomicPointer<T>::QAtomicPointer(T*) [with T = QByteArray]?:
../../corelib/codecs/qsimplecodec.cpp:592:74: required from here
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190:7: error: ?init? was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190:7: note: declarations in dependent base ?QBasicAtomicPointer<QByteArray>? are not found by unqualified lookup
../../../include/QtCore/../../src/corelib/thread/qatomic.h:190:7: note: use ?this->init? instead
gmake[1]: *** [.obj/release-static/qsimplecodec.o] Error 1
gmake[1]: Leaving directory `/in/inndt69/Projects/oasys/QT/QT/qt-x11-commercial-src-4.3.3/qt-x11-commercial-src-4.3.3/src/tools/rcc' -
The only thing is this from GCC manual:
-fpermissive
Downgrade some diagnostics about nonconformant code from errors to warnings.
Thus, using ‘-fpermissive’ allows some nonconforming code to compile.Qt 4.3 is probably about a 10 years old and there have been some updates and redefinitions for the different C++ standard during that time. Therefore, my personal guess is that the reasons have to be found there. When starting to use a new compiler version especially when based on newer standards, you have to expect new warning and even new error messages. That seems to have happened here. However, the developer's of gcc have been aware of this and took already precaution and basically guided you through the incompatibility. The result is that you can successfully compile and I personally would not expect that there should be major problems with the compilation. However, nobody can give you a gurantee. At the day's end you have to make the decision if you want to move forward with the compilation.
Otherwise I can only refer to my previous post. Check it out, if you are happy with the results.
By having doubts, I would either go with a gcc version as it was used originally for compiling Qt or would switch to a newer version of Qt anyhow.