Your message dated Sat, 14 Nov 2026 00:06:07 +0000
with message-id <[email protected]>
and subject line Bug#1143183: fixed in x265 4.2-4
has caused the Debian Bug report #1143183,
regarding x265: Please add patch to fix FTBFS on m68k, powerpc and sh4
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.)


-- 
1143183: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1143183
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: x265
Version: 4.2-3
Severity: normal
Tags: ftbfs patch
X-Debbugs-Cc: [email protected], [email protected], 
[email protected]
User: [email protected]
Usertags: m68k
User: [email protected]
Usertags: sh4
User: [email protected]
Usertags: powerpc

Hi,

x265 FTBFS on m68k, powerpc and sh4 because it uses the old __sync atomic
builtins for which no 64-bit variant exists [1]:

/usr/bin/sh4-linux-gnu-ld.bfd: libx265.so.216: undefined reference to 
`__sync_fetch_and_add_8'
collect2: error: ld returned 1 exit status

This can be fixed by switching over to the new __atomic builtins which are
standard in GCC since version 4.7 [2].

I have also sent a pull-request upstream with a modified patch which accounts
for additional load and store macros added to threading.h [3].

Please consider including this patch for the next upload.

Thanks,
Adrian

> [1] 
> https://buildd.debian.org/status/fetch.php?pkg=x265&arch=sh4&ver=4.2-2&stamp=1782593765&raw=0
> [2] 
> https://gcc.gnu.org/onlinedocs/gcc-11.3.0/gcc/_005f_005fatomic-Builtins.html#g_t_005f_005fatomic-Builtins
> [3] https://github.com/Multicorewareinc/x265/pull/932

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
--- x265-4.2.orig/source/common/threading.h
+++ x265-4.2/source/common/threading.h
@@ -81,11 +81,11 @@ int64_t no_atomic_add64(int64_t* ptr, in
 #define BSF(id, x)            (id) = ((unsigned long)__builtin_ctz(x))
 #define BSR64(id, x)          (id) = ((unsigned long)__builtin_clzll(x) ^ 63)
 #define BSF64(id, x)          (id) = ((unsigned long)__builtin_ctzll(x))
-#define ATOMIC_OR(ptr, mask)  __sync_fetch_and_or(ptr, mask)
-#define ATOMIC_AND(ptr, mask) __sync_fetch_and_and(ptr, mask)
-#define ATOMIC_INC(ptr)       __sync_add_and_fetch((volatile int32_t*)ptr, 1)
-#define ATOMIC_DEC(ptr)       __sync_add_and_fetch((volatile int32_t*)ptr, -1)
-#define ATOMIC_ADD(ptr, val)  __sync_fetch_and_add((volatile 
__typeof__(*(ptr))*)ptr, (__typeof__(*(ptr) + 0))(val))
+#define ATOMIC_OR(ptr, mask)  __atomic_or_fetch(ptr, mask, __ATOMIC_SEQ_CST)
+#define ATOMIC_AND(ptr, mask) __atomic_and_fetch(ptr, mask, __ATOMIC_SEQ_CST)
+#define ATOMIC_INC(ptr)       __atomic_fetch_add((volatile int32_t*)ptr, 1, 
__ATOMIC_SEQ_CST)
+#define ATOMIC_DEC(ptr)       __atomic_fetch_sub((volatile int32_t*)ptr, 1, 
__ATOMIC_SEQ_CST)
+#define ATOMIC_ADD(ptr, val)  __atomic_fetch_add((volatile 
__typeof__(*(ptr))*)ptr, (__typeof__(*(ptr) + 0))(val), __ATOMIC_SEQ_CST)
 #define GIVE_UP_TIME()        usleep(0)
 
 #elif defined(_MSC_VER)       /* Windows atomic intrinsics */

--- End Message ---
--- Begin Message ---
Source: x265
Source-Version: 4.2-4
Done: Joachim Bauch <[email protected]>

We believe that the bug you reported is fixed in the latest version of
x265, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joachim Bauch <[email protected]> (supplier of updated x265 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 14 Nov 2026 00:33:51 +0100
Source: x265
Built-For-Profiles: noudeb
Architecture: source
Version: 4.2-4
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers <[email protected]>
Changed-By: Joachim Bauch <[email protected]>
Closes: 1143183
Changes:
 x265 (4.2-4) unstable; urgency=medium
 .
   * Team Upload
 .
   [ Sebastian Ramacher ]
   * Revert "ignore blhc false match"
   * Revert "add Salsa CI, test the <nodoc> profile"
 .
   [ Joachim Bauch ]
   * Fix FTBFS on some platforms by using modern atomic builtins.
     (Closes: #1143183)
Checksums-Sha1:
 b2bb546b4bd98591a3a584fe73165c00a34e2284 2330 x265_4.2-4.dsc
 257bf1949c8c592a9f5f581c0b6c7fd69a0ffc68 15060 x265_4.2-4.debian.tar.xz
 944aef4a5002110f633fce2ae0d9e9dad99e53d7 9028 x265_4.2-4_source.buildinfo
Checksums-Sha256:
 002b731172218d24afefdd190867bb33f1711935744af8b0acc4f3bff7b3fc9c 2330 
x265_4.2-4.dsc
 5d7ab7b1d02ffa8a6b88a8c7e18082c600e7fb48671a76586055b3dbf96e1598 15060 
x265_4.2-4.debian.tar.xz
 1560cbe40e6a83be14bcfb53e68e5f6b773b2542f2ed8f5401ab3b3b19edbf93 9028 
x265_4.2-4_source.buildinfo
Files:
 18dd23a89254e090f5e78a8afac66f81 2330 video - x265_4.2-4.dsc
 8c05f6bb5ead83f76206ba02bb0a0be1 15060 video - x265_4.2-4.debian.tar.xz
 109e049cd67196131cb0bd94115671a3 9028 video - x265_4.2-4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEvj2K8Ga27IB5Zn/Xd8HSLVPhXwIFAmr3nt8ACgkQd8HSLVPh
XwKvoQ//a9NJfv6JTN5V5DWoLD72muXq+qBo3RKIFp63YY0s+klph6lYKZMd3D4Z
frHNQ1z9ienpEjbEGsnruuNvf0Si3Cpo9pcQJYil7V07S8kKWy4aFAdfyoT4WXuY
3yxPnvJvrbWQW5DkCxjWPB2HXDkm5oYMkYTxO2Bamh0/oI+LYBw3ahYSefoNzO5V
d3dqRaw2YNv+G0tkm1yENfBV7u8976GevGphF+uyzSqGmaA8FYKS1g5snJWvbOQf
g9fjvnrZFvzACRmT7wFphxGQnm1yNrQBo8LElO+mjMxZ6+HXuyYIB8xgcfUq4O5t
db1D6cjbBlwVF8tB5P3inK1lACi5op6EJNsDAXI+b5TOHrpZxqHWW0LqQ66ccdaA
tU3gjX/yqNDPjObOtfhNVwHjUkSdyMW2pHXQs46MkUH6rOywS2ITlJ2qkLETpv1n
pqr4n9JFNXbLZDR0eiyNCSmGuoB7DvsFOcEvgYRhHpKEKZw3U/luuSTrFuEdrd9I
sqnf8uLW6PEwMhAHHxcmGuTcNHTEa3KcRCMSrEKMSVMfuNP1nM1hL7W0Bsi+aSbO
SvintvcsXSc0VrykK4u0WU6ac+VzN3ZWLBsQVF4ZHujwEyVZkoIOELhFvKFKlxpz
V6fi1WhWNo6syNwNrVk47skbdNEzltWnMlAp49VvGySjDpVTj9k=
=Jy3p
-----END PGP SIGNATURE-----

Attachment: pgp3TIRyNwT9u.pgp
Description: PGP signature


--- End Message ---

Reply via email to