Coder Social home page Coder Social logo

Comments (5)

bjorn3 avatar bjorn3 commented on August 15, 2024

I think you need to update

const LINUX_VERSION: &str = "v5.17";
to a version of linux which supports Loongarch64 and then regenerate the bindings.

from linux-raw-sys.

sunfishcode avatar sunfishcode commented on August 15, 2024

Currently all the users of linux-raw-sys that I know of only depend on it on architectures which it supports. Can you say more about the context where you're seeing this error?

from linux-raw-sys.

asheplyakov avatar asheplyakov commented on August 15, 2024

I've got the same error when cross-compiling a native rust according to this instruction.

Building tool cargo (stage1:x86_64-unknown-linux-gnu -> stage2:loongarch64-unknown-linux-gnu)
   Compiling linux-raw-sys v0.1.4
error[E0432]: unresolved import `crate::general`
  --> /usr/src/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linux-raw-sys-0.1.4/src/lib.rs:84:16
   |
84 |     use crate::general::{cmsghdr, msghdr};
   |                ^^^^^^^ could not find `general` in the crate root

error[E0433]: failed to resolve: use of undeclared crate or module `general`
  --> /usr/src/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linux-raw-sys-0.1.4/src/lib.rs:67:20
   |
67 | impl PartialEq for general::__kernel_timespec {
   |                    ^^^^^^^ use of undeclared crate or module `general`

error[E0433]: failed to resolve: use of undeclared crate or module `general`
  --> /usr/src/.cargo/registry/src/index.crates.io-6f17d22bba15001f/linux-raw-sys-0.1.4/src/lib.rs:79:13
   |
79 | impl Eq for general::__kernel_timespec {}
   |             ^^^^^^^ use of undeclared crate or module `general`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `linux-raw-sys` (lib) due to 3 previous errors

from linux-raw-sys.

heiher avatar heiher commented on August 15, 2024

@asheplyakov The Loongarch support starts from linux-raw-sys v0.3.2. I think you can fetch rust binaries for LoongArch from official using rustup. If you need to cross compile, please refer to this: https://github.com/rust-lang/rust/tree/master/src/ci/docker/host-x86_64/dist-loongarch64-linux

rustup-init (LoongArch): https://github.com/loongarch-rs/tools/releases/tag/rustup-20230525

from linux-raw-sys.

sunfishcode avatar sunfishcode commented on August 15, 2024

As mentioned in the previous comment, loongarch64 is now supported. Please file new issues if there are any problems!

from linux-raw-sys.

Related Issues (10)

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.