38 / d4-format

The D4 Quantitative Data Format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerfile no longer works with edition = "2021"

udincer opened this issue · comments

It looks like the base image for rust is too old.

FROM rust:1.50 as builder

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 #42 (comment)). 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.