2

error: extern location for void does not exist: C:\Rust Projects\imap_project\target\debug\deps\libvoid-9f5065312e4dff17.rlib

error[E0463]: can't find crate for void --> C:\Users\Arndroid.cargo\registry\src\github.com-1ecc6299db9ec823\unreachable-1.0.0\src\lib.rs:12:1

| 12 | extern crate void;
| ^^^^^^^^^^^^^^^^^^ can't find crate

I can build github.com-1ecc6299db9ec823\unreachable-1.0.0 with cargo build just fine, though.

I'm kinda at a loss as of what to do. I'm trying to add this crate:

https://crates.io/crates/imap

At this moment I made my [dependencies] look like this:

[dependencies]
void = "1.0.2"
buzz = "1.1.0"
bufstream = "0.1"
imap-proto = "0.4.1"
native-tls = "0.1"
nom = "3.2.1"
regex = "0.2"
unreachable = "1.0.0"
imap = "0.8.1"

I also tried it with just imap = 0.8.1, but that didn't work. But I didn't want to exclude the possibility.

Edit:

Minimal code as per suggestion:

Cargo.toml:

[package]
name = "imap_project"
version = "0.1.0"
authors = ["Name & Email"]

[dependencies]
imap = "0.8.1"

main.rs:

extern crate imap;
fn main() {
    println!("Hello, world!");
}

Literally all I have at the moment actually, fresh cargo initialized project:

cargo new imap_project --bin

First 14 lines of the lib.rs in the .cargo folder:

#![cfg_attr(test, deny(warnings))]
#![deny(missing_docs)]

//! # unreachable
//!
//! An unreachable code optimization hint in stable rust, and some useful
//! extension traits for `Option` and `Result`.
//!

#![no_std]

extern crate void;

use core::mem;
(...)

I can't think of more to provide at this time, if I can, please let me know.

Edit 2:

[[package]]
name = "aho-corasick"
version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "bitflags"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "bitflags"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "bufstream"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "cc"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "click_mail"
version = "0.1.0"
dependencies = [
 "imap 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "core-foundation"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "core-foundation-sys"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "foreign-types"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "foreign-types-shared"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "imap"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "imap-proto 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "imap-proto"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "lazy_static"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "lazy_static"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "libc"
version = "0.2.43"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "memchr"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "memchr"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "native-tls"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)",
 "schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
 "security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
 "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
 "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "nom"
version = "3.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "openssl"
version = "0.9.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 "openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "openssl-sys"
version = "0.9.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
 "vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "pkg-config"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "rand"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "regex"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
 "regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
 "thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
 "utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "regex-syntax"
version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "remove_dir_all"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "schannel"
version = "0.1.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "security-framework"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
 "security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "security-framework-sys"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
 "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "tempdir"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
 "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "thread_local"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "ucd-util"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "unreachable"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "utf8-ranges"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "vcpkg"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "version_check"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "void"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "winapi"
version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
 "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
 "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"

[metadata]
"checksum aho-corasick 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c1c6d463cbe7ed28720b5b489e7c083eeb8f90d08be2a0d6bb9e1ffea9ce1afa"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789"
"checksum bufstream 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f2f382711e76b9de6c744cc00d0497baba02fb00a787f088c879f01d09468e32"
"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275"
"checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67"
"checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d"
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum imap 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3072853e727ec65d846008463e37265d8fe4917ed68765ae7dda2d1f5e65860b"
"checksum imap-proto 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8733e1ad1058e09532090e95b1debda73cc25ea4d1ba53bf4a60870c19865952"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7"
"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d"
"checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum native-tls 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f74dbadc8b43df7864539cedb7bc91345e532fdd913cfdc23ad94f4d2d40fbc0"
"checksum nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b"
"checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985"
"checksum openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)" = "912f301a749394e1025d9dcddef6106ddee9252620e6d0a0e5f8d0681de9b129"
"checksum pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "104630aa1c83213cbc76db0703630fcb0421dac3585063be4ce9a8a2feeaa745"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
"checksum regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9329abc99e39129fcceabd24cf5d85b4671ef7c29c50e972bc5afe32438ec384"
"checksum regex-syntax 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7d707a4fa2637f2dca2ef9fd02225ec7661fe01a53623c1e6515b6916511f7a7"
"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5"
"checksum schannel 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "dc1fabf2a7b6483a141426e1afd09ad543520a77ac49bd03c286e7696ccfd77f"
"checksum security-framework 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "dfa44ee9c54ce5eecc9de7d5acbad112ee58755239381f687e564004ba4a2332"
"checksum security-framework-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "5421621e836278a0b139268f36eee0dc7e389b784dc3f79d8f11aabadf41bead"
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
"checksum thread_local 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "279ef31c19ededf577bfd12dfae728040a21f635b06a24cd670ff510edd38963"
"checksum ucd-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fd2be2d6639d0f8fe6cdda291ad456e23629558d466e2789d2c3e9892bda285d"
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum vcpkg 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cbe533e138811704c0e3cbde65a818b35d3240409b4346256c5ede403e082474"
"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
Arndroid
  • 314
  • 3
  • 13
  • 1
    There's nothing obviously wrong from what you've said, but could you make a [mcve]? – Peter Hall Aug 05 '18 at 10:05
  • Thanks @PeterHall , I have added some code and file contents, it was a freshly created project. – Arndroid Aug 05 '18 at 10:42
  • I understand everything up until you say "First 14 lines of the lib.rs in the .cargo folder:". Your project is a binary so what is this `lib.rs`? – Peter Hall Aug 05 '18 at 10:54
  • Your minimal repro works just fine for me. Are you sure it is correct? If so, we'll need more information about your environment, how you compile, versions of cargo and rustc, etc. – mcarton Aug 05 '18 at 10:56
  • Perhaps just try deleting your `.cargo` folder, in case something is corrupted in there. – Peter Hall Aug 05 '18 at 11:00
  • Also, to be clear, you are not trying to use `void`, it's a transitive dependency? – Peter Hall Aug 05 '18 at 11:01
  • @PeterHall I only included it because the error message is saying it cannot find the ``void`` crate which that ``lib.rs`` is asking for. Other than that, I have tried to remove the``.cargo`` folder and run ``cargo run`` again, but no dice. Other than the ``unreachable`` crate which ``imap`` needs it seems, I do not intend to use the ``void`` crate myself intentionally. – Arndroid Aug 05 '18 at 11:10
  • What Rust version? – Peter Hall Aug 05 '18 at 11:11
  • @mcarton I compile with ``cargo run``, after creating the project with ``cargo new imap_project --bin``. I use Visual Studio Code, using ``Rust (rls) 0.4.9`` and run the commands from PowerShell, as a integrated Terminal Window in VSCode, running on a Windows 10 machine. I ran ``rustc update`` as well and tried to create another project using the ``imap`` crate, yet no dice. Is there more info you would like me to provide? All the code I wrote myself so far can be found under the Edit, it's truly a fresh new clean project. – Arndroid Aug 05 '18 at 11:14
  • @PeterHall currently: ``rustc 1.28.0 (9634041f0 2018-07-30)``, after running ``rustc -V`` from the integrated PowerShell terminal in VSCode. – Arndroid Aug 05 '18 at 11:15
  • what's the contents of your `Cargo.lock` for the minimal project (i.e. what versions of the dependendies are actually used)? have you tried running `cargo update` and trying to build again? the fact that the build is working for other people (and i was just able to reproduce it) seems to hint at wrong versions of dependencies used. – dario Aug 09 '18 at 19:02
  • @dario I have added my ``Cargo.lock`` under Edit 2. I just tried ``cargo update``, that runs without errors. After running that however, ``cargo build`` and ``cargo run`` still give the same compile error. I was thinking, perhaps you could share your project using ``Imap`` with me? (Even just a "Hello World" project, as long as it's using the ``Imap`` crate and compiles?) Just to sanity check my system? Thanks for the help. – Arndroid Aug 11 '18 at 08:38

0 Answers0