theseus-os / Theseus

Theseus is a modern OS written from scratch in Rust that explores ๐ข๐ง๐ญ๐ซ๐š๐ฅ๐ข๐ง๐ ๐ฎ๐š๐ฅ ๐๐ž๐ฌ๐ข๐ ๐ง: closing the semantic gap between compiler and hardware by maximally leveraging the power of language safety and affine types. Theseus aims to shift OS responsibilities like resource management into the compiler.

Home Page:https://www.theseus-os.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compilation failed for aarch64

kavan-mevada opened this issue ยท comments

commented
   Compiling tls_initializer v0.1.0 (/home/kavan/Theseus/kernel/tls_initializer)
error[E0425]: cannot find value `TPIDR_EL0` in this scope
   --> kernel/tls_initializer/src/lib.rs:299:9
    |
299 |         TPIDR_EL0.set(self.ptr as u64);
    |         ^^^^^^^^^
    |
   ::: /home/kavan/.cargo/registry/src/github.com-1ecc6299db9ec823/cortex-a-7.5.0/src/registers/tpidr_el1.rs:31:1
    |
31  | pub const TPIDR_EL1: Reg = Reg {};
    | ------------------------ similarly named constant `TPIDR_EL1` defined here
    |
help: a constant with a similar name exists
    |
299 |         TPIDR_EL1.set(self.ptr as u64);
    |         ~~~~~~~~~
help: consider importing this constant
    |
14  | use cortex_a::registers::TPIDR_EL0;
    |

warning: unused import: `cortex_a::registers::TPIDR_EL1`
  --> kernel/tls_initializer/src/lib.rs:25:5
   |
25 |     cortex_a::registers::TPIDR_EL1,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused import: `tock_registers::interfaces::Writeable`
  --> kernel/tls_initializer/src/lib.rs:26:5
   |
26 |     tock_registers::interfaces::Writeable,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0425`.
warning: `tls_initializer` (lib) generated 2 warnings
error: could not compile `tls_initializer` due to previous error; 2 warnings emitted
warning: build failed, waiting for other jobs to finish...
make: *** [Makefile:317: cargo] Error 101
make ARCH=aarch64 FEATURES= CROSS=aarch64-linux-gnu- run -j1  572.77s user 40.00s system 244% cpu 4:10.82 total

Can I use TPIDR_EL1 there as suggested ?

Thanks for identifying this, we made a mistake yesterday in some TLS-related changes. Oops!