[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1057050: qt6-multimedia: Please build with EIGEN_DONT_VECTORIZE on powerpc to fix FTBFS



Source: qt6-multimedia
Version: 6.4.2-11
Severity: normal
User: debian-powerpc@lists.debian.org
Usertags: powerpc
X-Debbugs-Cc: debian-powerpc@lists.debian.org

Hello!

The package src:qt6-multimedia fails to build from source on powerpc since version
6.4.0-1 due to the use of some AltiVec instrisics that are not supported on 32-bit
PowerPC:

/usr/bin/c++ -DEIGEN_MPL2_ONLY -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS \
(...)
In file included from /usr/include/eigen3/Eigen/Core:210,
                 from /usr/include/eigen3/Eigen/Dense:1,
                 from /<<PKGBUILDDIR>>/src/resonance-audio/../3rdparty/resonance-audio/platforms/common/utils.h:20,
                 from /<<PKGBUILDDIR>>/src/3rdparty/resonance-audio/platforms/common/utils.cc:17:
/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h: In function \
‘Packet Eigen::internal::pblend(const Selector<unpacket_traits<T>::size>&, const Packet&, const Packet&) [with Packet = __vector(2) double]’:
/usr/include/eigen3/Eigen/src/Core/arch/AltiVec/PacketMath.h:2702:17: error: invalid parameter combination for AltiVec intrinsic ‘__builtin_vec_sel’
 2702 |   return vec_sel(elsePacket, thenPacket, mask);
      |                 ^

This can be fixed by switching off vectorization in the »eigen« using the preprocessor
macro EIGEN_DONT_VECTORIZE which can be defined on the cmake command line using the
cmake variable COMPILE_DEFINITIONS:

--- qt6-multimedia-6.4.2/debian/rules.orig      2023-07-26 17:52:13.000000000 +0200
+++ qt6-multimedia-6.4.2/debian/rules   2023-11-28 18:26:47.950137854 +0100
@@ -9,6 +9,10 @@
        cmake_extra_args += -DQT_HOST_PATH=/usr
 endif
 
+ifneq (,$(filter $(DEB_HOST_ARCH),powerpc))
+       cmake_extra_args += -DCOMPILE_DEFINITIONS="EIGEN_DONT_VECTORIZE"
+endif
+
 %:
        dh $@ --with pkgkde_symbolshelper --buildsystem=cmake+ninja
 
With the above change, cmake defines the preprocessor macro EIGEN_DONT_VECTORIZE and
the build succeeds on powerpc.

Could you apply this change for the next upload in order to fix the build on powerpc?

Attaching a patch for a convenience.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- qt6-multimedia-6.4.2/debian/rules.orig	2023-07-26 17:52:13.000000000 +0200
+++ qt6-multimedia-6.4.2/debian/rules	2023-11-28 18:26:47.950137854 +0100
@@ -9,6 +9,10 @@
 	cmake_extra_args += -DQT_HOST_PATH=/usr
 endif
 
+ifneq (,$(filter $(DEB_HOST_ARCH),powerpc))
+	cmake_extra_args += -DCOMPILE_DEFINITIONS="EIGEN_DONT_VECTORIZE"
+endif
+
 %:
 	dh $@ --with pkgkde_symbolshelper --buildsystem=cmake+ninja
 

Reply to: