Your message dated Mon, 16 Feb 2026 09:03:40 +0100
with message-id <[email protected]>
and subject line Re: binutils: Assertion failure in elfnn-loongarch.c:2716 when
linking shared libraries
has caused the Debian Bug report #1118382,
regarding binutils: Assertion failure in elfnn-loongarch.c:2716 when linking
shared libraries
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1118382: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1118382
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: binutils
Version: 2.45-7
Severity: standard
Tags: patch
X-Debbugs-Cc: [email protected]
Dear Maintainer,
The linker (ld.bfd) crashes with a segmentation fault when building shared
libraries on loongarch64 due to an assertion failure in elfnn-loongarch.c:2716.
* What led up to the situation?
Attempting to build x265 4.1 (and other projects using shared libraries) on
Debian unstable/loongarch64 with binutils 2.45-7.
* What exactly did you do (or not do) that was effective (or ineffective)?
Built x265 4.1 from source:
tar xzf x265_4.1.tar.gz
cd x265_4.1/build/linux
cmake ../../source
make
The build proceeds through compilation but fails during the linking stage of
the shared library (libx265.so) with:
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.45 assertion fail
../../bfd/elfnn-loongarch.c:2716
collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
compilation terminated.
* What was the outcome of this action?
The linker crashes. The static library builds successfully, but the shared
library build fails.
* What outcome did you expect instead?
The shared library should link successfully without segfaulting.
Additional context:
- The error occurs specifically with R_LARCH_PCALA_HI20 relocations
- Multiple objects trigger this: search.cpp.o, entropy.cpp.o, quant.cpp.o
- Error message: "relocation R_LARCH_PCALA_HI20 against `<symbol>` can not be
used when making a shared object; recompile with -fPIC"
- All code is already compiled with -fPIC (verified in build logs)
Workaround:
Building with -DENABLE_SHARED=OFF (static library only) works.
This bug affects multiple compilation benchmarks and projects that build
shared libraries on LoongArch64.
--- End Message ---
--- Begin Message ---
closing, apparently fixed, x265 built.
--- End Message ---