xd009642 / tarpaulin

A code coverage tool for Rust projects
https://crates.io/crates/cargo-tarpaulin
Apache License 2.0
2.5k stars 180 forks source link

cargo install cargo-tarpaulin failing on rust stable and nightly channels (v0.14.3) #555

Closed karisair closed 4 years ago

karisair commented 4 years ago

Hi there,

I'm trying to install tarpaulin, but I'm getting 30 errors, I'm presuming changes in the dependencies. I'm running macOS Catalina 10.15.6.

Here's the log:

cargo install cargo-tarpaulin
Updating crates.io index Installing cargo-tarpaulin v0.14.3 Compiling libc v0.2.76 Compiling autocfg v1.0.1 Compiling pkg-config v0.3.18 Compiling proc-macro2 v1.0.20 Compiling unicode-xid v0.2.1 Compiling cfg-if v0.1.10 Compiling syn v1.0.39 Compiling serde_derive v1.0.115 Compiling serde v1.0.115 Compiling crc32fast v1.2.0 Compiling semver-parser v0.7.0 Compiling memchr v2.3.3 Compiling ryu v1.0.5 Compiling bitflags v1.2.1 Compiling serde_json v1.0.57 Compiling byteorder v1.3.4 Compiling matches v0.1.8 Compiling log v0.4.11 Compiling tinyvec v0.3.4 Compiling adler v0.2.3 Compiling itoa v0.4.6 Compiling curl v0.4.33 Compiling lazy_static v1.4.0 Compiling unicode-width v0.1.8 Compiling percent-encoding v2.1.0 Compiling quick-error v1.2.3 Compiling nix v0.18.0 Compiling regex-syntax v0.6.18 Compiling adler32 v1.2.0 Compiling wasmparser v0.57.0 Compiling termcolor v1.1.0 Compiling humantime v2.0.1 Compiling stable_deref_trait v1.2.0 Compiling fallible-iterator v0.2.0 Compiling md5 v0.7.0 Compiling ansi_term v0.11.0 Compiling strsim v0.8.0 Compiling vec_map v0.8.2 Compiling same-file v1.0.6 Compiling rustc-demangle v0.1.16 Compiling semver v0.9.0 Compiling num-traits v0.2.12 Compiling hashbrown v0.8.2 Compiling num-integer v0.1.43 Compiling indexmap v1.5.2 Compiling unicode-bidi v0.3.4 Compiling miniz_oxide v0.4.1 Compiling unicode-normalization v0.1.13 Compiling thread_local v1.0.1 Compiling textwrap v0.11.0 Compiling humantime v1.3.0 Compiling walkdir v2.3.1 Compiling rustc_version v0.2.3 Compiling idna v0.2.0 Compiling jobserver v0.1.21 Compiling atty v0.2.14 Compiling socket2 v0.3.12 Compiling time v0.1.44 Compiling memmap v0.7.0 Compiling quote v1.0.7 Compiling gzip-header v0.3.0 Compiling flate2 v1.0.17 Compiling aho-corasick v0.7.13 Compiling quick-xml v0.18.1 Compiling cargo-tarpaulin v0.14.3 Compiling url v2.1.1 Compiling cc v1.0.59 Compiling clap v2.33.3 Compiling deflate v0.8.6 Compiling object v0.21.1 Compiling regex v1.3.9 Compiling libz-sys v1.1.2 Compiling openssl-sys v0.9.58 Compiling curl-sys v0.4.36+curl-7.71.1 Compiling libssh2-sys v0.2.19 Compiling libgit2-sys v0.12.12+1.0.1 Compiling chrono v0.4.15 Compiling env_logger v0.7.1 Compiling semver v0.10.0 Compiling humantime-serde v1.0.0 Compiling toml v0.5.6 Compiling git2 v0.13.10 Compiling gimli v0.22.0 Compiling coveralls-api v0.5.0 Compiling cargo_metadata v0.11.1 error[E0432]: unresolved import crate::statemachine::ProcessInfo --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/event_log.rs:3:27 | 3 | use crate::statemachine::{ProcessInfo, TracerAction}; | ^^^^^^^^^^^ no ProcessInfo in statemachine

