Skip to content

Instantly share code, notes, and snippets.

@Stary2001
Last active December 26, 2017 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stary2001/14d69e544e42c7b21530b7545a24bfc3 to your computer and use it in GitHub Desktop.
Save Stary2001/14d69e544e42c7b21530b7545a24bfc3 to your computer and use it in GitHub Desktop.
issue w/ cargo + local crates
[package]
name = "kernel_amd64"
version = "0.0.1"
authors = ["Ezekiel Bethel <zek@9net.org>"]
[lib]
crate-type = ["staticlib"]
[dependencies]
volatile = "0.1.0"
spin = "0.4.6"
[[package]]
name = "compiler_builtins"
version = "0.1.0"
source = "git+https://github.com/rust-lang-nursery/compiler-builtins#0ba07e49264a54cb5bbd4856fcea083bb3fbec15"
[[package]]
name = "kernel"
version = "0.0.1"
dependencies = [
"compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins)",
"kernel_amd64 0.0.1",
"rlibc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"spin 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"volatile 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "kernel_amd64"
version = "0.0.1"
dependencies = [
"spin 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"volatile 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rlibc"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "spin"
version = "0.4.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "volatile"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum compiler_builtins 0.1.0 (git+https://github.com/rust-lang-nursery/compiler-builtins)" = "<none>"
"checksum rlibc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe"
"checksum spin 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7e4deb3c2455c73779e6d3eebceae9599fc70957e54c69fe88f93aa48e62f432"
"checksum volatile 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37c5d76c0f40ba4f8ac10ec4717d4e98ce3e58c5607eea36e9464226fc5e0a95"
[package]
name = "kernel"
version = "0.0.1"
authors = ["Ezekiel Bethel <zek@9net.org>"]
[lib]
crate-type = ["staticlib"]
[dependencies]
volatile = "0.1.0"
rlibc = "1.0"
spin = "0.4.6"
compiler_builtins = { git = "https://github.com/rust-lang-nursery/compiler-builtins" }
kernel_amd64 = { path = "../amd64"}
{
"llvm-target": "x86_64-unknown-none",
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
"linker-flavor": "gcc",
"target-endian": "little",
"target-pointer-width": "64",
"target-c-int-width": "32",
"arch": "x86_64",
"os": "none",
"disable-redzone": true,
"features": "-mmx,-sse,+soft-float",
"panic-strategy": "abort"
}
[stary@laptop kernel]$ xargo clean
[stary@laptop kernel]$ xargo build --target=x86_64-tiny_os -v
+ "rustc" "--print" "sysroot"
+ "rustc" "--print" "target-list"
+ "cargo" "build" "--target=x86_64-tiny_os" "-v"
   Compiling spin v0.4.6
   Compiling compiler_builtins v0.1.0 (https://github.com/rust-lang-nursery/compiler-builtins#0ba07e49)
   Compiling volatile v0.1.0
   Compiling rlibc v1.0.0
     Running `rustc --crate-name spin /home/stary/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.4.6/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="asm"' --cfg 'feature="const_fn"' --cfg 'feature="core_intrinsics"' --cfg 'feature="default"' --cfg 'feature="once"' --cfg 'feature="unstable"' -C metadata=f3723db8759b0ad7 -C extra-filename=-f3723db8759b0ad7 --out-dir /home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps --target x86_64-tiny_os -L dependency=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --cap-lints allow --sysroot /home/stary/.xargo`
     Running `rustc --crate-name volatile /home/stary/.cargo/registry/src/github.com-1ecc6299db9ec823/volatile-0.1.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=602eb9682a1340d8 -C extra-filename=-602eb9682a1340d8 --out-dir /home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps --target x86_64-tiny_os -L dependency=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --cap-lints allow --sysroot /home/stary/.xargo`
     Running `rustc --crate-name build_script_build /home/stary/.cargo/git/checkouts/compiler-builtins-ec094dc45a0179c8/0ba07e4/build.rs --crate-type bin --emit=dep-info,link -C debuginfo=2 --cfg 'feature="compiler-builtins"' --cfg 'feature="default"' -C metadata=b1ed9afc6079add5 -C extra-filename=-b1ed9afc6079add5 --out-dir /home/stary/develop/rust_os/kernel/./build/target/debug/build/compiler_builtins-b1ed9afc6079add5 -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --cap-lints allow`
     Running `rustc --crate-name rlibc /home/stary/.cargo/registry/src/github.com-1ecc6299db9ec823/rlibc-1.0.0/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=cde5608b7577557f -C extra-filename=-cde5608b7577557f --out-dir /home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps --target x86_64-tiny_os -L dependency=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --cap-lints allow --sysroot /home/stary/.xargo`
   Compiling kernel_amd64 v0.0.1 (file:///home/stary/develop/rust_os/amd64)
     Running `rustc --crate-name kernel_amd64 /home/stary/develop/rust_os/amd64/src/lib.rs --crate-type staticlib --emit=dep-info,link -C debuginfo=2 -C metadata=2c0634c9f42a23ce -C extra-filename=-2c0634c9f42a23ce --out-dir /home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps --target x86_64-tiny_os -C incremental=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/incremental -L dependency=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --extern volatile=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libvolatile-602eb9682a1340d8.rlib --extern spin=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libspin-f3723db8759b0ad7.rlib --sysroot /home/stary/.xargo`
warning: method is never used: `clear`
  --> /home/stary/develop/rust_os/amd64/src/vga_console.rs:99:2
   |
99 |     fn clear(&mut self)
   |     ^^^^^^^^^^^^^^^^^^^
   |
   = note: #[warn(dead_code)] on by default

     Running `/home/stary/develop/rust_os/kernel/./build/target/debug/build/compiler_builtins-b1ed9afc6079add5/build-script-build`
     Running `rustc --crate-name compiler_builtins /home/stary/.cargo/git/checkouts/compiler-builtins-ec094dc45a0179c8/0ba07e4/src/lib.rs --crate-type lib --emit=dep-info,link -C debuginfo=2 --cfg 'feature="compiler-builtins"' --cfg 'feature="default"' -C metadata=64594809de680055 -C extra-filename=-64594809de680055 --out-dir /home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps --target x86_64-tiny_os -L dependency=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --cap-lints allow --sysroot /home/stary/.xargo`
   Compiling kernel v0.0.1 (file:///home/stary/develop/rust_os/kernel)
     Running `rustc --crate-name kernel src/lib.rs --crate-type staticlib --emit=dep-info,link -C debuginfo=2 -C metadata=547bd5a8db351559 -C extra-filename=-547bd5a8db351559 --out-dir /home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps --target x86_64-tiny_os -C incremental=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/incremental -L dependency=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --extern spin=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libspin-f3723db8759b0ad7.rlib --extern volatile=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libvolatile-602eb9682a1340d8.rlib --extern rlibc=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/librlibc-cde5608b7577557f.rlib --extern compiler_builtins=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libcompiler_builtins-64594809de680055.rlib --sysroot /home/stary/.xargo`
error[E0463]: can't find crate for `kernel_amd64`
  --> src/lib.rs:11:1
   |
11 | extern crate kernel_amd64;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

error: aborting due to previous error

error: Could not compile `kernel`.

Caused by:
  process didn't exit successfully: `rustc --crate-name kernel src/lib.rs --crate-type staticlib --emit=dep-info,link -C debuginfo=2 -C metadata=547bd5a8db351559 -C extra-filename=-547bd5a8db351559 --out-dir /home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps --target x86_64-tiny_os -C incremental=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/incremental -L dependency=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps -L dependency=/home/stary/develop/rust_os/kernel/./build/target/debug/deps --extern spin=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libspin-f3723db8759b0ad7.rlib --extern volatile=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libvolatile-602eb9682a1340d8.rlib --extern rlibc=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/librlibc-cde5608b7577557f.rlib --extern compiler_builtins=/home/stary/develop/rust_os/kernel/./build/target/x86_64-tiny_os/debug/deps/libcompiler_builtins-64594809de680055.rlib --sysroot /home/stary/.xargo` (exit code: 101)
[stary@laptop kernel]$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment