0
votes

I am trying to deploy a Qt5 application with a Marble plugin using dynamic linking. I have put the Qt5 libs, platform plugins and the marble libmarblewidget-qt5.so.22 with my executable application. The application works from an Ubuntu with marble installed on it. Now I am trying to run the application on an Ubuntu without marble installed. I am using the startup script from http://doc.qt.io/qt-5/linux-deployment.html to start my application. I am working on Ubuntu 16.04 32-bits.

When I run the startup script for the application (from terminal) I get this error message:

Map theme file does not exist: ""
Ignoring to load the following file since it doesn't look like a valid Marble plugin: "/boot/initrd.img-4.4.0-21-generic" 
Reason: "'/boot/initrd.img-4.4.0-21-generic' is not an ELF object"
Ignoring to load the following file since it doesn't look like a valid Marble plugin: "/boot/vmlinuz-4.4.0-21-generic" 
Reason: "'/boot/vmlinuz-4.4.0-21-generic' is not an ELF object"
Segmentation fault (core dumped)

Am I missing something, should I have something more than just the libmarblewidget-qt5.so.22?

1

1 Answers

0
votes

Marble needs more than libmarblewidget-qt5.so to run properly. At least you need data for the map theme you want to show, and usually also some plugins. Have a look at the installation folder (CMAKE_INSTALL_PREFIX) after compiling Marble. You'll find plugins in e.g. lib64/marble/ and data in share/marble/data.

The paths to plugins and data is compiled into libmarblewidget-qt5.so, but can be changed at runtime. To do so, use MarbleDirs::setMarbleDataPath() and MarbleDirs::setMarblePluginPath().

In short, you have to

  • ship all or some plugins to a folder of your choice
  • Call MarbleDirs::setMarblePluginPath("/your/plugins/install/folder");
  • ship all or some data to another folder of your choice
  • Call MarbleDirs::setMarbleDataPath("/your/data/install/folder");

The output you get (and likely also the segfault) happens because the compiled in plugin path does not exist on the target system, therefore Marble's plugin manager searches in / and tries to load the files it finds there.