Le mer. 20 août 2025 à 08:43, John Paul Adrian Glaubitz <
[email protected]> a écrit :

> 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?
>

Done,
I suppose it would be nice to report that sh4 needs the same fix as ppc64
on
https://github.com/libuv/libuv/issues/4283
?

Reply via email to