Git Product home page Git Product logo

Comments (7)

josephlr avatar josephlr commented on July 29, 2024

This is almost certainly caused by #396

That PR removed certain fallback code on certain Linux CPU architectures (all CPU architectures that aren't ARM, x86, PowerPC, or s390). On such architectures (like mipsel), a sufficiently new kernel is already required. Looking at the list of Rust Targets the mipsel-unknown-linux-gnu target requires kernel 4.4, which should have support for the getrandom syscall.

@lbl8603 to help us debug further:

  • which Rust target are you using (is it mipsel-unknown-linux-gnu)?
  • which Rust version are you using?
  • which Linux distro are you using?
  • which version of the linux kernel are you running on?

from getrandom.

josephlr avatar josephlr commented on July 29, 2024

CC @newpavlov @briansmith (who worked on #396)

from getrandom.

lbl8603 avatar lbl8603 commented on July 29, 2024
  • target: mipsel-unknown-linux-musl
  • Rust version: rustc 1.71.1 (eb26296b5 2023-08-03)
  • linux:
    Linux RM2100 3.4.113 #2 SMP Sat Mar 19 17:12:12 CST 2022 mips GNU/Linux
    Linux version 3.4.113 (root@hiboy-VirtualBox) (gcc version 4.4.7 (GCC) ) #2 SMP Sat Mar 19 17:12:12 CST 2022

from getrandom.

josephlr avatar josephlr commented on July 29, 2024

Looking at the platform list, it seems like the musl targets don't list a minimum kernel version (they just require MUSL 1.2.3 which requires kernel 2.6 or later), while for mipsel-unknown-linux-gnu the minim kernel version is 4.4. I'm wondering if we should reach out to see what the actual minimum supported kernel version for Rust is on -musl targets.

@lbl8603 out of curiosity what system/distro are you running on? Based on the uname it looks like some sort of old router?

@newpavlov @briansmith should we support MUSL systems with kernels older than 3.17?

from getrandom.

newpavlov avatar newpavlov commented on July 29, 2024

Hm, mipsel-unknown-linux-gnu requires kernel 4.4, so we assumed that mipsel-unknown-linux-musl would require it as well. Could you please find an official link that Rust officially supports pre-4.4 kernels for this target?

Adding a MUSL exception looks like an obvious solution for now.

from getrandom.

josephlr avatar josephlr commented on July 29, 2024

Hm, mipsel-unknown-linux-gnu requires kernel 4.4, so we assumed that mipsel-unknown-linux-musl would require it as well. Could you please find an official link that Rust officially supports pre-4.4 kernels for this target?

I'm wondering if MUSL might target an older kernel version. It seems like a lot of the folks who target very old kernels intentionally use MUSL to avoid depending on an ancient glibc.

EDIT: Looking at rust-lang/compiler-team#493 it seems like the only reason Linux 3.2 is even required by rust is to support GLIBC (whose newer versions have that as the minimum kernel version).

from getrandom.

lbl8603 avatar lbl8603 commented on July 29, 2024

Compiling target mipsel-unknown-linux-musl requires using versions prior to Rust 1.71.1. I encountered this bug on the router

from getrandom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.