You are not logged in.
Pages: 1
First, I changed python-sip-pyqt5 to python-pyqt5-sip in the depends array in PKGBUILD. Then I tried to build this using the patch supplied with the package by adding
patch -Np1 < "${srcdir}/qgis-3-fix-sip-name.patch"in the prepare function. It fails when I run makepkg -si. Experimented using other numbers with p as well, it seems 1 is correct here.
Then I tried to build without applying the patch, it still fails. Does anyone know any workaround? Or what am I missing? I need to run QGIS with hardware acceleration. It seems that QGIS in the official repository isn't built with OpenCL flag, therefore I need to install qgis-git from AUR. Or is there any way to have OpenCL flag enabled in the QGIS provided in the official repository?
Sorry in advance if I sound too newb, that's because I am a newbie. ![]()
Please help.
---------------------------
AUR Link: https://aur.archlinux.org/packages/qgis-git
PKGBUILD:
# Maintainer: gaelic <gaelic@luchmhor.net>
# Fincer <fincer@example.com>
# Previous Maintainer: scimmia, XavierCLL, SaultDon, Lantald, Thomas Dziedzic, dibblethewrecker, Gerardo Exequiel Pozzi, Eric Forgeot
pkgname=qgis-git
_pkgname=qgis
pkgver=3.10.0_master.r67865.383024e098
_pkgver=3.10.0_master
pkgrel=1
pkgdesc='Geographic Information System (GIS) that supports vector, raster & database formats - Development master'
url='http://qgis.org/'
license=('GPL')
arch=('i686' 'x86_64')
depends=('qt5-tools' 'qt5-script' 'qtkeychain' 'qca-qt5' 'qt5-webkit' 'qt5-3d' 'qt5-serialport' 'proj' 'geos' 'sqlite' 'python-pyqt5' 'python-gdal' 'python-owslib' 'python-future' 'python-sip' 'python-pyqt5-sip' 'python-psycopg2' 'python-yaml' 'python-numpy' 'python-jinja' 'python-pygments' 'qwtpolar' 'expat' 'python-qscintilla-qt5' 'spatialindex' 'gsl' 'libzip' 'sip' 'exiv2' 'qt5-xmlpatterns' 'ocl-icd')
makedepends=('git' 'cmake' 'txt2tags')
optdepends=('grass: for GRASS providers and plugin (6 or 7)'
# 'gsl: for georeferencer'
'postgresql: for postgis and SPIT support'
'gpsbabel: for gps plugin'
'fcgi: for qgis mapserver'
'ocilib: oracle provider')
#install="$_pkgname.install"
source=("${_pkgname}::git://github.com/qgis/QGIS.git")
md5sums=('SKIP')
#conflicts=('qgis')
pkgver(){
cd "$_pkgname"
printf "%s.r%s" "$_pkgver" "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}
prepare() {
cd $_pkgname
#patch -Np1 < "${srcdir}/qgis-3-fix-sip-name.patch"
# Fix desktop file for /usr/bin/qgis-github
# sed -e 's/\/usr\/bin\/qgis/\/usr\/bin\/qgis-git/g' \
sed -e 's/Exec=qgis/Exec=qgis-git/g' \
-e 's/Icon=qgis/Icon=qgis-git/g' \
-i linux/org.qgis.qgis.desktop.in
#cp linux/org.qgis.qgis.desktop.in linux/org.qgis.qgis-git.desktop
# Remove mime types already defined by freedesktop.org
sed -e '/type="image\/tiff"/,/<\/mime-type>/d' \
-e '/type="image\/jpeg"/,/<\/mime-type>/d' \
-e '/type="image\/jp2"/,/<\/mime-type>/d' \
-e '/type="application\/x-adobe-mif"/,/<\/mime-type>/d' \
-i debian/qgis.xml
[[ -d build ]] || mkdir build
}
build() {
cd $_pkgname/build
cmake -G "Unix Makefiles" ../ \
-DCMAKE_INSTALL_PREFIX=/opt/$pkgname \
-DQGIS_MANUAL_SUBDIR=share/man \
-DENABLE_TESTS=FALSE \
-DWITH_INTERNAL_QWTPOLAR=FALSE \
-DWITH_INTERNAL_{HTTPLIB2,JINJA2,MARKUPSAFE,OWSLIB,PYGMENTS,DATEUTIL,PYTZ,YAML,NOSE2,SIX,FUTURE}=FALSE \
-DWITH_GEOREFERENCER=TRUE \
-DWITH_3D=TRUE
# -DWITH_SERVER=TRUE \
# -DWITH_GLOBE=TRUE
make
}
package() {
cd $_pkgname/build
# Add optional deps based on selected or autodetected options
[[ -n "$(sed -n '/^GRASS_PREFIX:/ s/.*=//p' CMakeCache.txt)" ]] && optdepends+=('grass6: GRASS6 plugin')
[[ -n "$(sed -n '/^GRASS_PREFIX7:/ s/.*=//p' CMakeCache.txt)" ]] && optdepends+=('grass: GRASS7 plugin')
[[ "$(sed -n '/^WITH_SERVER:/ s/.*=//p' CMakeCache.txt)" == "TRUE" ]] && optdepends+=('fcgi: Map Server')
[[ "$(sed -n '/^WITH_GLOBE:/ s/.*=//p' CMakeCache.txt)" == "TRUE" ]] && optdepends+=('osgearth: Globe plugin')
make DESTDIR="$pkgdir" install
cd "$srcdir/$_pkgname"
install -d -m755 $pkgdir/usr/bin
ln -s /opt/$pkgname/bin/qgis "$pkgdir/usr/bin/qgis-git"
# install desktop files and icons
# install -Dm644 linux/org.qgis.qgis-git.desktop -t "$pkgdir/usr/share/applications/"
install -Dm644 build/org.qgis.qgis.desktop "$pkgdir/usr/share/applications/org.qgis.qgis-git.desktop"
for resolution in `ls /usr/share/icons/hicolor/|egrep '[0-9]'`; do
if [ -e debian/icons/qgis-icon{$resolution}.png ]
then
install -Dm644 debian/icons/qgis-icon${resolution}.png "$pkgdir/usr/share/icons/hicolor/${resolution}/apps/$pkgname.png"
fi
done
install -Dm644 images/icons/qgis_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg"
# install mime information and icon
install -Dm644 debian/qgis.xml "$pkgdir/usr/share/mime/packages/qgis-git.xml"
for resolution in `ls /usr/share/icons/hicolor/|egrep '[0-9]'`; do
if [ -e debian/icons/qgis-mime-icon{$resolution}.png ]
then
install -Dm644 debian/icons/qgis-mime-icon${resolution}.png "$pkgdir/usr/share/icons/hicolor/${resolution}/mimetypes/qgis-git-mime.png"
fi
done
install -Dm644 images/icons/qgis_mime_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/mimetypes/qgis-git-mime.svg"
for type in qgs qlr qml qpt; do
for resolution in `ls /usr/share/icons/hicolor/|egrep '[0-9]'`; do
if [ -e debian/icons/qgis-${type}${resolution}.png ]
then
install -Dm644 debian/icons/qgis-${type}${resolution}.png "$pkgdir/usr/share/icons/hicolor/${resolution}/mimetypes/qgis-git-$type.png"
fi
done
done
for type in asc ddf dem dt0 dxf gml img mime mldata qgs qlr qml qpt shp sqlite; do
install -Dm644 images/icons/qgis_${type}_icon.svg "$pkgdir/usr/share/icons/hicolor/scalable/mimetypes/qgis-git-$type.svg"
done
# compile python files, since the cmake option doesn't seem to account for DESTDIR
python -m compileall -q "$pkgdir"
# link libraries
install -d -m755 "${pkgdir}"/etc/ld.so.conf.d/
echo '/opt/qgis-git/lib' > "${pkgdir}"/etc/ld.so.conf.d/qgis-git.conf
}----------------------
Output with patch:
==> Making package: qgis-git 3.10.0_master.r67865.383024e098-1 (Fri 01 Jan 2021 17:49:42 +06)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating qgis git repo...
Fetching origin
==> Validating source files with md5sums...
qgis ... Skipped
==> Extracting sources...
-> Creating working copy of qgis git repo...
Reset branch 'makepkg'
==> Starting prepare()...
patching file python/CMakeLists.txt
Hunk #1 FAILED at 174.
Hunk #2 FAILED at 198.
Hunk #3 FAILED at 227.
Hunk #4 FAILED at 257.
4 out of 4 hunks FAILED -- saving rejects to file python/CMakeLists.txt.rej
patching file python/plugins/processing/gui/NumberInputPanel.py
Hunk #1 FAILED at 27.
1 out of 1 hunk FAILED -- saving rejects to file python/plugins/processing/gui/NumberInputPanel.py.rej
patching file src/python/qgspythonutilsimpl.cpp
Hunk #1 FAILED at 104.
1 out of 1 hunk FAILED -- saving rejects to file src/python/qgspythonutilsimpl.cpp.rej
==> ERROR: A failure occurred in prepare().
Aborting...----------------------
Output without patch:
==> Making package: qgis-git 3.10.0_master.r67865.383024e098-1 (Fri 01 Jan 2021 17:47:31 +06)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating qgis git repo...
Fetching origin
==> Validating source files with md5sums...
qgis ... Skipped
==> Extracting sources...
-> Creating working copy of qgis git repo...
Reset branch 'makepkg'
==> Starting prepare()...
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- QGIS version: 3.17.0 Master (31700)
-- Found OpenCL C++ headers: /media/data-drive/builds/qgis-git/src/qgis/external/opencl-clhpp/include
-- Could not find GRASS 7
-- Found Proj: /usr/lib/libproj.so version 6 (6.3.2)
-- Found GEOS: /usr/lib/libgeos_c.so (3.8.1)
-- Found GDAL: /usr/lib/libgdal.so (3.0.4)
-- Found Expat: /lib/libexpat.so
-- Found Spatialindex: /usr/lib/libspatialindex.so
-- Found Qwt: /usr/lib/libqwt.so (6.1.5)
-- Found libzip: /usr/lib/libzip.so
-- Found Sqlite3: /lib/libsqlite3.so
CMake Error at /usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:582 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.19/Modules/FindProtobuf.cmake:628 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:358 (find_package)
-- Configuring incomplete, errors occurred!
See also "/media/data-drive/builds/qgis-git/src/qgis/build/CMakeFiles/CMakeOutput.log".
See also "/media/data-drive/builds/qgis-git/src/qgis/build/CMakeFiles/CMakeError.log".
==> ERROR: A failure occurred in build().
Aborting...Last edited by darrSonik (2021-01-01 19:30:30)
Offline
Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)Missing depends protobuf see also https://github.com/archlinux/svntogit-c … k/PKGBUILD
Offline
Could NOT find Protobuf (missing: Protobuf_LIBRARIES Protobuf_INCLUDE_DIR)Missing depends protobuf see also https://github.com/archlinux/svntogit-c … k/PKGBUILD
Thanks, I totally missed that!
The AUR build got started without the patch, and it seems the source has some errors (mostly naming errors) such as queue_properties instead of QueueProperties (according to stderr output).
I don't have time to fix the source and compile right now. I installed the LTR version of QGIS from AUR, and it seems to have the flag OpenCL enabled. It meets my requirements for now.
Last edited by darrSonik (2021-01-01 13:56:06)
Offline
Ah, it built for me but that was without OpenCL.
Offline
Pages: 1