Build error: could not compile `panic_abort` and `unwind`
Description
Could not compile panic_abort
and unwind
after running make all
.
Environment info
Linux Rex 5.1.8-1-MANJARO #1 SMP PREEMPT Sun Jun 9 20:44:14 UTC 2019 x86_64 GNU/Linux
make all
rm -f build/libkernel.a
rm -rf build/initfs
mkdir -p build/initfs
export PATH="/home/vitalyr/projects/rust/redox/prefix/x86_64-unknown-redox/relibc-install/bin:$PATH" && \
cargo run --manifest-path installer/Cargo.toml -- --cookbook=cookbook -c initfs.toml build/initfs/
Finished dev [unoptimized + debuginfo] target(s) in 0.11s
Running `installer/target/debug/redox_installer --cookbook=cookbook -c initfs.toml build/initfs/`
Install Config {
general: GeneralConfig {
prompt: false,
},
packages: {
"drivers": PackageConfig {
version: None,
git: None,
path: None,
},
"init": PackageConfig {
version: None,
git: None,
path: None,
},
"nulld": PackageConfig {
version: None,
git: None,
path: None,
},
"randd": PackageConfig {
version: None,
git: None,
path: None,
},
"redoxfs": PackageConfig {
version: None,
git: None,
path: None,
},
"zerod": PackageConfig {
version: None,
git: None,
path: None,
},
},
files: [
FileConfig {
path: "/etc/init.rc",
data: "export PATH /bin\nexport TMPDIR /tmp\nnulld\nzerod\nrandd\nvesad T T G\nstdio display:1\nps2d us\npcid /etc/pcid/initfs.toml\nredoxfs --uuid $REDOXFS_UUID file\ncd file:\nexport PATH file:/bin\nrun.d /etc/init.d\n",
symlink: false,
directory: false,
mode: None,
uid: None,
gid: None,
},
],
users: {},
} to build/initfs/
repo - building drivers
cook - drivers build
Updating crates.io index
Compiling cc v1.0.37
Compiling core v0.0.0 (/home/vitalyr/projects/rust/redox/rust/src/libcore)
Compiling libc v0.2.54 (/home/vitalyr/projects/rust/redox/cookbook/patches/liblibc)
Compiling unwind v0.0.0 (/home/vitalyr/projects/rust/redox/rust/src/libunwind)
Compiling compiler_builtins v0.1.16
Compiling std v0.0.0 (/home/vitalyr/projects/rust/redox/rust/src/libstd)
Compiling rustc-std-workspace-core v1.0.0 (/home/vitalyr/projects/rust/redox/rust/src/tools/rustc-std-workspace-core)
warning: the feature `cfg_target_vendor` has been stable since 1.33.0 and no longer requires an attribute to enable
--> /home/vitalyr/projects/rust/redox/cookbook/patches/liblibc/src/lib.rs:22:13
|
22 | feature(cfg_target_vendor, link_cfg, no_core)
| ^^^^^^^^^^^^^^^^^
|
= note: #[warn(stable_features)] on by default
warning: unused attribute
--> /home/vitalyr/projects/rust/redox/cookbook/patches/liblibc/src/lib.rs:27:1
|
27 | #![no_std]
| ^^^^^^^^^^
|
= note: #[warn(unused_attributes)] on by default
warning: crate-level attribute should be in the root module
--> /home/vitalyr/projects/rust/redox/cookbook/patches/liblibc/src/lib.rs:27:1
|
27 | #![no_std]
| ^^^^^^^^^^
Compiling alloc v0.0.0 (/home/vitalyr/projects/rust/redox/rust/src/liballoc)
Compiling rustc-demangle v0.1.15
Compiling panic_abort v0.0.0 (/home/vitalyr/projects/rust/redox/rust/src/libpanic_abort)
error[E0432]: unresolved imports `libc::c_int`, `libc::c_void`, `libc::uintptr_t`
--> /home/vitalyr/projects/rust/redox/rust/src/libunwind/libunwind.rs:8:12
|
8 | use libc::{c_int, c_void, uintptr_t};
| ^^^^^ ^^^^^^ ^^^^^^^^^ no `uintptr_t` in the root
| | |
| | no `c_void` in the root
| no `c_int` in the root
error[E0425]: cannot find function `abort` in this scope
--> /home/vitalyr/projects/rust/redox/rust/src/libpanic_abort/lib.rs:45:5
|
45 | abort();
| ^^^^^ not found in this scope
help: possible candidates are found in other modules, you can import them into scope
|
24 | use core::intrinsics::abort;
|
24 | use core::intrinsics::abort;
|
error[E0308]: mismatched types
--> /home/vitalyr/projects/rust/redox/rust/src/libpanic_abort/lib.rs:44:61
|
44 | pub unsafe extern fn __rust_start_panic(_payload: usize) -> u32 {
| ------------------ ^^^ expected u32, found ()
| |
| this function's body doesn't return
45 | abort();
| - help: consider removing this semicolon
|
= note: expected type `u32`
found type `()`
error: aborting due to 2 previous errors
Some errors occurred: E0308, E0425.
For more information about an error, try `rustc --explain E0308`.
error: Could not compile `panic_abort`.
warning: build failed, waiting for other jobs to finish...
error: aborting due to previous error
For more information about this error, try `rustc --explain E0432`.
error: Could not compile `unwind`.
warning: build failed, waiting for other jobs to finish...
error: build failed
error: `"cargo" "build" "--release" "--manifest-path" "/tmp/xargo.1B6OcA0jHrrW/Cargo.toml" "--target" "x86_64-unknown-redox" "-p" "std"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
./repo.sh failed.make: *** [mk/initfs.mk:5:build/initfs.tag] 错误 1
Related to: