Skip to content

A build error #1071

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

Closed
Cupnfish opened this issue Aug 16, 2020 · 1 comment
Closed

A build error #1071

Cupnfish opened this issue Aug 16, 2020 · 1 comment

Comments

@Cupnfish
Copy link

error[E0412]: cannot find type `pthread_mutex_t` in crate `libc`
  --> src\atomic_shim.rs:10:53
   |
10 | pub static mut __cg_clif_global_atomic_mutex: libc::pthread_mutex_t = libc::PTHREAD_MUTEX_INITIALIZER;
   |                                                     ^^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `PTHREAD_MUTEX_INITIALIZER` in crate `libc`
  --> src\atomic_shim.rs:10:77
   |
10 | pub static mut __cg_clif_global_atomic_mutex: libc::pthread_mutex_t = libc::PTHREAD_MUTEX_INITIALIZER;
   |                                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`

error[E0433]: failed to resolve: could not find `Library` in `unix`
  --> src\driver\jit.rs:15:44
   |
15 |     std::mem::forget(libloading::os::unix::Library::open(Some(cg_dylib), libc::RTLD_NOW | libc::RTLD_GLOBAL).unwrap());
   |                                            ^^^^^^^ not found in `libloading::os::unix`
   |
help: consider importing one of these items
   |
1  | use libloading::Library;
   |
1  | use libloading::os::windows::Library;
   |

error[E0425]: cannot find value `RTLD_NOW` in crate `libc`
  --> src\driver\jit.rs:15:80
   |
15 |     std::mem::forget(libloading::os::unix::Library::open(Some(cg_dylib), libc::RTLD_NOW | libc::RTLD_GLOBAL).unwrap());
   |                                                                                ^^^^^^^^ not found in `libc`

error[E0425]: cannot find value `RTLD_GLOBAL` in crate `libc`
  --> src\driver\jit.rs:15:97
   |
15 |     std::mem::forget(libloading::os::unix::Library::open(Some(cg_dylib), libc::RTLD_NOW | libc::RTLD_GLOBAL).unwrap());
   |                                                                                                 ^^^^^^^^^^^ not found in `libc`

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0412, E0425, E0433.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `rustc_codegen_cranelift`.

To learn more, run the command again with --verbose.

cargo build --release
rustc 1.47.0-nightly (ceedf1d5f 2020-08-08)
cargo 1.47.0-nightly (1653f3546 2020-08-04)
nightly-2020-08-09-x86_64-pc-windows-msvc
Need some pre-operation before compiling?

@bjorn3
Copy link
Member

bjorn3 commented Aug 16, 2020

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

2 participants