Giter VIP home page Giter VIP logo

os2022exps's Introduction

os2022exps

操作系统2022版实验

os2022exps's People

Contributors

ruiatgithub avatar sotinyatgithub avatar

Stargazers

AOIAN avatar noionion avatar

Watchers

James Cloos avatar  avatar

Forkers

2x-ercha joyxu

os2022exps's Issues

解决实验一rust-lld: error: undefined symbol: LD_STACK_PTR报错和couldn't find crate `core` with expected target triple aarch64-unknown-none-softfloat-5103292167306961306报错

  1. 编译命令修改为

    cargo build --target aarch64-unknown-none-softfloat.json
  2. 项目目录下新建.cargo/config.toml文件,内容如下

    [unstable]
    build-std = ["core", "compiler_builtins"] 

原先编译命令

cargo build --target aarch64-unknown-none-softfloat

会报错如下:

error: linking with rust-lld failed: exit status: 1
|
= note: "rust-lld" "-flavor" "gnu" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.358o59hkt7efruo.rcgu.o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.4t21rnm557dy8f08.rcgu.o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.51shtnl9jrmqr2vu.rcgu.o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.5a7lwex1qifr7uk6.rcgu.o" "--as-needed" "-L" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps" "-L" "/home/yuanzhiqiu/os/yzqos_armv8/target/debug/deps" "-L" "/home/yuanzhiqiu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-none-softfloat/lib" "-Bstatic" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/librustc_std_workspace_core-1dcf6d93b6d407a2.rlib" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/libcore-1bf904a56375861d.rlib" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/libcompiler_builtins-4f3ab19918958b56.rlib" "-Bdynamic" "--eh-frame-hdr" "-znoexecstack" "-L" "/home/yuanzhiqiu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-none-softfloat/lib" "-o" "/home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276" "--gc-sections"
= note: rust-lld: error: undefined symbol: LD_STACK_PTR
>>> referenced by 5a7lwex1qifr7uk6
>>> /home/yuanzhiqiu/os/yzqos_armv8/target/aarch64-unknown-none-softfloat/debug/deps/yzqos_armv8-b39476ede8baa276.5a7lwex1qifr7uk6.rcgu.o:(.text.boot+0x18)

error: could not compile yzqos_armv8 due to previous error

修改编译命令但不新增.cargo/config.toml文件的话报错如下:

cargo build --target aarch64-unknown-none-softfloat.json
Compiling yzqos_armv8 v0.1.0 (/home/yuanzhiqiu/os/yzqos_armv8)
warning: target json file contains unused fields: abi-blacklist

error[E0461]: couldn't find crate core with expected target triple aarch64-unknown-none-softfloat-5103292167306961306
|
= note: the following crate versions were found:
crate core, target triple aarch64-unknown-none-softfloat: /home/yuanzhiqiu/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/aarch64-unknown-none-softfloat/lib/libcore-ac4407b588a64e53.rlib

warning: yzqos_armv8 (bin "yzqos_armv8") generated 1 warning
error: could not compile yzqos_armv8 due to previous error; 1 warning emitted

关于编译命令,想更为方便的话,可以如下配置:

.cargo/config.toml文件中添加内容:

[build]
target = "aarch64-unknown-none-softfloat.json"

则编译命令只需

cargo build

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.