AmbiML/sparrow-cantrip-full

m simulate fails

Neccolini opened this issue · 2 comments

I encountered compilation errors while attempting to run m simulate. Here are the details:

[1/75] cd /home/shunnagasaki/git/sel4-rust/sparrow/cantrip/projects/capdl/cantrip-os-rootserver && /usr/bin/cmake -E env RUSTFLAGS=-Z\ tls-model=local-exec cargo +nightly-2023-01-26 build --target aarch64-unknown-none --features CONFIG_PLAT_BCM2837 -Z unstable-options -Z avoid-dev-deps --release --target-dir /home/shunnagasaki/git/sel4-rust/sparrow/out/cantrip/aarch64-unknown-elf/release/capdl/cantrip-os-rootserver --out-dir /home/shunnagasaki/git/sel4-rust/sparrow/out/cantrip/aarch64-unknown-elf/release/capdl/cantrip-os-rootserver
FAILED: capdl/cantrip-os-rootserver/CMakeFiles/cantrip_rootserver_custom capdl/cantrip-os-rootserver/libcantrip_os_rootserver.a /home/shunnagasaki/git/sel4-rust/sparrow/out/cantrip/aarch64-unknown-elf/release/capdl/cantrip-os-rootserver/CMakeFiles/cantrip_rootserver_custom /home/shunnagasaki/git/sel4-rust/sparrow/out/cantrip/aarch64-unknown-elf/release/capdl/cantrip-os-rootserver/libcantrip_os_rootserver.a 
cd /home/shunnagasaki/git/sel4-rust/sparrow/cantrip/projects/capdl/cantrip-os-rootserver && /usr/bin/cmake -E env RUSTFLAGS=-Z\ tls-model=local-exec cargo +nightly-2023-01-26 build --target aarch64-unknown-none --features CONFIG_PLAT_BCM2837 -Z unstable-options -Z avoid-dev-deps --release --target-dir /home/shunnagasaki/git/sel4-rust/sparrow/out/cantrip/aarch64-unknown-elf/release/capdl/cantrip-os-rootserver --out-dir /home/shunnagasaki/git/sel4-rust/sparrow/out/cantrip/aarch64-unknown-elf/release/capdl/cantrip-os-rootserver
warning: file `/home/shunnagasaki/git/sel4-rust/sparrow/cantrip/projects/capdl/cantrip-os-rootserver/src/main.rs` found to be present in multiple build targets:
  * `lib` target `cantrip_os_rootserver`
  * `bin` target `cantrip-os-rootserver`
    Blocking waiting for file lock on package cache
    Updating crates.io index
    Updating git repository `https://github.com/rcore-os/cpio`
    Blocking waiting for file lock on package cache
    Blocking waiting for file lock on package cache
   Compiling static_assertions v1.1.0
   Compiling cfg-if v1.0.0
   Compiling scopeguard v1.1.0
   Compiling log v0.4.19
   Compiling memchr v2.5.0
   Compiling cty v0.2.2
   Compiling postcard-cobs v0.1.5-pre
   Compiling linked_list_allocator v0.10.5
   Compiling serde_derive v1.0.164
   Compiling num_enum_derive v0.6.1
   Compiling cpio v0.1.0 (https://github.com/rcore-os/cpio#16ad88f8)
   Compiling smallvec v1.10.0
error[E0463]: can't find crate for `core`
  |
  = note: the `aarch64-unknown-none` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-unknown-none`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0463]: can't find crate for `compiler_builtins`

error[E0463]: can't find crate for `core`
   --> /home/shunnagasaki/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-1.1.0/src/lib.rs:192:1
    |
192 | extern crate core as std;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
    |
    = note: the `aarch64-unknown-none` target may not be installed
    = help: consider downloading the target with `rustup target add aarch64-unknown-none`
    = help: consider building the standard library from source with `cargo build -Zbuild-std`

error: cannot find macro `stringify` in this scope
   --> /home/shunnagasaki/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-1.1.0/src/lib.rs:470:24
    |
470 |         f.debug_struct(stringify!(ScopeGuard))
    |                        ^^^^^^^^^

error: cannot find attribute `derive` in this scope
   --> /home/shunnagasaki/.cargo/registry/src/github.com-1ecc6299db9ec823/scopeguard-1.1.0/src/lib.rs:212:3
    |
212 | #[derive(Debug)]
    |   ^^^^^^

For more information about this error, try `rustc --explain E0463`.
error[E0463]: can't find crate for `core`
   --> /home/shunnagasaki/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.4.19/src/lib.rs:333:1
    |
333 | extern crate core as std;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
    |
    = note: the `aarch64-unknown-none` target may not be installed
    = help: consider downloading the target with `rustup target add aarch64-unknown-none`
    = help: consider building the standard library from source with `cargo build -Zbuild-std`

.
.
.

I tried running rustup target add aarch64-unknown-none, but it didn't work.

Emvironments
OS: Ubuntu 22.04.2 LTS
CPU: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz

Thanks for your reply. It seems that the problem above has been resolved. However, a new error has occurred.

[7/55] Linking C executable capdl-loader
FAILED: capdl-loader 
: && /usr/bin/ccache /home/shunnagasaki/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc --sysroot=/home/shunnagasaki/git/sel4-rust/sparrow2/out/cantrip/aarch64-unknown-elf/release  -march=armv8-a+crc   -D__KERNEL_64__ -O3 -DNDEBUG -D__KERNEL_64__   -Wl,--gc-sections  -static -nostdlib -z max-page-size=0x1000    -Wl,-u_sel4_start -Wl,-e_sel4_start  -Wl,-T /home/shunnagasaki/git/sel4-rust/sparrow2/cantrip/tools/seL4/cmake-tool/helpers/tls_rootserver.lds /home/shunnagasaki/git/sel4-rust/sparrow2/out/cantrip/aarch64-unknown-elf/release/lib/crt0.o /home/shunnagasaki/git/sel4-rust/sparrow2/out/cantrip/aarch64-unknown-elf/release/lib/crti.o /home/shunnagasaki/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/12.2.1/crtbegin.o capdl-loader_archive.o CMakeFiles/capdl-loader.dir/capdl_spec.c.obj -Wl,--start-group         -lgcc -lgcc_eh  capdl/cantrip-os-rootserver/libcantrip_os_rootserver.a  sel4runtime/libsel4runtime.a  seL4_libs/libsel4utils/libsel4utils.a  seL4_libs/libsel4platsupport/libsel4platsupport.a  sel4runtime/libsel4runtime.a  util_libs/libplatsupport/libplatsupport.a  util_libs/libfdt/libfdt.a  -Wl,--undefined=arm_gic_ptr,--undefined=tegra_ictlr_ptr,--undefined=arm_gicv3_ptr,--undefined=fsl_avic_ptr,--undefined=ti_omap3_ptr  seL4_libs/libsel4simple-default/libsel4simple-default.a  seL4_libs/libsel4vspace/libsel4vspace.a  seL4_libs/libsel4simple/libsel4simple.a  seL4_libs/libsel4vka/libsel4vka.a  seL4_libs/libsel4debug/libsel4debug.a  libsel4/libsel4.a  util_libs/libutils/libutils.a  util_libs/libelf/libelf.a  musllibc/build-temp/stage/lib/libc.a  util_libs/libcpio/libcpio.a -Wl,--end-group /home/shunnagasaki/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/12.2.1/crtend.o /home/shunnagasaki/git/sel4-rust/sparrow2/out/cantrip/aarch64-unknown-elf/release/lib/crtn.o -o capdl-loader && :
/home/shunnagasaki/arm-gnu-toolchain-12.2.rel1-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/12.2.1/../../../../aarch64-none-linux-gnu/bin/ld: musllibc/build-temp/stage/lib/libc.a(fflush.o): copy relocation against non-copyable protected symbol `__stdout_used'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
make: *** [/home/shunnagasaki/git/sel4-rust/sparrow2/build/cantrip.mk:149: /home/shunnagasaki/git/sel4-rust/sparrow2/out/cantrip/aarch64-unknown-elf/release/kernel/kernel.elf] Error 1