Compiling qt 4.8.4 from source - probably cached file somewhere
-
Hello,
I have a question regarding compilation of Qt 4.8.4, however I think it is a more general question.When I run make, the compiler complains:
make cd /src/tools/bootstrap/ && ( test -e Makefile || /usr/bin/qmake -o Makefile /src/tools/bootstrap/bootstrap.pro ) && make -f Makefile Info: creating stash file /src/tools/bootstrap/.qmake.stash make[1]: Entering directory '/src/tools/bootstrap' g++ -c -pipe -O2 -fPIC -Wall -Wextra -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -I. -I/include -I/include/QtCore -I/include/QtXml -I../../3rdparty/zlib -I/usr/lib64/qt6/mkspecs/linux-g++ -o qisciicodec.o ../../corelib/codecs/qisciicodec.cpp In file included from ../../corelib/codecs/qisciicodec.cpp:41: ../../corelib/codecs/qisciicodec_p.h:56:10: fatal error: QtCore/qtextcodec.h: No such file or directory 56 | #include "QtCore/qtextcodec.h" | ^~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [Makefile:446: qisciicodec.o] Error 1 make[1]: Leaving directory '/src/tools/bootstrap'
I edited ../../corelib/codecs/qisciicodec_p.h line 56 and changed it to #include "qtextcodec.h" which should be accessible.
However, when I run make again, it still complains about the same error.Did I forget to delete some cache files?
Thank you!
Vaclav -
Hi,
One thing that stands out is the build path (
/src/tools/bootstrap/
), it does not look correct.
Where did you decompress the sources ?
How did you call configure ?
Are you doing an out of source build ?
If the answer to the last question is no, then start from a fresh Qt source and use an out of source build. It will simplify things.
By the way, why do you need Qt 4 ? It has reached end of life almost a decade ago. -
I decompressed the sources to ./qt-everywhere-opensource-src-4.8.4.
I called configure like this: ./configure -platform linux-g++-32.
I am not doing out of source build.
I need Qt 4 for a very old application that is still being used (for work).
The problem is that despite I changed the mentioned source file it seems that compiler doesn't see the change.. -
@mravenca said in Compiling qt 4.8.4 from source - probably cached file somewhere:
I called configure like this: ./configure -platform linux-g++-32.
I am not doing out of source build.Please do an out-of-source build with a fresh source dir.
-
@mravenca My Ubuntu 24.04 with GCC 13:
$ mkdir Qt4.8.4 $ cd Qt4.8.4 $ tar xzf ~/Downloads/qt-everywhere-opensource-src-4.8.4.tar.gz $ mkdir build $ cd build $ ../qt-everywhere-opensource-src-4.8.4/configure ... ... lot of warnings about C++17 support for register storage type etc... ... Qt is now configured for building. Just run 'gmake'. Once everything is built, you must run 'gmake install'. Qt will be installed into /usr/local/Trolltech/Qt-4.8.4 To reconfigure, run 'gmake confclean' and 'configure'.
Attempting the same with your
-platform linux-g++-32
option requires 32-bit library support not present by default in my environment:$ sudo apt install gcc-multilib g++-multilib
but still fails because all the other dependencies need to be present in 32-bit also.
-
Depending on your distribution, did you consider installing Qt 4 if it still ships it ?