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

Re: Bug#1121498: libreoffice: Preprocessor macros in pdfium confuse arm64 with sparc64



Hello,

On Thu, 2025-11-27 at 18:22 +0100, Rene Engelhard wrote:
> > the libreoffice package fails to build from source on sparc64 with:
> > /tmp/ccLEFgM7.s: Assembler messages:
> > /tmp/ccLEFgM7.s:10332: Error: Unknown opcode: `qsub'
> > /tmp/ccLEFgM7.s:10365: Error: Unknown opcode: `qsub'
> 
> ??
> 
> https://buildd.debian.org/status/fetch.php?pkg=libreoffice&arch=sparc64&ver=4%3A25.8.3-1&stamp=1763053335&raw=0 looks like pdfium just builds fine?
> 
> The actual error is in lp-solve.

No, the build log is confusing here. It's definitely in pdfium. I have applied the
patch locally and the build continues past this error now.

You can see the bug here in the source code [1]. The preprocessor check is
incorrect and the reason why the the inline assembly code in [2] is emitted:

	asm("qsub %[result], %[first], %[second]"

As shown above __arch64__ is incorrect for AArch64 since it's supposed to be __aarch64__.

Adrian

> [1] https://pdfium.googlesource.com/pdfium/+/refs/heads/main/core/fxcrt/numerics/safe_math_clang_gcc_impl.h#17
> [2] https://pdfium.googlesource.com/pdfium/+/refs/heads/main/core/fxcrt/numerics/safe_math_arm_impl.h#91

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: