Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build failed #118

Closed
xNxExOx opened this issue Mar 25, 2019 · 9 comments
Closed

Windows build failed #118

xNxExOx opened this issue Mar 25, 2019 · 9 comments

Comments

@xNxExOx
Copy link

xNxExOx commented Mar 25, 2019

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
Copy link

imkow commented Apr 12, 2019

I encountered the same problem.

@johnwaltonvi
Copy link

Same,. did you find a fix?

@ms705
Copy link
Member

ms705 commented Jul 3, 2019

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.).

@ms705 ms705 closed this as completed Jul 3, 2019
@NyxCode
Copy link

NyxCode commented Jul 16, 2019

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
Copy link
Contributor

jonhoo commented Jul 16, 2019

I think in theory all that should be needed is for @fintelia to land fintelia/timekeeper#3. ping?

@jonhoo
Copy link
Contributor

jonhoo commented Jul 16, 2019

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

@fintelia
Copy link
Member

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

@jonhoo
Copy link
Contributor

jonhoo commented Jul 16, 2019

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 jonhoo/tokio-os-timer#9

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

jonhoo added a commit that referenced this issue Jul 16, 2019
@disks86
Copy link

disks86 commented Jul 26, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants