Compilation of Qt5.3.1 on Ubuntu 20.04
-
Hello,
I'm trying to compile Qt5.3.1 on Ubuntu 20.04.1 (I know that it is a pretty old Qt version but I have to stick with this version).
On Ubuntu 20.04.1, I have this issue coming from the execution of the ./configure script just after qmake is built:
Creating qmake...
make: Nothing to be done for 'first'.
Running configuration tests...
Failed to process makespec for platform 'linux-oe-g++'
Cannot find feature spec_pre.prf
Error processing project file: /dev/nullI have found this https://forum.qt.io/topic/121528/compilation-of-qt5-3-1-on-ubuntu-20-04-1 tried to create a patch myself but I can't make it work.
Please let me know if you need more information on anything else, and I'll be happy to provide.
Thanks for your help.
-
Hi and welcome to devnet,
What is not working with your patch ?
What exactly did you modify ? -
@SGaist Thank you for taking interest!
I'm assuming that the author from the other topic is correct when he claims the problem is with the foreach loop. I therefor created a patch for qmakeevauluator to modified the loop like this:
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -1503,7 +1503,7 @@ void QMakeEvaluator::updateFeaturePaths()
feature_roots.removeDuplicates();
QStringList ret;
-- foreach (const QString &root, feature_roots)
++ for (const QString &root : feature_roots)
if (IoUtils::exists(root))
ret << root;
m_featureRoots = new QMakeFeatureRoots(ret);Now, at first I had made a typo so I got a compile error indicating that the patch was actually applied. However, when checking the file en build/tmp/... the file looked like original. I fixed the typo so now it compiles but the file in build/tmp/... is still the original one and it still cannot find spec_pre.prf.
So, the first thing that confuses me is that the patch appears to be applied but then why does qmakeevauluator look original after.
Second, is this even the right path to solve the actual problem?
-
Did you install after your successful build ?
-
@SGaist No, because qmake was still failing with cannot find spec_pre.prf.
In the meantime I have made a patch to hard-code library paths for my setup into qmakeevaluator.cpp (yes, it's an awful "fix" but I just need this to run on one specific system and I wanted to be able to move on to see how far the rabbit hole goes).
Now bitbake -c configure qtbase-native completes successfully. But just as the author of the other topic, I get downstream failures when trying run the complete build with bitbake qtbase-native. However, it's not yet clear to me if these errors are related to same root-couse (I think not).
-
A Ash V referenced this topic