Build Marble with Qt
-
Hi!
I builded Qt5 stable from git and tryed to build Marble http://marble.kde.org/sources.php with Qt5 (It is supported in master branch), but it's build system do not see my Qt5 and see Qt4.
What should I do to build Marble? Help me please.
Sorry for my awkward English.
An output after " cmake -DCMAKE_BUILD_TYPE=Debug -DQTONLY=TRUE -DCMAKE_INSTALL_PREFIX=/usr ~/marble/sources":
@
-- Could NOT find Phonon (missing: PHONON_INCLUDE_DIR PHONON_LIBRARY)
-- Could NOT find Phonon (missing: PHONON_INCLUDE_DIR PHONON_LIBRARY)
-- Could NOT find QextSerialPort (missing: QEXTSERIALPORT_INCLUDE_DIR QEXTSERIALPORT_LIBRARIES)
-- Could NOT find quazip (missing: QUAZIP_INCLUDE_DIR QUAZIP_LIBRARIES)
-- Could NOT find libshp (missing: LIBSHP_INCLUDE_DIR LIBSHP_LIBRARIES)
-- Could NOT find libgps (missing: LIBGPS_INCLUDE_DIR LIBGPS_LIBRARIES)
-- checking for module 'liblocation>=0.102'
-- package 'liblocation>=0.102' not found
-- checking for module 'QtLocation>=1.0.1'
-- package 'QtLocation>=1.0.1' not found
-- Could NOT find QtMobility (missing: QTMOBILITY_INCLUDE_DIR)
-- Could NOT find QtLocation (missing: QTLOCATION_INCLUDE_DIR QTLOCATION_LIBRARIES)
-- Could NOT find libwlocate (missing: LIBWLOCATE_INCLUDE_DIR LIBWLOCATE_LIBRARIES)-- The following features have been enabled:
- Unit tests , Build unit tests. Toggle with BUILD_MARBLE_TESTS=YES/NO. 'make test' will run all.
- Qt Designer plugins , Marble widget support in Qt Designer. Toggle with WITH_DESIGNER_PLUGIN=YES/NO
- Marble Desktop/Mobile applications , Build Marble Desktop/Mobile applications. Toggle with BUILD_MARBLE_APPS=YES/NO.
-- The following REQUIRED packages have been found:
- Qt4 , cross-platform application framework , http://qt.digia.com/
core framework
-- The following features have been disabled:
- Marble tools , Build various Marble tools for e.g. file format conversion. Toggle with BUILD_MARBLE_TOOLS=YES/NO.
- Marble library C++ examples , Build C++ examples showing how to use the Marble library. Toggle with BUILD_MARBLE_EXAMPLES=YES/NO.
-- The following OPTIONAL packages have not been found:
- Phonon , cross-platform multimedia framework that enables the use of audio and video content , http://qt.digia.com/
Support for playback of soundcue elements
Voice navigation (sound or human speakers) - QextSerialPort , access to serial ports , http://code.google.com/p/qextserialport/
Reading from serial port in APRS plugin - quazip , reading and writing of ZIP archives , http://quazip.sourceforge.net/
reading and displaying .kmz files - libshp , reading and writing of ESRI Shapefiles (.shp) , http://shapelib.maptools.org/
reading and displaying .shp files - libgps , communicating with the GPS daemon , http://catb.org/gpsd/
position information via gpsd - liblocation , position information on Maemo 5 devices , http://maemo.org/
position information via GPS/WLAN for the Nokia N900 smartphone - QtMobility , a collection of APIs and frameworks , http://qt.digia.com/
Required for QtLocation to work - QtLocation , geographical support for position and map use , http://qt.digia.com/
position information via QtMobility QtLocation - libwlocate , WLAN-based geolocation , http://www.openwlanmap.org/
Position information based on neighboring WLAN networks
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/marble/build@
-
I added Qt to PATH
@
-- Found unsuitable Qt version "5.3.0" from /home/user/qt5/qtbase/bin/qmake
-- Please include /usr/lib/marble/plugins in the QML_IMPORT_PATH environment variable to use Marble's Qt declarative plugins.
-- Note: Marble Desktop does not make use of declarative plugins. Ignore the message above if you only intend to use the Desktop version.
-- Could NOT find Phonon (missing: PHONON_INCLUDE_DIR PHONON_LIBRARY)
-- Could NOT find Phonon (missing: PHONON_INCLUDE_DIR PHONON_LIBRARY)
-- Could NOT find QextSerialPort (missing: QEXTSERIALPORT_INCLUDE_DIR QEXTSERIALPORT_LIBRARIES)
-- Could NOT find quazip (missing: QUAZIP_INCLUDE_DIR QUAZIP_LIBRARIES)
-- Could NOT find libshp (missing: LIBSHP_INCLUDE_DIR LIBSHP_LIBRARIES)
-- Could NOT find libgps (missing: LIBGPS_INCLUDE_DIR LIBGPS_LIBRARIES)
-- checking for module 'liblocation>=0.102'
-- package 'liblocation>=0.102' not found
-- Could NOT find libwlocate (missing: LIBWLOCATE_INCLUDE_DIR LIBWLOCATE_LIBRARIES)-- The following features have been enabled:
- Unit tests , Build unit tests. Toggle with BUILD_MARBLE_TESTS=YES/NO. 'make test' will run all.
- Qt Designer plugins , Marble widget support in Qt Designer. Toggle with WITH_DESIGNER_PLUGIN=YES/NO
- Marble Desktop/Mobile applications , Build Marble Desktop/Mobile applications. Toggle with BUILD_MARBLE_APPS=YES/NO.
-- The following REQUIRED packages have been found:
- Qt5Core
- Qt5Xml
- Qt5Network
- Qt5Test
- Qt5Script
- Qt5Gui (required version >= 5.3.0)
- Qt5Widgets
- Qt5Qml (required version >= 5.3.0)
- Qt5Quick (required version >= 5.3.0)
- Qt5OpenGL (required version >= 5.3.0)
- Qt5WebKit (required version >= 5.3.0)
- Qt5Positioning (required version >= 5.3.0)
- Qt5Sensors (required version >= 5.3.0)
- Qt5WebKitWidgets
- Qt5Svg
- Qt5Sql
- Qt5Concurrent
- Qt5PrintSupport
- Qt5Designer
-- The following features have been disabled:
- Marble tools , Build various Marble tools for e.g. file format conversion. Toggle with BUILD_MARBLE_TOOLS=YES/NO.
- Marble library C++ examples , Build C++ examples showing how to use the Marble library. Toggle with BUILD_MARBLE_EXAMPLES=YES/NO.
-- The following OPTIONAL packages have not been found:
- Qt4
- Phonon , cross-platform multimedia framework that enables the use of audio and video content , http://qt.digia.com/
Support for playback of soundcue elements
Voice navigation (sound or human speakers) - QextSerialPort , access to serial ports , http://code.google.com/p/qextserialport/
Reading from serial port in APRS plugin - quazip , reading and writing of ZIP archives , http://quazip.sourceforge.net/
reading and displaying .kmz files - libshp , reading and writing of ESRI Shapefiles (.shp) , http://shapelib.maptools.org/
reading and displaying .shp files - libgps , communicating with the GPS daemon , http://catb.org/gpsd/
position information via gpsd - liblocation , position information on Maemo 5 devices , http://maemo.org/
position information via GPS/WLAN for the Nokia N900 smartphone - libwlocate , WLAN-based geolocation , http://www.openwlanmap.org/
Position information based on neighboring WLAN networks
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/marble/build
@ -
I created project with Qt5.3.0 and it built.
@
I tryed to run application and gotStarting /home/user/build-untitledM1-Desktop-Debug/untitledM1... QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open QIODevice::write: device not open The program has unexpectedly finished.
@
-
main.cpp
@
Code: Select all
#include "mainwindow.h"
#include <QApplication>
#include <marble/MarbleWidget.h>int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; Marble::MarbleWidget m; m.setProjection(Marble::Mercator); m.setMapThemeId("earth/openstreetmap/openstreetmap.dgml"); m.setWindowTitle("Hello Marble!"); m.show(); w.show(); return a.exec(); }
@
@
Code: Select all
#-------------------------------------------------
#
# Project created by QtCreator 2014-04-10T18:18:47
#
#-------------------------------------------------QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = untitledM1 TEMPLATE = app SOURCES += main.cpp\ mainwindow.cpp HEADERS += mainwindow.h unix:!macx: LIBS += -L/usr/local/lib -lmarblewidget
@
-
As you can see follow, all binaryes use Qt5 libraries. But, when I run it with gdb, something call /usr/lib/x86_64-linux-gnu/libQtGui.so.4
ldd /home/user/build-untitledM1-Desktop-Debug/untitledM1 | grep marble
@
libmarblewidget.so.18 => /usr/local/lib/libmarblewidget.so.18 (0x00007ff07d6eb000)
@readelf -d /usr/local/lib/libmarblewidget.so
@
Dynamic section at offset 0x6ee610 contains 45 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libastro.so.1]
0x0000000000000001 (NEEDED) Shared library: [libQt5Core.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Xml.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Widgets.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5WebKitWidgets.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Svg.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Script.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Quick.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Qml.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5OpenGL.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5PrintSupport.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5WebKit.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Network.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Positioning.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Sensors.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Gui.so.5]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libmarblewidget.so.18]
0x000000000000000c (INIT) 0x1901a8
0x000000000000000d (FINI) 0x558a58
0x0000000000000019 (INIT_ARRAY) 0x8d2b78
0x000000000000001b (INIT_ARRAYSZ) 3568 (bytes)
0x000000000000001a (FINI_ARRAY) 0x8d3968
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x0000000000000004 (HASH) 0x1b8
0x000000006ffffef5 (GNU_HASH) 0x15bf0
0x0000000000000005 (STRTAB) 0x7d490
0x0000000000000006 (SYMTAB) 0x2b908
0x000000000000000a (STRSZ) 634297 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x8f1e08
0x0000000000000002 (PLTRELSZ) 152784 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x16acd8
0x0000000000000007 (RELA) 0x11efd0
0x0000000000000008 (RELASZ) 310536 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x11ef40
0x000000006fffffff (VERNEEDNUM) 4
0x000000006ffffff0 (VERSYM) 0x11824a
0x000000006ffffff9 (RELACOUNT) 1223
0x0000000000000000 (NULL) 0x0
@readelf -d /home/user/build-untitledM1-Desktop-Debug/untitledM1
@
Dynamic section at offset 0x5288 contains 44 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libmarblewidget.so.18]
0x0000000000000001 (NEEDED) Shared library: [libQt5WebKitWidgets.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Quick.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5OpenGL.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5PrintSupport.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Qml.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5WebKit.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Widgets.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Positioning.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Sensors.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Network.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Gui.so.5]
0x0000000000000001 (NEEDED) Shared library: [libQt5Core.so.5]
0x0000000000000001 (NEEDED) Shared library: [libGL.so.1]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000f (RPATH) Library rpath: [/home/user/qt5/qtbase/lib]
0x000000000000000c (INIT) 0x402b90
0x000000000000000d (FINI) 0x40440c
0x0000000000000019 (INIT_ARRAY) 0x605000
0x000000000000001b (INIT_ARRAYSZ) 16 (bytes)
0x000000000000001a (FINI_ARRAY) 0x605010
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x0000000000000004 (HASH) 0x400260
0x000000006ffffef5 (GNU_HASH) 0x4005a0
0x0000000000000005 (STRTAB) 0x401230
0x0000000000000006 (SYMTAB) 0x400810
0x000000000000000a (STRSZ) 3929 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x6055b0
0x0000000000000002 (PLTRELSZ) 2088 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x402368
0x0000000000000007 (RELA) 0x4022d8
0x0000000000000008 (RELASZ) 144 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x402268
0x000000006fffffff (VERNEEDNUM) 3
0x000000006ffffff0 (VERSYM) 0x40218a
0x0000000000000000 (NULL) 0x0
@ -
gdb output
@
Starting program: /home/user/build-untitledM1-Desktop-Debug/untitledM1
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe590c700 (LWP 3996)]
Qt: gdb: -nograb added to command-line options.
Use the -dograb option to enforce grabbing.
[New Thread 0x7fffe4cae700 (LWP 3997)]
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not openProgram received signal SIGSEGV, Segmentation fault. 0x00007fffde9612bc in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
@
-
backtrace
@
#0 0x00007fffde9612bc in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#1 0x00007ffff7deaf80 in ?? () from /lib64/ld-linux-x86-64.so.2
#2 0x00007ffff7deb077 in ?? () from /lib64/ld-linux-x86-64.so.2
#3 0x00007ffff7def363 in ?? () from /lib64/ld-linux-x86-64.so.2
#4 0x00007ffff7deabd6 in ?? () from /lib64/ld-linux-x86-64.so.2
#5 0x00007ffff7deeb4a in ?? () from /lib64/ld-linux-x86-64.so.2
#6 0x00007fffe9d30f66 in ?? () from /lib/x86_64-linux-gnu/libdl.so.2
#7 0x00007ffff7deabd6 in ?? () from /lib64/ld-linux-x86-64.so.2
#8 0x00007fffe9d312ec in ?? () from /lib/x86_64-linux-gnu/libdl.so.2
#9 0x00007fffe9d30ee1 in dlopen () from /lib/x86_64-linux-gnu/libdl.so.2
#10 0x00007fffefe12af2 in QLibraryPrivate::load_sys (this=0x6c5200)
at plugin/qlibrary_unix.cpp:230
#11 0x00007fffefe0dabb in QLibraryPrivate::load (this=0x6c5200)
at plugin/qlibrary.cpp:514
#12 0x00007fffefe0dd9a in QLibraryPrivate::loadPlugin (this=0x6c5200)
at plugin/qlibrary.cpp:562
#13 0x00007fffefe02fb1 in QPluginLoader::load (this=0x6c3770)
at plugin/qpluginloader.cpp:240
#14 0x00007fffefe02e19 in QPluginLoader::instance (this=0x6c3770)
at plugin/qpluginloader.cpp:197
#15 0x00007ffff788522a in Marble::PluginManagerPrivate::loadPlugins (
this=0x68bd80)
at /home/user/marble/sources/src/lib/marble/PluginManager.cpp:210
---Type <return> to continue, or q <return> to quit---
#16 0x00007ffff7886945 in Marble::PluginManager::renderPlugins (this=0x693f08)
at /home/user/marble/sources/src/lib/marble/PluginManager.cpp:73
#17 0x00007ffff7881b36 in Marble::LayerManager::Private::addPlugins (
this=this@entry=0x6ba5f0)
at /home/user/marble/sources/src/lib/marble/LayerManager.cpp:201
#18 0x00007ffff78824ab in Marble::LayerManager::LayerManager (this=0x6ba470,
model=0x68de18, parent=<optimized out>)
at /home/user/marble/sources/src/lib/marble/LayerManager.cpp:88
#19 0x00007ffff77fb909 in Marble::MarbleMapPrivate::MarbleMapPrivate (
this=0x6ba440, parent=0x68de30, model=0x68de18)
at /home/user/marble/sources/src/lib/marble/MarbleMap.cpp:161
#20 0x00007ffff77fc1c9 in Marble::MarbleMap::MarbleMap (this=0x68de30,
model=0x68de18)
at /home/user/marble/sources/src/lib/marble/MarbleMap.cpp:243
#21 0x00007ffff77efb1d in MarbleWidgetPrivate (parent=0x7fffffffe200,
this=0x68de10)
at /home/user/marble/sources/src/lib/marble/MarbleWidget.cpp:105
#22 Marble::MarbleWidget::MarbleWidget (this=0x7fffffffe200,
parent=<optimized out>)
at /home/user/marble/sources/src/lib/marble/MarbleWidget.cpp:170
#23 0x000000000040334b in main (argc=1, argv=0x7fffffffe3a8)
at ../untitledM1/main.cpp:18
@