maplibre / maplibre-native-qt

MapLibre Native Qt Bindings and Qt Location Plugin
https://maplibre.org/maplibre-native-qt/docs/
38 stars 14 forks source link

Can not run quick example on the last master on the Ubuntu linux 22.04 Qt 6.6.1. #101

Closed fro0m closed 8 months ago

fro0m commented 8 months ago

image

ntadej commented 8 months ago

I'm working on the documentation now, but did you export LD_LIBRARY_PATH, QT_PLUGIN_PATH and QML_IMPORT_PATH according to your install location?

fro0m commented 8 months ago

I set build and run env image It gives me now

qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/install/plugins/platforms" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms" ...
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qlinuxfb.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqxcb.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archlevel": 1,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qminimalegl.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqoffscreen.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archlevel": 1,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qwayland-generic.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqminimal.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archlevel": 1,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqlinuxfb.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archlevel": 1,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqvnc.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archlevel": 1,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqminimalegl.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archlevel": 1,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqwayland-egl.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqvkkhrdisplay.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqvkkhrdisplay.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vkkhrdisplay"
        ]
    },
    "archlevel": 1,
    "className": "QVkKhrDisplayIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qxcb.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qoffscreen.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qvnc.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqeglfs.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archlevel": 1,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qminimal.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qvkkhrdisplay.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qeglfs.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/qwayland-egl.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqwayland-generic.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/examples/build-quick-Desktop_Qt_6_6_1_GCC_64bit-Debug/platforms" ...
qt.core.library: "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforms/libqxcb.so" loaded library
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/install/plugins/platformthemes" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platformthemes" ...
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platformthemes/libqxdgdesktopportal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "xdgdesktopportal",
            "flatpak",
            "snap"
        ]
    },
    "archlevel": 1,
    "className": "QXdgDesktopPortalThemePlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xdgdesktopportal", "flatpak", "snap")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platformthemes/qgtk3.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platformthemes/libqgtk3.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platformthemes/libqgtk3.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformThemeFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "gtk3"
        ]
    },
    "archlevel": 1,
    "className": "QGtk3ThemePlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("gtk3")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platformthemes/qxdgdesktopportal.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/examples/build-quick-Desktop_Qt_6_6_1_GCC_64bit-Debug/platformthemes" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/install/plugins/platforminputcontexts" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts" ...
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/libqtvirtualkeyboardplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "qtvirtualkeyboard"
        ]
    },
    "archlevel": 1,
    "className": "QVirtualKeyboardPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("qtvirtualkeyboard")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/ibusplatforminputcontextplugin.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/composeplatforminputcontextplugin.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "ibus"
        ]
    },
    "archlevel": 1,
    "className": "QIbusPlatformInputContextPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("ibus")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QPlatformInputContextFactoryInterface.5.1",
    "MetaData": {
        "Keys": [
            "compose",
            "xim"
        ]
    },
    "archlevel": 1,
    "className": "QComposePlatformInputContextPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("compose", "xim")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/qtvirtualkeyboardplugin.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/examples/build-quick-Desktop_Qt_6_6_1_GCC_64bit-Debug/platforminputcontexts" ...
qt.core.library: "/home/dev/dev/tools/6.6.1/gcc_64/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so" loaded library
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/install/plugins/iconengines" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/tools/6.6.1/gcc_64/plugins/iconengines" ...
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/iconengines/libqsvgicon.so"
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/plugins/iconengines/libqsvgicon.so, metadata=
{
    "IID": "org.qt-project.Qt.QIconEngineFactoryInterface",
    "MetaData": {
        "Keys": [
            "svg",
            "svgz",
            "svg.gz"
        ]
    },
    "archlevel": 1,
    "className": "QSvgIconPlugin",
    "debug": false,
    "version": 394752
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("svg", "svgz", "svg.gz")
qt.core.plugin.factoryloader: looking at "/home/dev/dev/tools/6.6.1/gcc_64/plugins/iconengines/qsvgicon.debug"
qt.core.plugin.factoryloader: "The shared library was not found." 
         not a plugin
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/examples/build-quick-Desktop_Qt_6_6_1_GCC_64bit-Debug/iconengines" ...
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/qml/QtQml/WorkerScript/libworkerscriptplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface",
    "archlevel": 1,
    "className": "QtQmlWorkerScriptPlugin",
    "debug": false,
    "uri": [
        "QtQml.WorkerScript"
    ],
    "version": 394752
}

qt.core.library: "/home/dev/dev/tools/6.6.1/gcc_64/qml/QtQml/WorkerScript/libworkerscriptplugin.so" loaded library
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/qml/QtQuick/Window/libquickwindowplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface",
    "archlevel": 1,
    "className": "QtQuick_WindowPlugin",
    "debug": false,
    "uri": [
        "QtQuick.Window"
    ],
    "version": 394752
}

qt.core.library: "/home/dev/dev/tools/6.6.1/gcc_64/qml/QtQuick/Window/libquickwindowplugin.so" loaded library
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/qml/QtLocation/libdeclarative_locationplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface",
    "archlevel": 1,
    "className": "QtLocationDeclarativeModule",
    "debug": false,
    "uri": [
        "QtLocation"
    ],
    "version": 394752
}

qt.core.library: "/home/dev/dev/tools/6.6.1/gcc_64/qml/QtLocation/libdeclarative_locationplugin.so" loaded library
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/tools/6.6.1/gcc_64/qml/QtPositioning/libpositioningquickplugin.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlExtensionInterface/1.0",
    "archlevel": 1,
    "className": "QtPositioningDeclarativeModule",
    "debug": false,
    "uri": [
        "QtPositioning"
    ],
    "version": 394752
}

qt.core.library: "/home/dev/dev/tools/6.6.1/gcc_64/qml/QtPositioning/libpositioningquickplugin.so" loaded library
qt.core.plugin.loader: Found metadata in lib /home/dev/dev/prj/maplibre-native-qt/install/qml/QtLocation/MapLibre/libdeclarative_locationplugin_maplibre.so, metadata=
{
    "IID": "org.qt-project.Qt.QQmlEngineExtensionInterface",
    "archlevel": 1,
    "className": "QtLocationMapLibreQmlModule",
    "debug": false,
    "uri": [
        "QtLocation.MapLibre"
    ],
    "version": 394752
}

qt.core.library: "/home/dev/dev/prj/maplibre-native-qt/install/qml/QtLocation/MapLibre/libdeclarative_locationplugin_maplibre.so" cannot load: Cannot load library /home/dev/dev/prj/maplibre-native-qt/install/qml/QtLocation/MapLibre/libdeclarative_locationplugin_maplibre.so: (libQt6Sql.so.6: cannot open shared object file: No such file or directory)
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/home/dev/dev/prj/maplibre-native-qt/install/qml/QtLocation/MapLibre/libdeclarative_locationplugin_maplibre.so" : "Cannot load library /home/dev/dev/prj/maplibre-native-qt/install/qml/QtLocation/MapLibre/libdeclarative_locationplugin_maplibre.so: (libQt6Sql.so.6: cannot open shared object file: No such file or directory)"
QQmlApplicationEngine failed to load component
qrc:/Example/main.qml:10:1: Cannot load library /home/dev/dev/prj/maplibre-native-qt/install/qml/QtLocation/MapLibre/libdeclarative_locationplugin_maplibre.so: (libQt6Sql.so.6: cannot open shared object file: No such file or directory)
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/install/plugins/accessiblebridge" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/tools/6.6.1/gcc_64/plugins/accessiblebridge" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/examples/build-quick-Desktop_Qt_6_6_1_GCC_64bit-Debug/accessiblebridge" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/install/plugins/accessible" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/tools/6.6.1/gcc_64/plugins/accessible" ...
qt.core.plugin.factoryloader: checking directory path "/home/dev/dev/prj/maplibre-native-qt/examples/build-quick-Desktop_Qt_6_6_1_GCC_64bit-Debug/accessible" ...

however the file exist :thinking: image

ntadej commented 8 months ago

Yes, libQt6Sql.so is not found, which is weird as AFAIK it's part of the default installation of Qt.

fro0m commented 8 months ago

so, I added dir to QT libs to LD_LIBRARY_PATH and it launches. I think Qt libs should be visible for linking implicitly.

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/dev/dev/prj/maplibre-native-qt/install/lib/::/home/dev/dev/prj/maplibre-native-qt/install/plugin:/home/dev/dev/tools/6.6.1/gcc_64/lib/
QML_IMPORT_PATH=/home/dev/dev/prj/maplibre-native-qt/install/qml
QT_DEBUG_PLUGINS=1
QT_PLUGIN_PATH=/home/dev/dev/prj/maplibre-native-qt/install/plugins/

image

ntadej commented 8 months ago

Yes, if you use standalone Qt installation you need to have the libraries in your LD_LIBRARY_PATH.