Bug#1111616: libuv1: Please include patch to disable io_uring on sh4

John Paul Adrian Glaubitz <[email protected]> Wed, 20 Aug 2025 08:40:10 +0200
Newsgroups gmane.linux.debian.ports.superh
Message-ID <175567201080.205827.10919396672277475846.reportbug__45923.156586808$1755672208$gmane$org@login1.physik.fu-berlin.de>
Source: libuv1
Version: 1.50.0-2
Severity: normal
Tags: patch
User: [email protected]
Usertags: sh4
X-Debbugs-Cc: [email protected]

Hello,

on sh4, libuv1 with io_uring support enabled often causes cmake to crash [1]:

-- Performing Test C_COMPILER_SUPPORTS_-Werror__undefined-inline
-- Performing Test C_COMPILER_SUPPORTS_-Werror__undefined-inline - Failed
-- Performing Test C_COMPILER_SUPPORTS_-Werror__undefined-internal
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
dh_auto_configure: error: cd build-soup3 && DEB_PYTHON_INSTALL_LAYOUT=deb PKG_CONFIG=/usr/bin/pkg-config cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DCMAKE_INSTALL_RUNSTATEDIR=/run -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON -GNinja -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_LIBDIR=lib/sh4-linux-gnu -DBUILD_TESTING:BOOL=OFF -DPORT=GTK -DCMAKE_INSTALL_LIBEXECDIR=lib/sh4-linux-gnu -DCMAKE_C_FLAGS_RELEASE= -DCMAKE_C_FLAGS_DEBUG= -DCMAKE_CXX_FLAGS_RELEASE= -DCMAKE_CXX_FLAGS_DEBUG= -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DUSE_LIBBACKTRACE=OFF -DENABLE_MINIBROWSER=ON -DUSE_SYSPROF_CAPTURE=ON -DFORCE_32BIT=ON -DDEBUG_FISSION=OFF -DENABLE_DOCUMENTATION=OFF -DCMAKE_BUILD_TYPE=Release -DENABLE_BUBBLEWRAP_SANDBOX=OFF -DUSE_SOUP2=OFF -DUSE_GTK4=OFF -DENABLE_WEBDRIVER=ON -DENABLE_DOCUMENTATION=OFF .. died with signal 11
make[1]: *** [debian/rules:313: override_dh_auto_configure] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:253: binary-arch] Error 2
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2

This can be worked around by just disabling io_uring support on sh4:

--- libuv1-1.50.0.orig/src/unix/linux.c
+++ libuv1-1.50.0/src/unix/linux.c
@@ -470,6 +470,8 @@ static int uv__use_io_uring(uint32_t fla
 #elif defined(__powerpc64__) || defined(__ppc64__)
   /* See https://github.com/libuv/libuv/issues/4283. */
   return 0; /* Random SIGSEGV in signal handler. */
+#elif defined(__sh__)
+  return 0;
 #else
   /* Ternary: unknown=0, yes=1, no=-1 */
   static _Atomic int use_io_uring;

Thus, could you please include this patch for the next libuv1 to fix these crashes?

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
sh4-disable-io_uring.patch (text/plain, 419 B)
--- libuv1-1.50.0.orig/src/unix/linux.c
+++ libuv1-1.50.0/src/unix/linux.c
@@ -470,6 +470,8 @@ static int uv__use_io_uring(uint32_t fla
 #elif defined(__powerpc64__) || defined(__ppc64__)
   /* See https://github.com/libuv/libuv/issues/4283. */
   return 0; /* Random SIGSEGV in signal handler. */
+#elif defined(__sh__)
+  return 0;
 #else
   /* Ternary: unknown=0, yes=1, no=-1 */
   static _Atomic int use_io_uring;