package/x265: fix build on i386
PATCH v2 1/2 package/x265: fix build on i386
Fixes build error:
[100%] Linking CXX shared library libx265.so /home/autobuild/autobuild/instance-2/output-1/per-package/x265/host/i686-buildroot-linux-musl/bin/ld:common/CMakeFiles/common.dir/x86/pixel-a.asm.o: warning:
relocation in read-only section `.text'/home/autobuild/autobuild/instance-2/output-1/per-package/x265/host/i686-buildroot-linux-musl/bin/ld:
read-only segment has dynamic relocations
collect2: error: ld returned 1 exit status
For details see:
https://bugzilla.redhat.com/show_bug.cgi?id=2428281
https://github.com/rpmfusion/x265/commit/acff0da237beea2c1229d743a2eaa16c839e00b3
Fixes:
https://autobuild.buildroot.net/results/6ab/6ab6ce2e82a4ccd9ca58b2233a3d496eff697cdc/
The oldest build error of this kind dates back to 2024:
https://autobuild.buildroot.net/results/5a0/5a0040e1a5e352fdc7a37ac268083466ad80404b/
so a backport to LTS branches should be considered.
---
v2: split i386 fix from version bump
package/x265/x265.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/x265/x265.mk +4 -0
@@ -33,6 +33,10 @@ ifeq ($(BR2_i386)$(BR2_x86_64),y) X265_DEPENDENCIES += host-nasm endif +ifeq ($(BR2_i386),y) +X265_CONF_OPTS += -DEXTRA_LINK_FLAGS=-Wl,-z,notext +endif + # disable altivec, it has build issues # https://bitbucket.org/multicoreware/x265/issues/320/ ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y)
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/2 package/x265: bump version to 4.3
https://mailman.videolan.org/pipermail/x265-devel/2026-July/014552.html
https://mailman.videolan.org/pipermail/x265-devel/2026-April/014533.html
Rebased patch 0001.
Removed remaining patches which are included in this release.
Upstream moved the repository to github:
https://mailman.videolan.org/pipermail/x265-devel/2026-May/014545.html
This bump includes upstream commit
https://github.com/Multicorewareinc/x265/commit/f74b2f38ad850a09524f331f64870e6300fd923b
that uses vst1q_s16_x2() which was first added to gcc 9:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=568421baa5a4cdb7bb7c5ac323c939492ee3f052
causing build errors detected by the Gitlab pipelines:
/builds/bkuhls/buildroot/br-test-pkg/bootlin-aarch64-glibc-old/build/x265-4.3/source/common/aarch64/pixel-prim.cpp:787:25:
error: ‘vst1q_s16_x2’ was not declared in this scope
Upstream added the usage of __sync_fetch_and_add_8 with commit
https://github.com/Multicorewareinc/x265/commit/cb40d974e9d6e0388d4dac9484eaa68ceb5c3dcb
first included in this release. To fix build errorswith toolchains not supporting __sync_fetch_and_add_8 we disable atomics by adding -DNO_ATOMICS=ON to _CONF_OPTS.
---
v2: split i386 fix from version bump
Series passed Gitlab pipelines:
https://gitlab.com/bkuhls/buildroot/-/commits/1a985568cb812e34665f19425627084614165def
with the exception of an ICE caused by target bootlin-m68k-68040-uclibc/build/x265-4.3/.stamp_built
...ists.txt-do-not-force-compiler-flags.patch | 4 +- ...-error-with-latest-CMake-4.0-release.patch | 35 ----------- ...-Fix-for-CMake-Build-Errors-in-MacOS.patch | 60 ------------------- ...n-undefined-symbols-in-armv6l-armv7l.patch | 28 --------- package/x265/x265.hash | 3 +- package/x265/x265.mk | 15 ++++- 6 files changed, 17 insertions(+), 128 deletions(-) delete mode 100644 package/x265/0002-Fix-CMake-build-error-with-latest-CMake-4.0-release.patch delete mode 100644 package/x265/0003-Fix-for-CMake-Build-Errors-in-MacOS.patch delete mode 100644 package/x265/0004-Fix-neon-undefined-symbols-in-armv6l-armv7l.patch
package/x265/0001-CMakeLists.txt-do-not-force-compiler-flags.patch +2 -2
@@ -21,7 +21,7 @@ Bernd Kuhls <[email protected]>. Upstream: https://bitbucket.org/multicoreware/x265_git/pull-requests/26 Signed-off-by: Thomas Petazzoni <[email protected]> -[Bernd: rebased for 4.1] +[Bernd: rebased for 4.3] Signed-off-by: Bernd Kuhls <[email protected]> --- source/CMakeLists.txt | 6 +++---
@@ -32,7 +32,7 @@ diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index c14489ea6..fa331e8af 100755 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt -@@ -270,14 +270,14 @@ if(GCC) +@@ -321,14 +321,14 @@ if(GCC) endif() if(ARM AND CROSS_COMPILE_ARM) message(STATUS "cross compile arm")
package/x265/0002-Fix-CMake-build-error-with-latest-CMake-4.0-release.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From b354c009a60bcd6d7fc04014e200a1ee9c45c167 Mon Sep 17 00:00:00 2001 -From: yaswanthsastry <[email protected]> -Date: Mon, 24 Feb 2025 17:07:03 +0530 -Subject: [PATCH] Fix CMake build error with latest CMake 4.0 release - -Upstream: https://bitbucket.org/multicoreware/x265_git/commits/b354c009a60bcd6d7fc04014e200a1ee9c45c167 - -Signed-off-by: Bernd Kuhls <[email protected]> ---- - source/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt -index 37dbe1a87..4f5b3ed82 100755 ---- a/source/CMakeLists.txt -+++ b/source/CMakeLists.txt -@@ -7,13 +7,13 @@ if(NOT CMAKE_BUILD_TYPE) - endif() - message(STATUS "cmake version ${CMAKE_VERSION}") - if(POLICY CMP0025) -- cmake_policy(SET CMP0025 OLD) # report Apple's Clang as just Clang -+ cmake_policy(SET CMP0025 NEW) # report Apple's Clang as just Clang - endif() - if(POLICY CMP0042) - cmake_policy(SET CMP0042 NEW) # MACOSX_RPATH - endif() - if(POLICY CMP0054) -- cmake_policy(SET CMP0054 OLD) # Only interpret if() arguments as variables or keywords when unquoted -+ cmake_policy(SET CMP0054 NEW) # Only interpret if() arguments as variables or keywords when unquoted - endif() - - project (x265) --- -2.51.0 -
package/x265/0003-Fix-for-CMake-Build-Errors-in-MacOS.patch deleted +0 -60
60 lines not on this page · raw message
package/x265/0004-Fix-neon-undefined-symbols-in-armv6l-armv7l.patch deleted +0 -28
@@ -1,28 +0,0 @@ -From ddb1933598736394b646cb0f78da4a4201ffc656 Mon Sep 17 00:00:00 2001 -From: Uthayakumar Muthu <[email protected]> -Date: Sun, 12 Jan 2025 13:17:21 +0530 -Subject: [PATCH] Fix neon undefined symbols in armv6l,armv7l - -Upstream: https://bitbucket.org/multicoreware/x265_git/commits/ddb1933598736394b646cb0f78da4a4201ffc656 - -Signed-off-by: Bernd Kuhls <[email protected]> ---- - source/common/cpu.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source/common/cpu.cpp b/source/common/cpu.cpp -index ae0907890..35c43deaf 100644 ---- a/source/common/cpu.cpp -+++ b/source/common/cpu.cpp -@@ -352,7 +352,7 @@ uint32_t cpu_detect(bool benableavx512) - { - int flags = 0; - --#if HAVE_ARMV6 -+#if HAVE_ARMV6 && ENABLE_ASSEMBLY - flags |= X265_CPU_ARMV6; - - // don't do this hack if compiled with -mfpu=neon --- -2.51.0 -
package/x265/x265.hash +2 -1
@@ -1,3 +1,4 @@ +# From https://github.com/Multicorewareinc/x265/releases/tag/4.3 +sha256 83c53e4c8bbb8f1e33ed59e10a7d621d1d7801ca853910c3eb41f038b8ffb121 x265_4.3.tar.gz # Locally generated -sha256 a31699c6a89806b74b0151e5e6a7df65de4b49050482fe5ebf8a4379d7af8f29 x265_4.1.tar.gz sha256 d8afb1bcc7a2cfc603683b168d6987ef0a48e59e0da3693bf55c5d33b67e2b49 COPYING
package/x265/x265.mk +13 -2
@@ -4,9 +4,9 @@ # ################################################################################ -X265_VERSION = 4.1 +X265_VERSION = 4.3 X265_SOURCE = x265_$(X265_VERSION).tar.gz -X265_SITE = https://bitbucket.org/multicoreware/x265_git/downloads +X265_SITE = https://github.com/Multicorewareinc/x265/releases/download/$(X265_VERSION) X265_LICENSE = GPL-2.0+ X265_LICENSE_FILES = COPYING X265_CPE_ID_VENDOR = multicorewareinc
@@ -37,12 +37,23 @@ ifeq ($(BR2_i386),y) X265_CONF_OPTS += -DEXTRA_LINK_FLAGS=-Wl,-z,notext endif +# x265 uses vst1q_s16_x2 on aarch64 which was implemented in gcc 9 +ifeq ($(BR2_aarch64):$(BR2_TOOLCHAIN_GCC_AT_LEAST_9),y:) +X265_CONF_OPTS += -DENABLE_ASSEMBLY=0 +endif + # disable altivec, it has build issues # https://bitbucket.org/multicoreware/x265/issues/320/ ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y) X265_CONF_OPTS += -DENABLE_ALTIVEC=OFF endif +ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8),y) +X265_CONF_OPTS += -DNO_ATOMICS=OFF +else +X265_CONF_OPTS += -DNO_ATOMICS=ON +endif + ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) X265_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_PIC=ON else
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 14 lines · Bernd Kuhls
Fixes build error:
[100%] Linking CXX shared library libx265.so
/home/autobuild/autobuild/instance-2/output-1/per-package/x265/host/i686-buildroot-linux-musl/bin/ld:common/CMakeFiles/common.dir/x86/pixel-a.asm.o: warning:
relocation in read-only section `.text'/home/autobuild/autobuild/instance-2/output-1/per-package/x265/host/i686-buildroot-linux-musl/bin/ld:
read-only segment has dynamic relocations
collect2: error: ld returned 1 exit statusFor details see:
https://bugzilla.redhat.com/show_bug.cgi?id=2428281
https://github.com/rpmfusion/x265/commit/acff0da237beea2c1229d743a2eaa16c839e00b3
Quoted 8 lines
Fixes:
https://autobuild.buildroot.net/results/6ab/6ab6ce2e82a4ccd9ca58b2233a3d496eff697cdc/The oldest build error of this kind dates back to 2024:
https://autobuild.buildroot.net/results/5a0/5a0040e1a5e352fdc7a37ac268083466ad80404b/
so a backport to LTS branches should be considered.Signed-off-by Bernd Kuhls <[email protected]>
Series applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Raphaël Mélotte via buildroot
AppliedIn reply of:
Quoted 14 lines
Fixes build error:
[100%] Linking CXX shared library libx265.so
/home/autobuild/autobuild/instance-2/output-1/per-package/x265/host/i686-buildroot-linux-musl/bin/ld:common/CMakeFiles/common.dir/x86/pixel-a.asm.o: warning:
relocation in read-only section `.text'/home/autobuild/autobuild/instance-2/output-1/per-package/x265/host/i686-buildroot-linux-musl/bin/ld:
read-only segment has dynamic relocations
collect2: error: ld returned 1 exit statusFor details see:
https://bugzilla.redhat.com/show_bug.cgi?id=2428281
https://github.com/rpmfusion/x265/commit/acff0da237beea2c1229d743a2eaa16c839e00b3
Quoted 8 lines
Fixes:
https://autobuild.buildroot.net/results/6ab/6ab6ce2e82a4ccd9ca58b2233a3d496eff697cdc/The oldest build error of this kind dates back to 2024:
https://autobuild.buildroot.net/results/5a0/5a0040e1a5e352fdc7a37ac268083466ad80404b/
so a backport to LTS branches should be considered.Signed-off-by Bernd Kuhls <[email protected]>
Applied to 2025.02.x, 2026.08.x. Thanks
Quoted 11 lines
---
v2: split i386 fix from version bumppackage/x265/x265.mk | 4 ++++ 1 file changed, 4 insertions(+)package/x265/x265.mk +0
-0
package/x265/x265.mk ifeq ($(BR2_i386)$(BR2_x86_64),y) · line 42
Quoted 10 lines
package/x265/x265.mk +4
-0@@ -33,6 +33,10 @@ ifeq ($(BR2_i386)$(BR2_x86_64),y) X265_DEPENDENCIES += host-nasm endif +ifeq ($(BR2_i386),y) +X265_CONF_OPTS += -DEXTRA_LINK_FLAGS=-Wl,-z,notext +endif + # disable altivec, it has build issues # https://bitbucket.org/multicoreware/x265/issues/320/ ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y)
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot