From e7190ebe29e9b9cef2aa4fa823dc1053bf21eec1 Mon Sep 17 00:00:00 2001 From: Andrei Radulescu Date: Wed, 17 Jan 2024 09:48:24 +0200 Subject: [PATCH] Fixes for compiling mapbox-gl-native --- userspace/compile-mapbox-gl-native.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/userspace/compile-mapbox-gl-native.sh b/userspace/compile-mapbox-gl-native.sh index 0fee93a..ee8e54d 100755 --- a/userspace/compile-mapbox-gl-native.sh +++ b/userspace/compile-mapbox-gl-native.sh @@ -1,19 +1,21 @@ #!/bin/bash -e -g++ --version -dpkg --list | grep gcc | grep -v lib - apt-get install --no-install-recommends -yq g++-11 -g++-11 --version -dpkg --list | grep g++ | grep -v lib - +# https://github.com/commaai/agnos-builder/pull/188#issuecomment-1893380448 export CXX=g++-11 +# Suppress warnings about deprecated declarations +export CXXFLAGS="-Wno-deprecated-declarations" +# TODO: remove no-deprecated-declarations and +# replace QImage::byteCount() with QImage::sizeInBytes(). This is a direct replacement as suggested by the deprecation message. +# replace QFontMetrics::width(QChar) with QFontMetrics::horizontalAdvance(QChar). This method is the recommended replacement for measuring the width of a character in the new versions of Qt. # Build mapbox-gl-native cd /tmp +# needs an include to compile on gcc 11 git clone --recursive https://github.com/andiradulescu/mapbox-gl-native.git cd mapbox-gl-native +# removed commit pin # git checkout 69f41ffff655ee28834c167ad1353112f370e6e5 mkdir build && cd build cmake -DMBGL_WITH_QT=ON ..