This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Problem compiling Marble (Qt 5.4.1)

Tags: None
(comma "," separated)
rainbowgoblin
Registered Member
Posts
21
Karma
0

Problem compiling Marble (Qt 5.4.1)

Wed Mar 18, 2015 10:52 pm
I'm trying to compile Marble on a Mac, just pulled the sources down from git, with Qt 5.4.1.

The error I get is:

Code: Select all
/marble/download/path/marble/sources/src/lib/marble/AbstractDataPlugin.cpp:36:12: fatal error: 'QQmlComponent' file not found
  #include <QQmlComponent>
           ^
1 error generated.


I've looked for this file, it's definitely present in /usr/local/Qt-5.4.1/lib/QtQml.framework/Versions/5/Headers

There was no warning from cmake about this. There was a message that said "Found unsuitable Qt version "5.4.1" from /usr/local/Qt-5.4.1/bin/qmake", but it didn't look like a warning, and lots of other Marble source files compiled fine up to the point where it failed.

If I run `make VERBOSE=1` I can see that the QtQml framework header directory above is not included in the compiler command. If I run the compiler command, explicitly including both the QtQml and QtQuick framework header directories I can continue with just running make, until linking when I run into similar errors about QtQuick, QtQml, and QtPrintSupport. I can resolve the linking errors by editing one of the link.txt files (/marble/download/path/marble/build/src/lib/marble/CMakeFiles/marblewidget.dir/link.txt). But then there are other compiler errors about the same frameworks, and I'm not sure when it will end.

I believe this is a CMake issue, not a Marble issue, but I'm not sure how to resolve it. I had CMake 3.1.1 installed, and I've just upgraded to the latest CMake (3.2.1) but I'm still running into the same problem. Could someone confirm for me whether what I'm observing is something I need to report to CMake? Is there a simple way to work around this? I'm not very comfortable with CMake, but I'm pretty good at bash scripting, so I could always do an ugly hack of the necessary CMake-generated files (e.g. depend.make) that tell me not to edit them!
rainbowgoblin
Registered Member
Posts
21
Karma
0
I've solved my problem. There were a couple lines missing in CMakeLists.txt checked out from git (the main CMakeLists.txt, in the top level source directory). In the section with all the find_package commands, Qt5Quick and Qt5Qml were missing. I've added these lines:

Code: Select all
  find_package(Qt5Quick REQUIRED)
  find_package(Qt5Qml REQUIRED)


The whole thing now compiles with no problems.
dieudo
Registered Member
Posts
1
Karma
0
rainbowgoblin wrote:I've solved my problem.

The whole thing now compiles with no problems.


I've tried to do the same but with no success :(

Maybe it's because of the particular configuration I've been using :
- Mac OS 10.10.2
- MacPorts 2.3.3
- the procedure given here : https://marble.kde.org/sources.php

Would you give us more details on how you come to succeed in compiling the sources on OS X ?

Thank you :)
User avatar
tackat
KDE Developer
Posts
131
Karma
0
OS
Could someone submit a tested patch for this to https://git.reviewboard.kde.org/dashboard/ ? :-)
That would be awesome!


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]