Closed wdecoster closed 5 months ago
I've been trying to compile it directly on my aarch64 with
cargo build --target aarch64-unknown-linux-gnu
However, my errors are different from yours :
No sign of problematic -mno-sse4.1
However, it looks more like a generic function definition error somehow :
Here is the log
rror[E0277]: the trait bound `*const u8: From<Preset>` is not satisfied
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-0.1.15+minimap2.2.26/src/lib.rs:429:24
|
429 | mm_set_opt(preset.into(), &mut idxopt, &mut mapopt)
| ^^^^^^ ---- required by a bound introduced by this call
| |
| the trait `From<Preset>` is not implemented for `*const u8`
|
= help: the following other types implement trait `From<T>`:
<*const i8 as From<Preset>>
<f32 as From<i16>>
<f32 as From<i8>>
<f32 as From<u16>>
<f32 as From<u8>>
<f64 as From<f32>>
<f64 as From<i16>>
<f64 as From<i32>>
and 68 others
= note: required for `Preset` to implement `Into<*const u8>`
error[E0308]: arguments to this function are incorrect
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-0.1.15+minimap2.2.26/src/lib.rs:665:13
|
665 | mm_idx_str(
| ^^^^^^^^^^
|
note: expected `u8`, found `i8`
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-0.1.15+minimap2.2.26/src/lib.rs:671:17
|
671 | seqs.as_ptr() as *mut *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: expected raw pointer `*mut *const u8`
found raw pointer `*mut *const i8`
note: expected `u8`, found `i8`
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-0.1.15+minimap2.2.26/src/lib.rs:672:17
|
672 | ids.as_ptr() as *mut *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: expected raw pointer `*mut *const u8`
found raw pointer `*mut *const i8`
note: function defined here
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-sys-0.1.15+minimap2.2.26/src/bindings.rs:8188:12
|
8188 | pub fn mm_idx_str(
| ^^^^^^^^^^
error[E0308]: mismatched types
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-0.1.15+minimap2.2.26/src/lib.rs:751:21
|
748 | mm_map(
| ------ arguments to this function are incorrect
...
751 | seq.as_ptr() as *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
note: function defined here
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-sys-0.1.15+minimap2.2.26/src/bindings.rs:8227:12
|
8227 | pub fn mm_map(
| ^^^^^^
error[E0308]: mismatched types
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-0.1.15+minimap2.2.26/src/lib.rs:861:37
|
855 | ... let _cs_len = mm_gen_cs(
| --------- arguments to this function are incorrect
...
861 | ... seq.as_ptr() as *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
note: function defined here
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-sys-0.1.15+minimap2.2.26/src/bindings.rs:8270:12
|
8270 | pub fn mm_gen_cs(
| ^^^^^^^^^
error[E0308]: mismatched types
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-0.1.15+minimap2.2.26/src/lib.rs:880:37
|
874 | ... let _md_len = mm_gen_MD(
| --------- arguments to this function are incorrect
...
880 | ... seq.as_ptr() as *const i8,
| ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
|
= note: expected raw pointer `*const u8`
found raw pointer `*const i8`
note: function defined here
--> /home/minit/.cargo/registry/src/github.com-1ecc6299db9ec823/minimap2-sys-0.1.15+minimap2.2.26/src/bindings.rs:8281:12
|
8281 | pub fn mm_gen_MD(
| ^^^^^^^^^
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `minimap2` due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
Somehow, for me, the problem lies in a raw pointer to a constant u8 that is found as an integer.
I don't know more at the moment
I did it
I compiled it directly on the aarch64 machine. I updated rustc and everything that needed to be, that worked up smoothly
./chopper --help
Filtering and trimming of fastq files. Reads on stdin and writes to stdout.
Usage: chopper [OPTIONS]
Options:
-q, --quality <MINQUAL> Sets a minimum Phred average quality score [default: 0]
--maxqual <MAXQUAL> Sets a maximum Phred average quality score [default: 1000]
-l, --minlength <MINLENGTH> Sets a minimum read length [default: 1]
--maxlength <MAXLENGTH> Sets a maximum read length [default: 2147483647]
--headcrop <HEADCROP> Trim N nucleotides from the start of a read [default: 0]
--tailcrop <TAILCROP> Trim N nucleotides from the end of a read [default: 0]
-t, --threads <THREADS> Use N parallel threads [default: 4]
-c, --contam <CONTAM> Filter contaminants against a fasta
--inverse Output the opposite of the normal results
-h, --help Print help
-V, --version Print version
chopper_aarch64/target/aarch64-unknown-linux-gnu/debug$ file chopper
chopper: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=7e53baa258c7d121b13ff02d9d244a2661c4f9ff, with debug_info, not stripped
@wdecoster @ImagoXV
Glad you solved it. I haven't been able to get cross-compilation to work, but someone got it to compile directly on the machine just fine. The issue is minimap2 itself will compile on the host machine, regardless of the target, and then linking won't work.
If you found anything that would be helpful here, let me know and I'll implement!
Hi,
Someone is asking for an aarch64 version of chopper (https://github.com/wdecoster/chopper/issues/22). It is the first time I have to compile something for that system, so bear with me :) I am running this on a WSL Ubuntu.
For chopper,
cargo build --target aarch64-unknown-linux-gnu
results in(let me know if the entire error is of interest)
I noticed you have some feature to select for aarch64 (or at least, I think that is what it means), so I tried for a clone of the minimap2-rs repo:
cargo build --target aarch64-unknown-linux-gnu --features sse2only
However, this result in the error below. Do you have an idea on how to fix this?