error: cannot find macro trace in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/process_handling/mac.rs:10:9 | 10 | trace!("Can't initialise posix_spawnattr_t"); | ^^^^^

error: cannot find macro trace in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/process_handling/mac.rs:17:9 | 17 | trace!("Failed to set spawn flags"); | ^^^^^

error[E0433]: failed to resolve: use of undeclared type or module Options --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:13:28 | 13 | let options: Options = Options::PTRACE_O_TRACESYSGOOD | ^^^^^^^ use of undeclared type or module Options

error[E0433]: failed to resolve: use of undeclared type or module Options --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:14:11 | 14 | | Options::PTRACE_O_TRACEEXEC | ^^^^^^^ use of undeclared type or module Options

error[E0433]: failed to resolve: use of undeclared type or module Options --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:15:11 | 15 | | Options::PTRACE_O_TRACEEXIT | ^^^^^^^ use of undeclared type or module Options

error[E0433]: failed to resolve: use of undeclared type or module Options --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:16:11 | 16 | | Options::PTRACE_O_TRACECLONE | ^^^^^^^ use of undeclared type or module Options

error[E0433]: failed to resolve: use of undeclared type or module Options --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:17:11 | 17 | | Options::PTRACE_O_TRACEFORK | ^^^^^^^ use of undeclared type or module Options

error[E0433]: failed to resolve: use of undeclared type or module Options --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:18:11 | 18 | | Options::PTRACE_O_TRACEVFORK; | ^^^^^^^ use of undeclared type or module Options

