Skip to content

Multiple Errors While Building WaVe #20

@celinesantosh98

Description

@celinesantosh98

Issue: Multiple Errors While Building WaVe

Hi,

My name is Celine, and I am currently pursuing my Master's from Universität des Saarlandes. I am using WaVe as a part of my thesis, and I encountered several errors while trying to clone and build the project.

Clone Failed Error

Initially, I encountered a clone failed error of submodules as they were cloning using SSH keys. I changed the .gitmodules file to use HTTPS URLs, which resolved the cloning issue.

proc_macro_span_shrink Error

Next, I encountered the following error:

error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /Users/celinesantosh/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.49/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

I resolved this by commenting out the corresponding line in the file.

Missing File Error

Subsequently, I encountered this error:

error: couldn't read src/os/platform/mac.rs: No such file or directory (os error 2)
  --> src/os/mod.rs:16:1
   |
16 | mod platform;
   | ^^^^^^^^^^^^^

It seems like the file name is macos.rs and in the files Mac.rs was specified. So I changed it to macos.rs in all files which eliminated the error.

Multiple Errors in macos.rs

After that, I got a lot of errors:

error: no rules expected the token `mut`
  --> src/tcb/os_specs/platform/macos.rs:26:37
   |
26 |     syscall(pread, fd: usize, buf: &mut [u8], cnt: usize, offset: usize)
   |                                     ^^^ no rules expected this token in macro call
   |
  ::: src/tcb/os_specs/mod.rs:49:1
   |
49 | macro_rules! syscall_spec_gen {
   | ----------------------------- when calling this macro

error: no rules expected the token `[`
  --> src/tcb/os_specs/platform/macos.rs:34:38
   |
34 |     syscall(pwrite, fd: usize, buf: &[u8], cnt: usize, offset: usize)
   |                                      ^ no rules expected this token in macro call
   |
  ::: src/tcb/os_specs/mod.rs:49:1
   |
49 | macro_rules! syscall_spec_gen {
   | ----------------------------- when calling this macro

error: no rules expected the token `libc`
  --> src/tcb/os_specs/platform/macos.rs:40:43
   |
40 |     syscall(allocate, fd: usize, fstore: &libc::fstore_t)
   |                                           ^^^^ no rules expected this token in macro call
   |
  ::: src/tcb/os_specs/mod.rs:49:1
   |
49 | macro_rules! syscall_spec_gen {
   | ----------------------------- when calling this macro

error: no rules expected the token `mut`
  --> src/tcb/os_specs/platform/macos.rs:47:63
   |
47 |     syscall(fstatat64, dirfd: usize, path: [u8; 4096], stat: &mut libc::stat, flags: i32)
   |                                                               ^^^ no rules expected this token in macro call
   |
  ::: src/tcb/os_specs/mod.rs:49:1
   |
49 | macro_rules! syscall_spec_gen {
   | ----------------------------- when calling this macro

error: no rules expected the token `Vec`
  --> src/tcb/os_specs/platform/macos.rs:54:42
   |
54 |     syscall(futimens, fd: usize, specs: &Vec<libc::timespec>)
   |                                          ^^^ no rules expected this token in macro call
   |
  ::: src/tcb/os_specs/mod.rs:49:1
   |
49 | macro_rules! syscall_spec_gen {
   | ----------------------------- when calling this macro

error: no rules expected the token `mut`
  --> src/tcb/os_specs/platform/macos.rs:90:37
   |
90 |     syscall(gettimeofday, timeval: &mut libc::timeval, zero: usize)
   |                                     ^^^ no rules expected this token in macro call
   |
  ::: src/tcb/os_specs/mod.rs:49:1
   |
49 | macro_rules! syscall_spec_gen {
   | ----------------------------- when calling this macro

error: no rules expected the token `mut`
   --> src/tcb/os_specs/platform/macos.rs:125:34
    |
125 |     syscall(rusageself, rusage: &mut libc::rusage)
    |                                  ^^^ no rules expected this token in macro call
    |
   ::: src/tcb/os_specs/mod.rs:49:1
    |
49  | macro_rules! syscall_spec_gen {
    | ----------------------------- when calling this macro

error: no rules expected the token `)`
   --> src/tcb/os_specs/platform/macos.rs:134:29
    |
134 |     syscall(thread_selfusage)
    |                             ^ no rules expected this token in macro call
    |
   ::: src/tcb/os_specs/mod.rs:49:1
    |
49  | macro_rules! syscall_spec_gen {
    | ----------------------------- when calling this macro

error: no rules expected the token `mut`
   --> src/tcb/os_specs/platform/macos.rs:220:52
    |
220 |     syscall(fstat64 ALIAS fstat, fd: usize, stat: &mut libc::stat)
    |                                                    ^^^ no rules expected this token in macro call
    |
   ::: src/tcb/os_specs/mod.rs:49:1
    |
49  | macro_rules! syscall_spec_gen {
    | ----------------------------- when calling this macro

error[E0432]: unresolved import `core::arch::x86_64`
 --> src/stats/timing.rs:1:17
  |
1 | use core::arch::x86_64::{__cpuid_count, __rdtscp, _rdtsc};
  |                 ^^^^^^ could not find `x86_64` in `arch`

error[E0425]: cannot find function `os_allocate` in this scope
  --> src/os/platform/macos.rs:53:13
   |
53 |     let r = os_allocate(os_fd, &fstore);
   |             ^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `os_gettimeofday` in this scope
  --> src/os/platform/macos.rs:78:23
   |
78 |             let ret = os_gettimeofday(&mut tv);
   |                       ^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `os_gettimeofday` in this scope
  --> src/os/platform/macos.rs:99:23
   |
99 |             let ret = os_gettimeofday(&mut real_tv);
   |                       ^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `os_rusageself` in this scope
   --> src/os/platform/macos.rs:113:23
    |
113 |             let ret = os_rusageself(&mut ru);
    |                       ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `os_thread_selfusage` in this scope
   --> src/os/platform/macos.rs:129:23
    |
129 |             let ret = os_thread_selfusage();
    |                       ^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `os_pread` in this scope
   --> src/os/mod.rs:124:13
    |
124 |     let r = os_pread(os_fd, slice, cnt, offset);
    |             ^^^^^^^^ help: a function with a similar name exists: `os_preadv`
    |
   ::: src/tcb/os_specs/mod.rs:60:13
    |
60  |             pub fn [<os_ $name>]($($arg: $type),*) -> isize {
    |             ----------------------------------------------- similarly named function `os_preadv` defined here

error[E0425]: cannot find function `os_pwrite` in this scope
   --> src/os/mod.rs:254:13
    |
254 |     let r = os_pwrite(os_fd, slice, cnt, offset);
    |             ^^^^^^^^^ help: a function with a similar name exists: `os_pwritev`
    |
   ::: src/tcb/os_specs/mod.rs:60:13
    |
60  |             pub fn [<os_ $name>]($($arg: $type),*) -> isize {
    |             ----------------------------------------------- similarly named function `os_pwritev` defined here

error[E0425]: cannot find function `os_fstat` in this scope
   --> src/os/mod.rs:302:13
    |
302 |     let r = os_fstat(os_fd, stat);
    |             ^^^^^^^^ not found in this scope

error[E0425]: cannot find function `os_fstatat` in this scope
   --> src/os/mod.rs:322:13
    |
322 |     let r = os_fstatat(os_fd, path, stat, flags);
    |             ^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `os_futimens` in this scope
   --> src/os/mod.rs:512:13
    |
512 |       let r = os_futimens(os_fd, specs);
    |               ^^^^^^^^^^^ help: a function with a similar name exists: `os_utimensat`
    |
   ::: src/tcb/os_specs/platform/macos.rs:63:1
    |
63  | / pub fn os_utimensat(
64  | |     dirfd: usize,
65  | |     path: [u8; 4096],
66  | |     specs: &Vec<libc::timespec>,
...   |
84  | |     }
85  | | }
    | |_- similarly named function `os_utimensat` defined here

error[E0425]: cannot find value `PREADV` in module `syscall::nr`
   --> src/tcb/os_specs/mod.rs:63:48
    |
63  |                   let result = unsafe { syscall!([<$name:upper>], $(arg_converter!($arg: $type)),*) as isize };
    |                                                  ^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `PREAD`
...
156 | / syscall_spec_gen! {
157 | |     trace;
158 | |     ensures((
159 | |         trace.len() == old(trace.len() + buf.len()) &&
...   |
173 | |     syscall(preadv, fd: usize, buf: (&NativeIoVecs), iovcnt: usize, offset: usize)
174 | | }
    | |_- in this macro invocation
    |
   ::: /Users/celinesantosh/.cargo/git/checkouts/system-call.rs-d3ba18a5a1a818aa/5161ba2/src/platform/macos-aarch64/nr.rs:109:1
    |
109 |   pub const PREAD: usize = 153;
    |   ----------------------------- similarly named constant `PREAD` defined here
    |
    = note: this error originates in the macro `syscall_spec_gen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find value `PWRITEV` in module `syscall::nr`
   --> src/tcb/os_specs/mod.rs:63:48
    |
63  |                   let result = unsafe { syscall!([<$name:upper>], $(arg_converter!($arg: $type)),*) as isize };
    |                                                  ^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `PWRITE`
...
176 | / syscall_spec_gen! {
177 | |     trace;
178 | |     ensures((
179 | |         trace.len() == old(trace.len() + buf.len()) &&
...   |
193 | |     syscall(pwritev, fd: usize, buf: (&NativeIoVecs), iovcnt: usize, offset: usize)
194 | | }
    | |_- in this macro invocation
    |
   ::: /Users/celinesantosh/.cargo/git/checkouts/system-call.rs-d3ba18a5a1a818aa/5161ba2/src/platform/macos-aarch64/nr.rs:110:1
    |
110 |   pub const PWRITE: usize = 154;
    |   ------------------------------ similarly named constant `PWRITE` defined here
    |
    = note: this error originates in the macro `syscall_spec_gen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find function `syscall5` in crate `syscall`
   --> src/tcb/os_specs/mod.rs:228:1
    |
228 | / syscall_spec_gen! {
229 | |     trace;
230 | |     ensures((effects!(old(trace), trace, effect!(FdAccess),
231 | |         effect!(FdAccess),
...   |
235 | |     syscall(linkat, old_fd: usize, old_path: [u8; 4096], new_fd: usize, new_path: [u8; 4096], flags: i32)
236 | | }
    | |_^ help: a function with a similar name exists: `syscall0`
    |
   ::: /Users/celinesantosh/.cargo/git/checkouts/system-call.rs-d3ba18a5a1a818aa/5161ba2/src/platform/macos-aarch64/mod.rs:7:1
    |
7   |   pub unsafe fn syscall0(n: usize) -> usize {
    |   ----------------------------------------- similarly named function `syscall0` defined here
    |

Any help would be appreciated
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions