Source: libreoffice
Version: 4:26.2.0~beta1-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: alpha
X-Debbugs-Cc: [email protected]

Hi,

libreoffice currently fails to build on alpha with the following error:

[build MOD] jurt
./workdir/UnpackedTarball/skia/src/opts/SkRasterPipeline_opts.h: In function 
‘atan2_n_floats’:
./workdir/UnpackedTarball/skia/src/opts/SkRasterPipeline_opts.h:4797:1: error: 
cannot tail-call: target is not able to optimize the call into a sibling call
 4797 | DECLARE_N_WAY_BINARY_FLOAT(atan2)
      | ^

This is because the skia source still defines SK_HAS_MUSTTAIL for alpha in
src/core/SkRasterPipeline.h.

This can be fixed with:

diff -Nru skia-old/src/core/SkRasterPipeline.h skia/src/core/SkRasterPipeline.h
--- skia-old/src/core/SkRasterPipeline.h        2025-11-13 07:45:03.000000000 
+0100
+++ skia/src/core/SkRasterPipeline.h    2025-12-08 17:01:58.882479397 +0100
@@ -27,7 +27,7 @@
 struct skcms_TransferFunction;
 
 #if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && 
!defined(SK_CPU_ARM32) && \
-        !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && \
+        !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && 
!defined(__alpha__) && \
         !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK))
     // [[clang::musttail]] is disabled for the Android version of Skia running 
on Windows as it
     // causes crashes (This is probably related to http://crbug.com/1505442).

After including that patch, libreoffice builds fine on alpha:

 dpkg-genbuildinfo --build=any -O../libreoffice_26.2.0~beta1-1_alpha.buildinfo
 dpkg-genchanges --build=any -O../libreoffice_26.2.0~beta1-1_alpha.changes
dpkg-genchanges: warning: package libreoffice-report-builder-bin-nogui in 
control file but not in files list
dpkg-genchanges: info: binary-only arch-specific upload (source code and 
arch-indep packages not included)
 dpkg-source --after-build .
dpkg-buildpackage: info: binary-only upload (no source included)
 signfile libreoffice_26.2.0~beta1-1_alpha.buildinfo

Thus, I'm attaching the patch and leaving it up to the libreoffice maintainer 
how to
include it. Either as a separate patch in external/skia or merged into 
gcc-no-musttail.diff.

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
diff -Nru skia-old/src/core/SkRasterPipeline.h skia/src/core/SkRasterPipeline.h
--- skia-old/src/core/SkRasterPipeline.h        2025-11-13 07:45:03.000000000 
+0100
+++ skia/src/core/SkRasterPipeline.h    2025-12-08 17:01:58.882479397 +0100
@@ -27,7 +27,7 @@
 struct skcms_TransferFunction;
 
 #if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && 
!defined(SK_CPU_ARM32) && \
-        !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && \
+        !defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && 
!defined(__alpha__) && \
         !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK))
     // [[clang::musttail]] is disabled for the Android version of Skia running 
on Windows as it
     // causes crashes (This is probably related to http://crbug.com/1505442).

Reply via email to