Closed pinoverclock closed 1 year ago
From what I can see at https://aur.archlinux.org/packages/mapbox-gl-qml, you don't have latest Mapbox GL QML packaged. I released updated plugin a year ago (2.0.0 at https://github.com/rinigus/mapbox-gl-qml/releases) and Pure Maps is using its updated API. Without it, you cannot really use Pure Maps these days.
To update plugin, AUR has to package Maplibre GL Native. It should be easier than original Mapbox GL Native as config/install scripts have been improved.
So, as far as I can see, it is AUR packaging bug.
Thank you so much for your support. I updated the PKGBUILD at https://aur.archlinux.org/packages/mapbox-gl-qml to point to the source (2.0.0 at https://github.com/rinigus/mapbox-gl-qml/releases) but I get compilation errors...
==> Retrieving sources...
-> Downloading 2.0.0.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 41847 0 41847 0 0 38995 0 --:--:-- 0:00:01 --:--:-- 38995
==> Validating source files with sha256sums...
2.0.0.tar.gz ... Skipped
==> Extracting sources...
-> Extracting 2.0.0.tar.gz with bsdtar
==> Starting build()...
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/distcc/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/distcc/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0")
-- Found QT_INSTALL_QML path: /usr/lib/qt/qml
-- The following REQUIRED packages have been found:
* Qt5Core (required version >= 5.15.8)
* Qt5Qml (required version >= 5.15.8)
* Qt5QmlModels (required version >= 5.15.8)
* Qt5Quick
* Qt5Positioning
* Qt5Sql
* Qt5Widgets (required version >= 5.15.8)
* Qt5Svg
* Qt5 (required version >= 5.6.0)
* Qt5Gui
* Qt5Network
* QMapboxGL
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/makepkg/mapbox-gl-qml/src/build
[ 12%] Automatic MOC and UIC for target qmlmapboxglplugin
[ 12%] Built target qmlmapboxglplugin_autogen
[ 25%] Building CXX object src/CMakeFiles/qmlmapboxglplugin.dir/qquickitemmapboxgl.cpp.o
[ 37%] Building CXX object src/CMakeFiles/qmlmapboxglplugin.dir/qmapboxsync.cpp.o
distcc[46007] (dcc_build_somewhere) Warning: failed to distribute, running locally instead
[ 50%] Building CXX object src/CMakeFiles/qmlmapboxglplugin.dir/qmlmapboxglplugin_autogen/mocs_compilation.cpp.o
[ 62%] Building CXX object src/CMakeFiles/qmlmapboxglplugin.dir/qsgtextureplain.cpp.o
[ 75%] Building CXX object src/CMakeFiles/qmlmapboxglplugin.dir/qsgmapboxglnode.cpp.o
[ 87%] Building CXX object src/CMakeFiles/qmlmapboxglplugin.dir/plugin/mapboxglextensionplugin.cpp.o
In file included from /usr/include/mbgl/util/constants.hpp:4,
from /tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp:47:
/usr/include/mbgl/util/unitbezier.hpp: In member function ‘std::pair<double, double> mbgl::util::UnitBezier::getP1() const’:
/usr/include/mbgl/util/unitbezier.hpp:45:45: note: parameter passing for argument of type ‘std::pair<double, double>’ when C++17 is enabled changed to match C++14 in GCC 10.1
45 | std::pair<double, double> getP1() const {
| ^
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp: In constructor ‘QQuickItemMapboxGL::QQuickItemMapboxGL(QQuickItem*)’:
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp:148:14: error: ‘class QMapboxGLSettings’ has no member named ‘resetToTemplate’
148 | m_settings.resetToTemplate(QMapboxGLSettings::MapboxSettings);
| ^~~~~~~~~~~~~~~
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp:148:49: error: ‘MapboxSettings’ is not a member of ‘QMapboxGLSettings’
148 | m_settings.resetToTemplate(QMapboxGLSettings::MapboxSettings);
| ^~~~~~~~~~~~~~
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp: In member function ‘QVariantList QQuickItemMapboxGL::defaultStyles() const’:
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp:192:28: error: ‘const class QMapboxGLSettings’ has no member named ‘defaultStyles’
192 | auto styles = m_settings.defaultStyles();
| ^~~~~~~~~~~~~
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp: In member function ‘QString QQuickItemMapboxGL::accessToken() const’:
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp:207:21: error: ‘const class QMapboxGLSettings’ has no member named ‘apiKey’
207 | return m_settings.apiKey();
| ^~~~~~
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp: In member function ‘void QQuickItemMapboxGL::setAccessToken(const QString&)’:
/tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp:212:14: error: ‘class QMapboxGLSettings’ has no member named ‘setApiKey’
212 | m_settings.setApiKey(token);
| ^~~~~~~~~
distcc[46007] ERROR: compile /tmp/makepkg/mapbox-gl-qml/src/mapbox-gl-qml-2.0.0/src/qquickitemmapboxgl.cpp on localhost failed
make[2]: *** [src/CMakeFiles/qmlmapboxglplugin.dir/build.make:90: src/CMakeFiles/qmlmapboxglplugin.dir/qquickitemmapboxgl.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:99: src/CMakeFiles/qmlmapboxglplugin.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Any clue?
I would suggest to move to 2.1.1 mapboxgl-qml. In addition, starting from 2.0.0, the backend library is MapLibre GL Native: https://github.com/maplibre/maplibre-gl-native
I would suggest to use https://github.com/maplibre/maplibre-gl-native/releases/tag/qt-v2.0.1
I've tried my best trying to make a working PKGBUILD for https://github.com/maplibre/maplibre-gl-native/releases/tag/qt-v2.0.1, but it's too complicated, submodules needs to be initialized and my PKGBUILD skills are limited
pkgname=maplibre-gl-native
pkgver=2.0.1
pkgrel=1
arch=('x86_64' 'aarch64')
url="https://github.com/maplibre/maplibre-gl-native"
source=("https://github.com/maplibre/maplibre-gl-native/archive/refs/tags/qt-v${pkgver}.tar.gz")
sha512sums=("SKIP")
depends=("glfw")
prepare() {
cd ${pkgname}-qt-v${pkgver}
#git submodule init
#git submodule update
git submodule update --init --recursive
mkdir -p build
}
build() {
cd ${pkgname}-qt-v${pkgver}
#cmake -B build -DCMAKE_INSTALL_PREFIX='/usr' -DMBGL_WITH_QT=ON -DCMAKE_INSTALL_LIBDIR=lib
cmake -B build -DCMAKE_INSTALL_PREFIX='/usr' -DMBGL_WITH_QT=ON -DMBGL_WITH_WERROR=OFF -DCMAKE_INSTALL_LIBDIR=lib
make -C build build/
}
package() {
cd ${pkgname}-qt-v${pkgver}/build
make DESTDIR="$pkgdir/" install
}
It fails trying to initialize the submodules:
==> Making package: maplibre-gl-native 2.0.1-1 (Fri 17 Mar 2023 07:10:56 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found qt-v2.0.1.tar.gz
==> Validating source files with sha512sums...
qt-v2.0.1.tar.gz ... Skipped
==> Extracting sources...
-> Extracting qt-v2.0.1.tar.gz with bsdtar
==> Starting prepare()...
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
==> ERROR: A failure occurred in prepare().
Aborting...
I guess I will have to wait for someone with better skills than me to package it
I suspect so, sorry. Meanwhile, Flatpak version should work. You can probably raise the issue with Arch developers, maybe someone can help. I wonder if Mapbox GL packager could do it, for example. As development moved to Maplibre GL, it makes sense to package it.
It's ok, thank you anyway for your support and pointing me the right direction
Good luck!
Hi @pinoverclock, I changed up your PKGBUILD a little bit. You can submit it to the AUR if you want to, I only changed a few lines.
pkgname=maplibre-gl-native
pkgver=2.0.1
pkgrel=1
arch=('x86_64' 'aarch64')
url="https://github.com/maplibre/maplibre-gl-native"
source=("$pkgname::git+https://github.com/maplibre/maplibre-gl-native.git#tag=qt-v$pkgver")
sha512sums=("SKIP")
provides=("mapbox-gl-native")
conflicts=("mapbox-gl-native")
depends=("glfw")
prepare() {
cd "$srcdir/${pkgname}"
git submodule update --init --recursive
mkdir -p build
}
build() {
cmake -B build -S "$pkgname" -DCMAKE_INSTALL_PREFIX='/usr' -DMBGL_WITH_QT=ON -DMBGL_WITH_WERROR=OFF -DCMAKE_INSTALL_LIBDIR=lib
make -C build
}
package() {
DESTDIR="$pkgdir" cmake --install build
}
To explain why yours didn't work, when you download an automatically generated GitHub archive, it is not actually a git repo, only the files from it. makepkg
has a mechanism for cloning straight from a git repository without relying on these auto-generated archives (see the source
section in my version). Personally I prefer this method since it also makes working with submodules and patches easier.
I get a blank screen after install
Device: Pinephone Distribution: archlinux ui: gnome-phosh package: AUR [https://aur.archlinux.org/packages/pure-maps] pure-maps version: Pure Maps 3.2.0