On Tue, 2023-06-27 at 17:08 +0200, Alexander Kanavin wrote:
> Additionally:
> - drop pseudo from INSANE_SKIP for 32bit time API check
> (pseudo passes the check; it's not clear where the issue may have been)
> 
> - move rust exceptions to the cargo class, as the problem
> is common across the ecosystem, and needs to be fixed in the
> libc crate.
> 
> Signed-off-by: Alexander Kanavin <[email protected]>
> ---
>  meta/classes-recipe/cargo_common.bbclass |  4 ++++
>  meta/conf/distro/include/time64.inc      | 26 ++++++++++++++++--------
>  2 files changed, 22 insertions(+), 8 deletions(-)
> 
> diff --git a/meta/classes-recipe/cargo_common.bbclass 
> b/meta/classes-recipe/cargo_common.bbclass
> index 82ab25b59c5..dea03a004ba 100644
> --- a/meta/classes-recipe/cargo_common.bbclass
> +++ b/meta/classes-recipe/cargo_common.bbclass
> @@ -170,3 +170,7 @@ oe_cargo_fix_env () {
>  EXTRA_OECARGO_PATHS ??= ""
>  
>  EXPORT_FUNCTIONS do_configure
> +
> +# Please check the comment in meta/conf/distro/include/time64.inc
> +# for information about the Y2038 situation in rust and this setting
> +INSANE_SKIP:append = " 32bit-time"
> diff --git a/meta/conf/distro/include/time64.inc 
> b/meta/conf/distro/include/time64.inc
> index a0cee4fad67..4edd6d87308 100644
> --- a/meta/conf/distro/include/time64.inc
> +++ b/meta/conf/distro/include/time64.inc
> @@ -27,22 +27,32 @@ GLIBC_64BIT_TIME_FLAGS:pn-glibc-testsuite = ""
>  GLIBC_64BIT_TIME_FLAGS:pn-pipewire = ""
>  # Pulseaudio override certain LFS64 functions e.g. open64 and intentionally
>  # undefines _FILE_OFFSET_BITS, which wont work when _TIME_BITS=64 is set
> +# See https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3770
>  GLIBC_64BIT_TIME_FLAGS:pn-pulseaudio = ""
> +# Undefines _FILE_OFFSET_BITS on purpose in
> +# libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp
>  GLIBC_64BIT_TIME_FLAGS:pn-gcc-sanitizers = ""
>  # https://github.com/strace/strace/issues/250
>  GLIBC_64BIT_TIME_FLAGS:pn-strace = ""
>  
> -INSANE_SKIP:append:pn-cargo = " 32bit-time"
> +# Caused by the flags exceptions above
>  INSANE_SKIP:append:pn-gcc-sanitizers = " 32bit-time"
>  INSANE_SKIP:append:pn-glibc = " 32bit-time"
>  INSANE_SKIP:append:pn-glibc-tests = " 32bit-time"
> -INSANE_SKIP:append:pn-librsvg = " 32bit-time"
> -INSANE_SKIP:append:pn-libstd-rs = " 32bit-time"
> -INSANE_SKIP:append:pn-pseudo = " 32bit-time"
>  INSANE_SKIP:append:pn-pulseaudio = " 32bit-time"
> -INSANE_SKIP:append:pn-python3-bcrypt = " 32bit-time"
> -INSANE_SKIP:append:pn-python3-cryptography = " 32bit-time"
> -INSANE_SKIP:append:pn-rust = " 32bit-time"
> -INSANE_SKIP:append:pn-rust-hello-world = " 32bit-time"
> +
> +# Strace has tests that call 32 bit API directly, which is fair enough, e.g.
> +# /usr/lib/strace/ptest/tests/ioctl_termios uses 32-bit api 'ioctl'
>  INSANE_SKIP:append:pn-strace = " 32bit-time"
>  
> +# Additionally cargo_common class (i.e. everything written in rust)
> +# gets the same INSANE_SKIP setting. The culprit is the libc crate,
> +# which as of Jun 2023 calls directly into 32 bit time functions in glibc,
> +# bypassing all of glibc provisions to choose the right Y2038-safe 
> functions. As
> +# rust components statically link with that crate, pretty much everything
> +# is affected, and so there's no point trying to have recipe-specific
> +# INSANE_SKIP entries.
> +#
> +# Upstream ticket and PR:
> +# https://github.com/rust-lang/libc/issues/3223
> +# https://github.com/rust-lang/libc/pull/3175

This doesn't feel quite right. I think this comment should be in the
cargo class with a comment in time64.inc to see the cargo class forĀ 
rust specific issues?

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183492): 
https://lists.openembedded.org/g/openembedded-core/message/183492
Mute This Topic: https://lists.openembedded.org/mt/99811046/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to