Closed colindaven closed 1 year ago
I am able to compile on Ubuntu 18.04
with rustc=1.65.0
.
= note: perhaps two different versions of crate
noodles_bgzf
are being used?
I wonder if the version of noodles_bgzf
could be the issue?
Here are the versions of some of the noodles packages that worked for me:
[[package]]
name = "noodles-csi"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccb4bac55bfc031dd493f974ea1ee12e9b85e33cc17a63e6273b04551ca8d99e"
dependencies = [
"bit-vec",
"byteorder",
"noodles-bgzf",
"noodles-core",
]
[[package]]
name = "noodles-sam"
version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aab026833fde10c98fb822bff2bfd3950829e78d446ddb7fb1ad0e11710a4568"
dependencies = [
"bitflags",
"indexmap",
"lexical-core",
"memchr",
"noodles-bgzf",
"noodles-core",
"noodles-csi",
"noodles-fasta",
"rustc-hash",
]
[[package]]
name = "noodles-bgzf"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "36ebbec47ff8c1e931f5da61e077a7774bbb2fc43158d72f334a51dae20dcc4b"
dependencies = [
"byteorder",
"bytes",
"crossbeam-channel",
"flate2",
]
noodles-bgzf=0.14.0
?Very strange. Tried all sorts of blacklisting, restricting, hunting and deleting individual versions, trying cargo tree - but still can't work out where noodles-bgzf version "0.15.0" is coming from.
Anyway, I upgraded to the latest cargo v1.66.0
, still got the same problem.
I'll leave this for now, but thanks.
cargo tree | grep nood
├── noodles v0.26.0
│ ├── noodles-bam v0.21.0
│ │ ├── noodles-bgzf v0.14.0
│ │ ├── noodles-core v0.8.0
│ │ ├── noodles-csi v0.9.0
│ │ │ ├── noodles-bgzf v0.14.0 (*)
│ │ │ └── noodles-core v0.8.0
│ │ ├── noodles-fasta v0.13.0
│ │ │ ├── noodles-bgzf v0.14.0 (*)
│ │ │ └── noodles-core v0.8.0
│ │ └── noodles-sam v0.18.0
│ │ ├── noodles-bgzf v0.14.0 (*)
│ │ ├── noodles-core v0.8.0
│ │ ├── noodles-csi v0.9.0 (*)
│ │ ├── noodles-fasta v0.13.0 (*)
│ ├── noodles-bed v0.4.0
│ │ └── noodles-core v0.8.0
│ ├── noodles-core v0.8.0
│ ├── noodles-fasta v0.13.0 (*)
│ └── noodles-sam v0.18.0 (*)
Tried all sorts of combinations in the Cargo.toml
noodles = { version = "^0.26", features = ["sam", "bam", "fasta", "bed", "core"] }
#noodles-bgzf = "^0.14.0, <0.15.0"
#noodles-sam = "^0.18.0"
#noodles-csi = "^0.9.0"
@colindaven Both short reads and long reads are supported. See our preprint for an example analysis with Illumina, PacBio, and ONT reads.
Have you tried cargo update
? Anyways, it's weird that there's an issue with the versions since a Cargo.lock
file exists.
@Daniel-Liu-c0deb0t sorry to hijack this issue. I am having a similar problem and not worked out to solve this. I am new to installing something built with Rust. I am trying to install on our server which is running Debian 11, version rustc --version rustc 1.73.0 (cc66ad468 2023-10-03)
❯ cargo check
Compiling autocfg v1.1.0
Checking cfg-if v1.0.0
Compiling crossbeam-utils v0.8.16
Compiling crc32fast v1.3.2
Checking static_assertions v1.1.0
Checking adler v1.0.2
Checking byteorder v1.5.0
Compiling version_check v0.9.4
Compiling proc-macro2 v1.0.69
Checking bytes v1.5.0
Compiling unicode-ident v1.0.12
Checking noodles-core v0.8.0
Checking hashbrown v0.12.3
Compiling syn v1.0.109
Checking scopeguard v1.2.0
Checking bitflags v1.3.2
Compiling libc v0.2.150
Checking memchr v2.6.4
Checking bit-vec v0.6.3
Checking rustc-hash v1.1.0
Compiling rayon-core v1.12.0
Checking os_str_bytes v6.6.1
Compiling heck v0.4.1
Checking either v1.9.0
Checking textwrap v0.16.0
Checking lexical-util v0.8.5
Checking once_cell v1.18.0
Checking termcolor v1.3.0
Checking miniz_oxide v0.7.1
Checking strsim v0.10.0
Checking noodles-bed v0.4.0
Checking fxhash v0.2.1
Checking clap_lex v0.2.4
Compiling indexmap v1.9.3
Compiling memoffset v0.9.0
Compiling crossbeam-epoch v0.9.15
Compiling num-traits v0.2.17
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Checking flate2 v1.0.28
Checking lexical-parse-integer v0.8.6
Checking lexical-write-integer v0.8.5
Checking crossbeam-channel v0.5.8
Checking lexical-parse-float v0.8.5
Checking lexical-write-float v0.8.5
Compiling quote v1.0.33
Checking crossbeam-deque v0.8.3
Checking noodles-bgzf v0.14.0
Checking noodles-bgzf v0.15.0
Checking lexical-core v0.8.5
Checking atty v0.2.14
Checking noodles-fasta v0.13.0
Checking noodles-csi v0.9.1
Checking rayon v1.8.0
Checking noodles-sam v0.18.0
Checking rust-lapper v1.1.0
Checking ordered-float v3.9.2
error[E0308]: mismatched types
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader/query.rs:70:62
|
70 | ... if let Err(e) = self.reader.seek(chunk.start()) {
| ---- ^^^^^^^^^^^^^ expected `VirtualPosition`, found a different `VirtualPosition`
| |
| arguments to this method are incorrect
|
= note: `VirtualPosition` and `VirtualPosition` have similar names, but are actually distinct types
note: `VirtualPosition` is defined in crate `noodles_bgzf`
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.15.0/src/virtual_position.rs:37:1
|
37 | pub struct VirtualPosition(u64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `VirtualPosition` is defined in crate `noodles_bgzf`
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.14.0/src/virtual_position.rs:37:1
|
37 | pub struct VirtualPosition(u64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `noodles_bgzf` are being used?
note: method defined here
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader.rs:263:12
|
263 | pub fn seek(&mut self, pos: bgzf::VirtualPosition) -> io::Result<bgzf::VirtualPosition> {
| ^^^^ --------------------------
error[E0308]: mismatched types
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader/query.rs:74:41
|
74 | ... State::Read(chunk.end())
| ----------- ^^^^^^^^^^^ expected `VirtualPosition`, found a different `VirtualPosition`
| |
| arguments to this enum variant are incorrect
|
= note: `VirtualPosition` and `VirtualPosition` have similar names, but are actually distinct types
note: `VirtualPosition` is defined in crate `noodles_bgzf`
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.15.0/src/virtual_position.rs:37:1
|
37 | pub struct VirtualPosition(u64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `VirtualPosition` is defined in crate `noodles_bgzf`
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.14.0/src/virtual_position.rs:37:1
|
37 | pub struct VirtualPosition(u64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: perhaps two different versions of crate `noodles_bgzf` are being used?
note: tuple variant defined here
--> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader/query.rs:15:5
|
15 | Read(bgzf::VirtualPosition),
| ^^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `noodles-sam` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
@Daniel-Liu-c0deb0t sorry to hijack this issue. I am having a similar problem and not worked out to solve this. I am new to installing something built with Rust. I am trying to install on our server which is running Debian 11, version rustc --version rustc 1.73.0 (cc66ad468 2023-10-03)
❯ cargo check Compiling autocfg v1.1.0 Checking cfg-if v1.0.0 Compiling crossbeam-utils v0.8.16 Compiling crc32fast v1.3.2 Checking static_assertions v1.1.0 Checking adler v1.0.2 Checking byteorder v1.5.0 Compiling version_check v0.9.4 Compiling proc-macro2 v1.0.69 Checking bytes v1.5.0 Compiling unicode-ident v1.0.12 Checking noodles-core v0.8.0 Checking hashbrown v0.12.3 Compiling syn v1.0.109 Checking scopeguard v1.2.0 Checking bitflags v1.3.2 Compiling libc v0.2.150 Checking memchr v2.6.4 Checking bit-vec v0.6.3 Checking rustc-hash v1.1.0 Compiling rayon-core v1.12.0 Checking os_str_bytes v6.6.1 Compiling heck v0.4.1 Checking either v1.9.0 Checking textwrap v0.16.0 Checking lexical-util v0.8.5 Checking once_cell v1.18.0 Checking termcolor v1.3.0 Checking miniz_oxide v0.7.1 Checking strsim v0.10.0 Checking noodles-bed v0.4.0 Checking fxhash v0.2.1 Checking clap_lex v0.2.4 Compiling indexmap v1.9.3 Compiling memoffset v0.9.0 Compiling crossbeam-epoch v0.9.15 Compiling num-traits v0.2.17 Compiling proc-macro-error-attr v1.0.4 Compiling proc-macro-error v1.0.4 Checking flate2 v1.0.28 Checking lexical-parse-integer v0.8.6 Checking lexical-write-integer v0.8.5 Checking crossbeam-channel v0.5.8 Checking lexical-parse-float v0.8.5 Checking lexical-write-float v0.8.5 Compiling quote v1.0.33 Checking crossbeam-deque v0.8.3 Checking noodles-bgzf v0.14.0 Checking noodles-bgzf v0.15.0 Checking lexical-core v0.8.5 Checking atty v0.2.14 Checking noodles-fasta v0.13.0 Checking noodles-csi v0.9.1 Checking rayon v1.8.0 Checking noodles-sam v0.18.0 Checking rust-lapper v1.1.0 Checking ordered-float v3.9.2 error[E0308]: mismatched types --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader/query.rs:70:62 | 70 | ... if let Err(e) = self.reader.seek(chunk.start()) { | ---- ^^^^^^^^^^^^^ expected `VirtualPosition`, found a different `VirtualPosition` | | | arguments to this method are incorrect | = note: `VirtualPosition` and `VirtualPosition` have similar names, but are actually distinct types note: `VirtualPosition` is defined in crate `noodles_bgzf` --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.15.0/src/virtual_position.rs:37:1 | 37 | pub struct VirtualPosition(u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `VirtualPosition` is defined in crate `noodles_bgzf` --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.14.0/src/virtual_position.rs:37:1 | 37 | pub struct VirtualPosition(u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `noodles_bgzf` are being used? note: method defined here --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader.rs:263:12 | 263 | pub fn seek(&mut self, pos: bgzf::VirtualPosition) -> io::Result<bgzf::VirtualPosition> { | ^^^^ -------------------------- error[E0308]: mismatched types --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader/query.rs:74:41 | 74 | ... State::Read(chunk.end()) | ----------- ^^^^^^^^^^^ expected `VirtualPosition`, found a different `VirtualPosition` | | | arguments to this enum variant are incorrect | = note: `VirtualPosition` and `VirtualPosition` have similar names, but are actually distinct types note: `VirtualPosition` is defined in crate `noodles_bgzf` --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.15.0/src/virtual_position.rs:37:1 | 37 | pub struct VirtualPosition(u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ note: `VirtualPosition` is defined in crate `noodles_bgzf` --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-bgzf-0.14.0/src/virtual_position.rs:37:1 | 37 | pub struct VirtualPosition(u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: perhaps two different versions of crate `noodles_bgzf` are being used? note: tuple variant defined here --> /home/callum/.cargo/registry/src/index.crates.io-6f17d22bba15001f/noodles-sam-0.18.0/src/reader/query.rs:15:5 | 15 | Read(bgzf::VirtualPosition), | ^^^^ For more information about this error, try `rustc --explain E0308`. error: could not compile `noodles-sam` (lib) due to 2 previous errors warning: build failed, waiting for other jobs to finish...
I got it to install by firstly uninstalling rust that I set up on debian 11 server and then migrated to another server we have running Ubuntu 22.04 and installing rust again.
I cloned the repo again.
cargo check
, raised no issues but
cd best
cargo install --path .
did not work so I added --locked
as recommended.
This time it was installed without issue.
I updated the README with the fix.
Thanks for this @callumparr , --locked
now solved the install issue for me as well.
Hi,