annalam / seqkit

Toolkit for manipulating FASTA and SAM files
MIT License
17 stars 5 forks source link

Instalation errors #14

Closed batscherow closed 8 months ago

batscherow commented 8 months ago

Hi can you please verify the errors thrown when installing seqkit?

Here it is the info of the process: Rust version is:
stable-x86_64-unknown-linux-gnu installed - rustc 1.76.0 (07dca489a 2024-02-04)

Full output when trying to install seqkit:

    Updating git repository `https://github.com/annalam/seqkit`
  Installing seqkit v0.8.0 (https://github.com/annalam/seqkit#25afc1cd)
    Updating crates.io index
  Downloaded bytecount v0.3.2
  Downloaded utf8-ranges v1.0.5
  Downloaded void v1.0.2
  Downloaded unreachable v1.0.0
  Downloaded ucd-util v0.1.10
  Downloaded thread_local v0.3.6
  Downloaded static_assertions v1.1.0
  Downloaded smartstring v1.0.1
  Downloaded rust-htslib v0.31.0
  Downloaded rand_core v0.4.2
  Downloaded ordered-float v0.5.2
  Downloaded ndarray v0.9.1
  Downloaded multimap v0.4.0
  Downloaded itertools v0.6.5
  Downloaded hts-sys v1.10.3
  Downloaded bv v0.7.4
  Downloaded bit-set v0.4.0
  Downloaded bio v0.19.0
  Downloaded approx v0.1.1
  Downloaded regex-syntax v0.5.6
  Downloaded regex v0.2.11
  Downloaded itertools v0.8.2
  Downloaded rawpointer v0.1.0
  Downloaded rand_core v0.3.1
  Downloaded num-traits v0.1.43
  Downloaded num-complex v0.1.43
  Downloaded matrixmultiply v0.1.15
  Downloaded lazy_static v0.2.11
  Downloaded aho-corasick v0.6.10
  Downloaded rand v0.5.6
  Downloaded bit-vec v0.4.4
  Downloaded 31 crates (3.0 MB) in 7.12s (largest was `hts-sys` at 1.5 MB)
   Compiling proc-macro2 v1.0.79
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.153
   Compiling autocfg v1.1.0
   Compiling memchr v2.7.1
   Compiling quote v1.0.35
   Compiling syn v2.0.52
   Compiling num-traits v0.2.18
   Compiling jobserver v0.1.28
   Compiling serde v1.0.197
   Compiling cc v1.0.90
   Compiling serde_derive v1.0.197
   Compiling pkg-config v0.3.30
   Compiling lazy_static v1.4.0
   Compiling semver v0.1.20
   Compiling vcpkg v0.2.15
   Compiling libz-sys v1.1.15
   Compiling rustc_version v0.1.7
   Compiling aho-corasick v1.1.2
   Compiling syn v1.0.109
   Compiling rustversion v1.0.14
   Compiling regex-syntax v0.8.2
   Compiling quick-error v1.2.3
   Compiling tinyvec_macros v0.1.1
   Compiling tinyvec v1.6.0
   Compiling fs-utils v1.1.4
   Compiling regex-automata v0.4.6
   Compiling newtype_derive v0.1.6
   Compiling thiserror v1.0.58
   Compiling glob v0.3.1
   Compiling either v1.10.0
   Compiling matrixmultiply v0.1.15
   Compiling hts-sys v1.10.3
   Compiling regex v1.10.3
   Compiling unicode-normalization v0.1.23
   Compiling num-traits v0.1.43
   Compiling thiserror-impl v1.0.58
   Compiling percent-encoding v2.3.1
   Compiling void v1.0.2
   Compiling bv v0.7.4
   Compiling unicode-bidi v0.3.15
   Compiling rawpointer v0.1.0
   Compiling heck v0.4.1
   Compiling version_check v0.9.4
   Compiling ndarray v0.9.1
   Compiling regex v0.2.11
   Compiling ucd-util v0.1.10
   Compiling regex-syntax v0.5.6
   Compiling smartstring v1.0.1
   Compiling strum_macros v0.25.3
   Compiling idna v0.5.0
   Compiling unreachable v1.0.0
   Compiling form_urlencoded v1.2.1
   Compiling derive-new v0.5.9
   Compiling itertools v0.6.5
   Compiling thread_local v0.3.6
   Compiling num-complex v0.1.43
   Compiling aho-corasick v0.6.10
   Compiling csv-core v0.1.11
   Compiling custom_derive v0.1.7
   Compiling bit-vec v0.4.4
   Compiling rand_core v0.4.2
   Compiling utf8-ranges v1.0.5
   Compiling itoa v1.0.10
   Compiling byteorder v1.5.0
   Compiling ryu v1.0.17
   Compiling csv v1.3.0
   Compiling fxhash v0.2.1
   Compiling rand_core v0.3.1
   Compiling bit-set v0.4.0
   Compiling bio-types v1.0.1
   Compiling url v2.5.0
   Compiling ordered-float v0.5.2
   Compiling vec_map v0.8.2
   Compiling multimap v0.4.0
   Compiling num-integer v0.1.46
   Compiling itertools-num v0.1.3
   Compiling strsim v0.10.0
   Compiling linear-map v1.2.0
   Compiling static_assertions v1.1.0
   Compiling approx v0.1.1
   Compiling lazy_static v0.2.11
   Compiling ieee754 v0.2.6
   Compiling bytecount v0.3.2
   Compiling bio v0.19.0
   Compiling docopt v1.1.1
   Compiling rust-htslib v0.31.0
   Compiling rand v0.5.6
   Compiling itertools v0.8.2
   Compiling seqkit v0.8.0 (/home/.cargo/git/checkouts/seqkit-cbdd5d07583b9b10/25afc1c)
error[E0583]: file not found for module `sam_gc_histogram`
  --> src/sam_main.rs:15:1
   |
15 | mod sam_gc_histogram;
   | ^^^^^^^^^^^^^^^^^^^^^
   |
   = help: to create the module `sam_gc_histogram`, create file "src/sam_gc_histogram.rs" or "src/sam_gc_histogram/mod.rs"
   = note: if there is a `mod sam_gc_histogram` elsewhere in the crate already, import it with `use crate::...` instead

error[E0428]: the name `sam_consensus` is defined multiple times
  --> src/sam_main.rs:16:1
   |
14 | mod sam_consensus;
   | ------------------ previous definition of the module `sam_consensus` here
15 | mod sam_gc_histogram;
16 | mod sam_consensus;
   | ^^^^^^^^^^^^^^^^^^ `sam_consensus` redefined here
   |
   = note: `sam_consensus` must be defined only once in the type namespace of this module

warning: unused import: `std::io::Write`
 --> src/fasta_add_barcode.rs:4:5
  |
4 | use std::io::Write;
  |     ^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `std::io::Write`
 --> src/fasta_convert_basespace.rs:4:5
  |
4 | use std::io::Write;
  |     ^^^^^^^^^^^^^^

warning: unused import: `GzipWriter`
 --> src/fasta_statistics.rs:2:45
  |
2 | use crate::common::{parse_args, FileReader, GzipWriter};
  |                                             ^^^^^^^^^^

warning: unused import: `std::io::Write`
 --> src/fasta_statistics.rs:3:5
  |
3 | use std::io::Write;
  |     ^^^^^^^^^^^^^^

warning: unused import: `std::io::Write`
 --> src/fasta_extract_dual_umi.rs:4:5
  |
4 | use std::io::Write;
  |     ^^^^^^^^^^^^^^

warning: unused import: `std::io::Write`
 --> src/fasta_split_into_anchors.rs:4:5
  |
4 | use std::io::Write;
  |     ^^^^^^^^^^^^^^

warning: use of deprecated function `std::env::home_dir`: This function's behavior may be unexpected on Windows. Consider using a crate from crates.io instead.
  --> src/common.rs:33:34
   |
33 |             if let Some(home) = std::env::home_dir() {
   |                                           ^^^^^^^^
   |
   = note: `#[warn(deprecated)]` on by default

warning: unused imports: `CompressionLevel`, `Format`, `header::Header`
 --> src/sam_merge.rs:6:24
  |
6 | use rust_htslib::bam::{header::Header, Format, CompressionLevel};
  |                        ^^^^^^^^^^^^^^  ^^^^^^  ^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `self`
 --> src/sam_consensus.rs:4:15
  |
4 | use std::io::{self, Write};
  |               ^^^^

warning: unused variable: `read_num`
  --> src/fasta_simplify_read_ids.rs:18:20
   |
18 | fn alphanumeric_id(read_num: usize) -> String { "".into() }
   |                    ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_read_num`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `k`
  --> src/fasta_deinterleave.rs:25:7
   |
25 |         for k in 0..lines-1 {
   |             ^ help: if this is intentional, prefix it with an underscore: `_k`

warning: unused variable: `k`
  --> src/fasta_deinterleave.rs:35:7
   |
35 |         for k in 0..lines-1 {
   |             ^ help: if this is intentional, prefix it with an underscore: `_k`

warning: variable does not need to be mutable
  --> src/fasta_gc_content.rs:23:6
   |
23 |     let mut fasta = fasta::Reader::from_file(&fasta_path)
   |         ----^^^^^
   |         |
   |         help: remove this `mut`
   |
   = note: `#[warn(unused_mut)]` on by default

error[E0433]: failed to resolve: use of undeclared crate or module `sam_recalculate_tlen`
  --> src/sam_main.rs:71:3
   |
71 |         sam_recalculate_tlen::main();
   |         ^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `sam_recalculate_tlen`

warning: function `dirname` is never used
  --> src/common.rs:41:8
   |
41 | pub fn dirname(path: &str) -> String {
   |        ^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: function `filename` is never used
  --> src/common.rs:45:8
   |
45 | pub fn filename(path: &str) -> String {
   |        ^^^^^^^^

warning: associated function `new` is never used
  --> src/common.rs:58:9
   |
57 | impl GzipWriter {
   | --------------- associated function in this implementation
58 |     pub fn new(path: &str) -> GzipWriter {
   |            ^^^

warning: associated items `open` and `header` are never used
   --> src/common.rs:127:9
    |
126 | impl BamReader {
    | -------------- associated items in this implementation
127 |     pub fn open(path: &str) -> BamReader {
    |            ^^^^
...
138 |     pub fn header(&self) -> bam::HeaderView {
    |            ^^^^^^

warning: struct `BamWriter` is never constructed
   --> src/common.rs:159:12
    |
159 | pub struct BamWriter {
    |            ^^^^^^^^^

warning: associated items `open` and `write` are never used
   --> src/common.rs:164:9
    |
163 | impl BamWriter {
    | -------------- associated items in this implementation
164 |     pub fn open(path: &str, header: &HeaderView, compressed: bool) -> BamWriter {
    |            ^^^^
...
182 |     pub fn write(&mut self, record: &bam::Record) {
    |            ^^^^^

warning: struct `Region` is never constructed
   --> src/common.rs:191:12
    |
191 | pub struct Region {
    |            ^^^^^^

warning: function `read_regions` is never used
   --> src/common.rs:199:8
    |
199 | pub fn read_regions(bed_path: &str) -> Vec<Region> {
    |        ^^^^^^^^^^^^

warning: function `alphanumeric_id` is never used
  --> src/fasta_simplify_read_ids.rs:18:4
   |
18 | fn alphanumeric_id(read_num: usize) -> String { "".into() }
   |    ^^^^^^^^^^^^^^^

warning: variable `MAX_BARCODE_DIFFERENCE` should have a snake case name
   --> src/fasta_demultiplex.rs:168:7
    |
168 |         let MAX_BARCODE_DIFFERENCE: usize = 1;
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: convert the identifier to snake case: `max_barcode_difference`
    |
    = note: `#[warn(non_snake_case)]` on by default

warning: unused import: `Write`
 --> src/sam_consensus.rs:4:21
  |
4 | use std::io::{self, Write};
  |                     ^^^^^

Some errors have detailed explanations: E0428, E0433, E0583.
For more information about an error, try `rustc --explain E0428`.
warning: `seqkit` (bin "sam") generated 4 warnings (1 duplicate)
error: could not compile `seqkit` (bin "sam") due to 3 previous errors; 4 warnings emitted
warning: build failed, waiting for other jobs to finish...
warning: `seqkit` (bin "fasta") generated 21 warnings (run `cargo fix --bin "fasta"` to apply 10 suggestions)
error: failed to compile `seqkit v0.8.0 ([https://github.com/annalam/seqkit#25afc1cd)`](https://github.com/annalam/seqkit#25afc1cd)%60), intermediate artifacts can be found at `/tmp/cargo-installhkq4ip`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
annalam commented 8 months ago

Thank you for reporting the issue. I have committed a fix to this compilation error and released 0.8.1.

Can you confirm it compiles ok on your end now?

batscherow commented 8 months ago

Thank you for reporting the issue. I have committed a fix to this compilation error and released 0.8.1.

Can you confirm it compiles ok on your end now?

Thank so mush I confirm that now the code fully compiles. It generates 21 warnings though.

annalam commented 8 months ago

Thanks for confirming. The warnings are no concern, they just relate to some old unused imports.