Sven-Hendrik Haase pushed to branch main at Arch Linux / Packaging / Packages / python-pytorch
Commits: cde6e0dd by Denis Pynkin at 2026-08-21T11:51:31+02:00 Allow build on aarch64 with system libuv Switching to system libuv disables the build of the internal variant. The recent aarch64 workaround added in the upstream PR https://github.com/pytorch/pytorch/pull/169723 (see commit 975d4b02bc33) relies on the CPU type only, so adding the option to the `tensorpipe_uv` target breaks the build on aarch64 when system libuv is used: CMake Error at cmake/public/utils.cmake:531 (target_compile_options): Cannot specify compile options for target "tensorpipe_uv" which is not built by this project. Call Stack (most recent call first): cmake/Dependencies.cmake:1176 (target_compile_options_if_supported) CMakeLists.txt:932 (include) - - - - - 3 changed files: - .SRCINFO - PKGBUILD - use-system-libuv.patch Changes: ===================================== .SRCINFO ===================================== @@ -154,7 +154,7 @@ pkgbase = python-pytorch b2sums = SKIP b2sums = SKIP b2sums = 8c91e931f34fcc1cc5d916572e9808435bbc4a853d80af92a5484b4bb1111ef3b2a1c58283b97c2c3071de3177a124669004855f7ebad0734b0941714e3baf4f - b2sums = af8c724ed80898ae3875a295ad6bd4d18d90f8a9124f6cff6d1b2f525bf7806fe61306e739c1f7362fbd8d0e4f8ba57d0e3bf925ea3f7a78a0a98f26722db147 + b2sums = d87164726e398d201719d629889d6f460e6dc4911de6c10234b046a3e2ffd5d26892ac34a6518abb20bb3ff1dc9f1f01e0e78b789eec92cd13696a3fd8d484b7 b2sums = b9bb1ac1260a55db9126c7568f1cb4daea071c20609f0117e186c85caad163d41053e43ddda988e8969e074e2323d1de1bece9086bc3222396e8817a79bd0079 b2sums = eb1a4305c9e753774ce27256f8e7f35ae52986c8dfefddb71062f7abc71eec04eaae80cd03b9cb362150465000728390b7bfd0e539f772761c0a8d5dd8dbe980 b2sums = 007fc33064c55b1a080f8c3dcb0c03acc21629d7034426d0622b56ace3936ae07e0f4bca578327542fa3333cc127ef2e2379ebc8e1f97b561ee54de58ce84d3c ===================================== PKGBUILD ===================================== @@ -170,7 +170,7 @@ b2sums=('604cf0f3bdea2bcf9a88c84958526cf0795ec822e125c8785e6442f99c5c5336c0153f1 'SKIP' 'SKIP' '8c91e931f34fcc1cc5d916572e9808435bbc4a853d80af92a5484b4bb1111ef3b2a1c58283b97c2c3071de3177a124669004855f7ebad0734b0941714e3baf4f' - 'af8c724ed80898ae3875a295ad6bd4d18d90f8a9124f6cff6d1b2f525bf7806fe61306e739c1f7362fbd8d0e4f8ba57d0e3bf925ea3f7a78a0a98f26722db147' + 'd87164726e398d201719d629889d6f460e6dc4911de6c10234b046a3e2ffd5d26892ac34a6518abb20bb3ff1dc9f1f01e0e78b789eec92cd13696a3fd8d484b7' 'b9bb1ac1260a55db9126c7568f1cb4daea071c20609f0117e186c85caad163d41053e43ddda988e8969e074e2323d1de1bece9086bc3222396e8817a79bd0079' 'eb1a4305c9e753774ce27256f8e7f35ae52986c8dfefddb71062f7abc71eec04eaae80cd03b9cb362150465000728390b7bfd0e539f772761c0a8d5dd8dbe980' '007fc33064c55b1a080f8c3dcb0c03acc21629d7034426d0622b56ace3936ae07e0f4bca578327542fa3333cc127ef2e2379ebc8e1f97b561ee54de58ce84d3c' ===================================== use-system-libuv.patch ===================================== @@ -1,8 +1,8 @@ diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake -index c3abce52e4c..53e51a861e7 100644 +index 2baa187e69ac..dc41deda10d8 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake -@@ -1381,7 +1381,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE) +@@ -1193,7 +1193,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE) set(TP_USE_CUDA ON CACHE BOOL "" FORCE) set(TP_ENABLE_CUDA_IPC ON CACHE BOOL "" FORCE) endif() @@ -11,3 +11,12 @@ index c3abce52e4c..53e51a861e7 100644 add_compile_options(-DTORCH_USE_LIBUV) include_directories(BEFORE SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/tensorpipe/third_party/libuv/include) set(TP_STATIC_OR_SHARED STATIC CACHE STRING "" FORCE) +@@ -1207,7 +1207,7 @@ if(USE_DISTRIBUTED AND USE_TENSORPIPE) + # Workaround for relocation truncated to fit: R_AARCH64_CALL26 against symbol __aarch64_swp4_relax' + # When compiling for ARMv8.0, build uv with embedded atomics, which are slightly slower + # But are used only once during shutdown +- if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" AND TP_BUILD_LIBUV) + target_compile_options_if_supported(tensorpipe_uv -mno-outline-atomics) + endif() + View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-pytorch/-/commit/cde6e0ddd75dd712186089044f11527d03cbbd93 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-pytorch/-/commit/cde6e0ddd75dd712186089044f11527d03cbbd93 You're receiving this email because of your account on gitlab.archlinux.org. Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications | Help: https://gitlab.archlinux.org/help
