wwood / CoverM

Read coverage calculator for metagenomics
GNU General Public License v3.0
311 stars 31 forks source link

Build fails on i386: error[E0308]: mismatched types #227

Closed yurivict closed 2 weeks ago

yurivict commented 1 month ago
error[E0308]: mismatched types
   --> /wrkdirs/usr/ports/biology/coverm/work/CoverM-0.7.0/cargo-crates/rust-htslib-0.44.1/src/bam/record.rs:154:16
    |
154 |             l: sam_copy.len() as u64,
    |                ^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u64`

error[E0308]: mismatched types
   --> /wrkdirs/usr/ports/biology/coverm/work/CoverM-0.7.0/cargo-crates/rust-htslib-0.44.1/src/bam/record.rs:155:16
    |
155 |             m: sam_copy.len() as u64,
    |                ^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `u64`

error[E0308]: mismatched types
    --> /wrkdirs/usr/ports/biology/coverm/work/CoverM-0.7.0/cargo-crates/rust-htslib-0.44.1/src/bam/mod.rs:179:21
     |
177  |                 i64::from(htslib::cram_seek(
     |                           ----------------- arguments to this function are incorrect
178  |                     htsfile.fp.cram,
179  |                     offset as libc::off_t,
     |                     ^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `i64`
     |
note: function defined here
    --> /wrkdirs/usr/ports/biology/coverm/work/target/i686-unknown-freebsd/release/build/hts-sys-c443e4bc928efde8/out/bindings.rs:9704:12
     |
9704 |     pub fn cram_seek(
     |            ^^^^^^^^^
help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
     |
179  |                     (offset as libc::off_t).try_into().unwrap(),
     |                     +                     +++++++++++++++++++++

rust-htslib-0.44.1 is old, the latest version is 0.47. Could you please update rust-htslib and make a release, which might fix this problem?

Version: 0.7.0 FreeBSD 14.1

Thank you, Yuri

wwood commented 1 month ago

Hi,

The main branch is already at 0.47 - does it compile from a git checkout? My suspicion is that i386 isn't the most well supported inside of coverm, but I've never tried either. ben

wwood commented 2 weeks ago

Closing due to inactivity, feel free to comment further and can reopen if necessary.