d4-format icon indicating copy to clipboard operation
d4-format copied to clipboard

Dockerfile no longer works with edition = "2021"

Open udincer opened this issue 3 years ago • 0 comments

It looks like the base image for rust is too old. https://github.com/38/d4-format/blob/151f27cb06a32880f7e8d6e256b94d60361adf32/Dockerfile#L1 Changing FROM rust:1.50 as builder to FROM rust:latest as builder results in a mismatched types error:

#11 83.35 error[E0308]: mismatched types
#11 83.35    --> d4-hts/src/alignment/bamfile.rs:102:52
#11 83.35     |
#11 83.35 102 |             let raw_name = unsafe { CStr::from_ptr(*raw_name as *const i8) };
#11 83.35     |                                                    ^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `i8`
#11 83.35     |
#11 83.35     = note: expected raw pointer `*const u8`
#11 83.35                found raw pointer `*const i8`
#11 83.35

Which is strange because I don't get this error when compiling not in a container. After changing i8 to u8, it compiles, but gives me a libssl linking error, which I resolved by adding openssl to dependencies (see https://github.com/38/d4-format/issues/42#issuecomment-1027573276). This could also potentially be resolved by using an image that has libssl installed.

At this point I get a /lib/aarch64-linux-gnu/libm.so.6: version GLIBC_2.29' not found error, but I think this has to do with Docker on arm vs x86 and this is getting way too complicated so I think I'll stop going down the rabbit hole at this point. Surprisingly simply running cargo install d4tools on an ARM Macbook without Docker works just fine.

udincer avatar Feb 02 '22 05:02 udincer