error[E0412]: cannot find type ProcessInfo in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/breakpoint.rs:77:37 | 27 | impl Breakpoint { | - help: you might be missing a type parameter: <ProcessInfo> ... 77 | ) -> Result<(bool, TracerAction)> { | ^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function posix_spawn_attr_init in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/process_handling/mac.rs:8:19 8 let mut res = posix_spawn_attr_init(&mut attr); ^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: posix_spawnattr_init
::: /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.76/src/unix/bsd/apple/mod.rs:3637:5
 |

3637 | pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; | --------------------------------------------------------------------- similarly named function posix_spawnattr_init defined here

error[E0425]: cannot find function nullptr in module ptr --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/process_handling/mac.rs:29:14 | 29 | ptr::nullptr(), | ^^^^^^^ not found in ptr

error[E0412]: cannot find type Options in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:13:18 13 let options: Options = Options::PTRACE_O_TRACESYSGOOD ^^^^^^^ help: an enum with a similar name exists: Option

::: /Users/user/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/libcore/option.rs:149:1 | 149 | pub enum Option { | ------------------ similarly named enum Option defined here

error[E0425]: cannot find function setoptions in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:19:5 | 19 | setoptions(pid, options) | ^^^^^^^^^^ help: a local variable with a similar name exists: options

error[E0425]: cannot find function getevent in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:78:5 | 78 | getevent(pid) | ^^^^^^^^ not found in this scope

error[E0425]: cannot find function limit_affinity in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/lib.rs:185:21 | 185 | if let Err(e) = limit_affinity() { | ^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function create_state_machine in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/lib.rs:223:37 | 223 | let (mut state, mut data) = create_state_machine(test, &mut traces, config, logger); | ^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function execute in this scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/lib.rs:281:5 281 execute(exec_path, &argv, envars.as_slice()) ^^^^^^^
::: /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.18.0/src/unistd.rs:754:1 754 pub fn execve(path: &CStr, args: &[&CStr], env: &[&CStr]) -> Result { ------------------------------------------------------------------------------- similarly named function execve defined here
help: a function with a similar name exists 281 execve(exec_path, &argv, envars.as_slice()) ^^^^^^ help: consider importing this function
1 use crate::mac::execute;

error[E0599]: no variant or associated item named PtraceEvent found for enum nix::sys::wait::WaitStatus in the current scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/event_log.rs:86:25 | 86 | WaitStatus::PtraceEvent(pid, sig, val) => { | ^^^^^^^^^^^ variant or associated item not found in nix::sys::wait::WaitStatus

error[E0599]: no variant or associated item named PtraceSyscall found for enum nix::sys::wait::WaitStatus in the current scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/eventlog.rs:118:25 | 118 | WaitStatus::PtraceSyscall() => { | ^^^^^^^^^^^^^ variant or associated item not found in nix::sys::wait::WaitStatus

error[E0308]: mismatched types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:36:5 35 pub fn read_address(pid: Pid, address: u64) -> Result { -------------- expected std::result::Result<i64, nix::Error> because of return type 36 read(pid, address as AddressType) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i64, found i32

= note: expected enum std::result::Result<i64, _> found enum std::result::Result<i32, _>

error[E0308]: mismatched types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:40:49 40 unsafe { write(pid, address as AddressType, data as *mut c_void) } ^^^^^^^^^^^^^^^^^^^ expected i32, found *-ptr

= note: expected type i32 found raw pointer *mut libc::c_void

error[E0599]: no variant or associated item named PTRACE_PEEKUSER found for enum nix::sys::ptrace::Request in the current scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:48:22 | 48 | Request::PTRACE_PEEKUSER as RequestType, | ^^^^^^^^^^^^^^^ variant or associated item not found in nix::sys::ptrace::Request

error[E0308]: mismatched types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:50:13 50 RIP as *mut c_void, ^^^^^^^^^^^^^^^^^^ expected i8, found enum libc::c_void

= note: expected raw pointer *mut i8 found raw pointer *mut libc::c_void

error[E0308]: mismatched types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:51:13 51 ptr::null_mut() as *mut c_void, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i32, found *-ptr

= note: expected type i32 found raw pointer *mut libc::c_void

error[E0308]: mismatched types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:55:61 55 Ok(..) Err(Error::Sys(Errno::UnknownErrno)) => Ok(ret), ^^^
expected i64, found i32
help: you can convert an i32 to i64: ret.into()
error[E0308]: match arms have incompatible types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:56:26 54 / match Errno::result(ret) { 55 Ok(..) Err(Error::Sys(Errno::UnknownErrno)) => Ok(ret), ------- this is found to be of type std::result::Result<i64, nix::Error> 56 err @ Err(..) => err, ^^^ expected i64, found i32 57 } _____- match arms have incompatible types

= note: expected enum std::result::Result<i64, _> found enum std::result::Result<i32, _>

error[E0599]: no variant or associated item named PTRACE_POKEUSER found for enum nix::sys::ptrace::Request in the current scope --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:64:22 | 64 | Request::PTRACEPOKEUSER as , | ^^^^^^^^^^^^^^^ variant or associated item not found in nix::sys::ptrace::Request

error[E0308]: mismatched types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:66:13 66 RIP as *mut c_void, ^^^^^^^^^^^^^^^^^^ expected i8, found enum libc::c_void

= note: expected raw pointer *mut i8 found raw pointer *mut libc::c_void

error[E0308]: mismatched types --> /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-tarpaulin-0.14.3/src/ptrace_control.rs:67:13 67 pc as *mut c_void, ^^^^^^^^^^^^^^^^^ expected i32, found *-ptr

= note: expected type i32 found raw pointer *mut libc::c_void

error: aborting due to 30 previous errors

Some errors have detailed explanations: E0308, E0412, E0425, E0432, E0433, E0599. For more information about an error, try rustc --explain E0308. error: could not compile cargo-tarpaulin.

To learn more, run the command again with --verbose. warning: build failed, waiting for other jobs to finish... error: failed to compile cargo-tarpaulin v0.14.3, intermediate artifacts can be found at /var/folders/kt/mnhg_d0d261668l69cs_m2vh0000gn/T/cargo-installKcFBCE

karisair commented 4 years ago

Whoops, answered my own question. Just saw the comment about Linux.

yangou commented 3 years ago

I'm facing the same problem, how did you resolve it?

xd009642 commented 3 years ago

@yangou wait you're trying to install 0.14.3 or trying to install on Mac? Tarpaulin only currently works on linux so installing on other platforms doesn't yet work. I am working on changing that though and when #549 is solved tarpaulin should work on mac (and windows) as well

ppamorim commented 3 years ago

@xd009642 Yes this is happening on mac. Sad.