mit-pdos / noria

Fast web applications through dynamic, partially-stateful dataflow
Apache License 2.0
4.99k stars 244 forks source link

Windows build failed #118

Closed xNxExOx closed 5 years ago

xNxExOx commented 5 years ago
error[E0412]: cannot find type `clockid_t` in module `libc`
  --> C:\Users\xxxku\.cargo\registry\src\github.com-1ecc6299db9ec823\timekeeper-0.3.0\src\source.rs:26:31
   |
26 | fn clock_gettime(clock: libc::clockid_t) -> Result<libc::timespec, ()> {
   |                               ^^^^^^^^^ help: a type alias with a similar name exists: `clock_t`

error[E0425]: cannot find function `clock_gettime` in module `libc`
  --> C:\Users\xxxku\.cargo\registry\src\github.com-1ecc6299db9ec823\timekeeper-0.3.0\src\source.rs:33:15
   |
33 |         libc::clock_gettime(clock, &mut tp)
   |               ^^^^^^^^^^^^^ not found in `libc`
help: possible candidate is found in another module, you can import it into scope
   |
2  | use source::clock_gettime;
   |

error[E0425]: cannot find value `CLOCK_PROCESS_CPUTIME_ID` in module `libc`
  --> C:\Users\xxxku\.cargo\registry\src\github.com-1ecc6299db9ec823\timekeeper-0.3.0\src\source.rs:47:40
   |
47 |         let time = clock_gettime(libc::CLOCK_PROCESS_CPUTIME_ID).unwrap();
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `CLOCK_THREAD_CPUTIME_ID` in module `libc`
  --> C:\Users\xxxku\.cargo\registry\src\github.com-1ecc6299db9ec823\timekeeper-0.3.0\src\source.rs:56:40
   |
56 |         let time = clock_gettime(libc::CLOCK_THREAD_CPUTIME_ID).unwrap();
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`

error: aborting due to 4 previous errors

Some errors occurred: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.
error: Could not compile `timekeeper`.
warning: build failed, waiting for other jobs to finish...
error: build failed
imkow commented 5 years ago

I encountered the same problem.

johnwaltonvi commented 5 years ago

Same,. did you find a fix?

ms705 commented 5 years ago

Windows support is not a priority for us, unfortunately.

It looks like the problem here is the timekeeper dependency, which we only use for profiling. If you wanted to make a Windows build work, you could probably make including this dependency and any code related to it conditional on the platform with Rust's builtin support for conditional compilation (cfg!(windows) etc.).

NyxCode commented 5 years ago

This is unfortunate. Could we put the timekeeper dependency / profiling behind a feature-flag? I get that windows support is not a priority, but it's almost tragic that the build breaks because of an unmaintained dependency..

jonhoo commented 5 years ago

I think in theory all that should be needed is for @fintelia to land https://github.com/fintelia/timekeeper/pull/3. ping?

jonhoo commented 5 years ago

Excellent, that just landed. Thanks @fintelia. Once a release is published I'll bump dependencies and see if CI then passes on Windows!

fintelia commented 5 years ago

Just published timekeeper v0.3.1. Sorry for the delay on this, it somehow slipped off my radar

jonhoo commented 5 years ago

Aww, looks like we now fail because Windows doesn't have reasonable asynchronous timers :'( https://dev.azure.com/mit-pdos/mit-pdos/_build/results?buildId=3&view=logs&s=859b8d9a-8fd6-5a5c-6f5e-f84f1990894e&j=fb8c8813-bce5-562f-fee6-ee0e905e89a4

See https://github.com/jonhoo/tokio-os-timer/issues/9

That's not going to change any time soon sadly.

disks86 commented 5 years ago

Even just the server fails to build due to the jemalloc-sys dependency. BuildError.txt