New comment by ar-jan on void-packages repository https://github.com/void-linux/void-packages/pull/31687#issuecomment-1295948805 Comment: I've updated the libgdal template like so (not pushing to avoid needless 4 hour CI build):
Updated libgdal-3.4.3 template ``` # Template file for 'libgdal' pkgname=libgdal version=3.4.3 revision=1 wrksrc="gdal-${version}" build_style=gnu-configure build_helper="python3 numpy" configure_args="--with-expat=yes --with-hdf5=yes --with-kml=no --with-liblzma=yes --with-opencl=yes --with-pg=yes --with-podofo=yes --with-python=yes --with-spatialite=yes --with-sqlite3=yes --with-webp=yes --with-zstd=yes" hostmakedepends="gettext-devel json-c-devel pkg-config python3-numpy swig" makedepends="boost-devel expat-devel freexl-devel geos-devel jasper-devel json-c-devel libcurl-devel libopenexr-devel libopenjpeg2-devel libpodofo-devel libqhull-devel libwebp-devel libxml2-devel libzstd-devel netcdf-devel ocl-icd-devel opencl2-headers pcre2-devel proj-devel python3-devel sqlite-devel postgresql-libs-devel" short_desc="Geospatial Data Abstraction Library" maintainer="Orphaned " license="MIT" homepage="https://gdal.org/" distfiles="https://github.com/OSGeo/gdal/releases/download/v${version}/gdal-${version}.tar.gz" checksum=7244962628c82921b4a4903dbb721c7222b7d82ed5928fef55a52f87f68ad1fe subpackages="python3-gdal libgdal-devel libgdal-tools" if [ -z "$CROSS_BUILD" ]; then makedepends+=" hdf5-devel" fi post_install() { vinstall gdal.pc 644 usr/lib/pkgconfig vlicense LICENSE.TXT } libgdal-tools_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - tools" pkg_install() { vmove usr/bin } } libgdal-devel_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - development files" pkg_install() { vmove usr/bin/gdal-config vmove usr/include vmove usr/lib/pkgconfig vmove usr/lib/*.a vmove usr/lib/*.so } } python3-gdal_package() { depends="${sourcepkg}>=${version}_${revision}" short_desc+=" - Python3 bindings" pkg_install() { vmove "usr/bin/*.py" vmove "usr/lib/python*" vdoc swig/python/README.rst vmkdir usr/share/python3-gdal } } ```
But it looks like starting with `swig/python/setup.py` the crossbase is no longer used correctly: > make[1]: Entering directory '/builddir/gdal-3.4.3/swig' > for dir in python ; do (cd $dir; make build) || exit; done > make[2]: Entering directory '/builddir/gdal-3.4.3/swig/python' > ... > python setup.py build > WARNING: "CXX=/bin/sh /builddir/gdal-3.4.3/libtool --mode=compile --silent --tag=CXX armv7l-linux-gnueabihf-c++" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of distutils > WARNING: "CC=/bin/sh /builddir/gdal-3.4.3/libtool --mode=compile --silent --tag=CC armv7l-linux-gnueabihf-gcc -pthread -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -I/usr/armv7l-linux-gnueabihf/usr/include/python3.10 -I/usr/armv7l-linux-gnueabihf/usr/include -L/usr/armv7l-linux-gnueabihf/usr/lib/python3.10 -L/usr/armv7l-linux-gnueabihf/usr/lib" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of distutils > running build > running build_py > creating build > creating build/lib.linux-x86_64-cpython-310 > ... > creating build/temp.linux-x86_64-cpython-310/extensions > ... > gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -g -I/usr/armv7l-linux-gnueabihf/usr/include -fdebug-prefix-map=/builddir/Python-3.10.8=. -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -g -I/usr/armv7l-linux-gnueabihf/usr/include -fdebug-prefix-map=/builddir/Python-3.10.8=. -fstack-clash-protection -D_FORTIFY_SOURCE=2 -O2 -pipe -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard -I/usr/armv7l-linux-gnueabihf/usr/include/python3.10 -I/usr/armv7l-linux-gnueabihf/usr/include -I/usr/armv7l-linux-gnueabihf/usr/lib/python3.10/site-packages/numpy/core/include -I/usr/armv7l-linux-gnueabihf/usr/include -fdebug-prefix-map=/builddir/gdal-3.4.3=. -Wall -Wextra -Winit-self -Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat -Werror=format-security -Wno-format-nonliteral -Wlogical-op -Wshadow -Wmissing-include-dirs -Werror=vla -Wdate-time -Wnull-dereference -Wduplicated-cond -Wfloat-conversion -DGNM_ENABLED -iquote /builddir/gdal-3.4.3/port -I/usr/armv7l-linux-gnueabihf/usr/include/openjpeg-2.5 -DGDAL_COMPILATION -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I../../ogr/ogrsf_frmts -I../../gnm -I../../apps -I/usr/include/python3.10 -I/usr/lib/python3.10/site-packages/numpy/core/include -I/builddir/gdal-3.4.3/include -c extensions/ogr_wrap.cpp -o build/temp.linux-x86_64-cpython-310/extensions/ogr_wrap.o -I/builddir/gdal-3.4.3/port -I/builddir/gdal-3.4.3/gcore -I/builddir/gdal-3.4.3/alg -I/builddir/gdal-3.4.3/gnm -I/builddir/gdal-3.4.3/ogr -I/builddir/gdal-3.4.3/ogr/ogrsf_frmts -I/builddir/gdal-3.4.3/frmts/vrt -I/builddir/gdal-3.4.3/apps > gcc: error: unrecognized command-line option '-mfpu=vfpv3' > gcc: error: unrecognized command-line option '-mfloat-abi=hard' I think this is because `CC` and `CXX` are unset? https://github.com/OSGeo/gdal/blob/v3.4.3/gdal/swig/python/setup.py#L22-L42. Is that right? How to fix?