New comment by ericonr on void-packages repository https://github.com/void-linux/void-packages/pull/26962#issuecomment-761908822 Comment: I've tried working around this by adding this patch to shiboken: ``` diff --git ApiExtractor/clangparser/compilersupport.cpp ApiExtractor/clangparser/compilersupport.cpp index dac5110..72d6ce2 100644 --- sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp +++ sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp @@ -305,6 +305,12 @@ static QString compilerFromCMake(const QString &defaultCompiler) QByteArrayList emulatedCompilerOptions() { QByteArrayList result; + + QByteArray clang_target_triplet = qgetenv("CLANG_TARGET_TRIPLET"); + if (!clang_target_triplet.isEmpty()) result.append(clang_target_triplet); + QByteArray clang_target_sysroot = qgetenv("CLANG_TARGET_SYSROOT"); + if (!clang_target_sysroot.isEmpty()) result.append(clang_target_sysroot); + #if defined(Q_CC_MSVC) HeaderPaths headerPaths; result.append(QByteArrayLiteral("-fms-compatibility-version=19")); ``` and this to the pyside template: ``` diff --git a/srcpkgs/python3-pyside2/template b/srcpkgs/python3-pyside2/template index c7ea90d0a7..d6de74c181 100644 --- a/srcpkgs/python3-pyside2/template +++ b/srcpkgs/python3-pyside2/template @@ -34,21 +34,10 @@ subpackages="libpyside2-python3-devel libpyside2-python3" # needed by shiboken2 runtime export CLANG_INSTALL_DIR=${XBPS_CROSS_BASE}/usr -if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then - # see https://github.com/void-linux/void-packages/pull/26962 - broken="Requires 8-byte atomics" -fi - if [ ${CROSS_BUILD} ]; then hostmakedepends+=" qt5-qmake qt5-host-tools qt5-tools qt5-remoteobjects qt5-scxml" - - # shiboken2 calls clang without defining target's platform, so it fails for some platform. - # related upsteam's bug https://bugreports.qt.io/browse/PYSIDE-1477 - if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then - case "$XBPS_TARGET_MACHINE" in - armv7*) broken="see https://bugreports.qt.io/browse/PYSIDE-1477" ;; - esac - fi + export CLANG_TARGET_TRIPLET="--target=${XBPS_CROSS_TRIPLET}" + export CLANG_TARGET_SYSROOT="--sysroot=/usr/${XBPS_CROSS_TRIPLET}" fi if [ "$XBPS_TARGET_ENDIAN" = "le" ]; then ``` But now I get a different error, and it still seems to be using the host headers: ``` /../lib/gcc/arm-linux-musleabihf/9.3.0/../../../../include/c++/9.3.0/type_traits:38:10: fatal: 'bits/c++config.h' file not found ``` @q66 suggested making it `nocross` in general, and in the current circumstance I'd agree, since the aarch64 build probably just works out due to luck, not really because it's doing the right thing. This is quite unfortunate, of course, since there could be FreeCAD users on aarch64.