s2n-quic icon indicating copy to clipboard operation
s2n-quic copied to clipboard

Compiling s2n-quic-platform on musl

Open yixinin opened this issue 1 year ago • 2 comments

ENV:

Host: Linux 8cbeb297efdc 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 Linux

rustup host: x86_64-unknown-linux-musl (in docker rust:alpine) target: x86_64-unknown-linux-musl

Problem:

error[E0308]: mismatched types --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/s2n-quic-platform-0.31.0/src/syscall/mmsg.rs:140:52 | 140 | let res = libc!(recvmmsg(sockfd, msgvec, vlen, flags, timeout)); | ^^^^^ expected u32, found i32 note: function defined here --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.150/src/unix/linux_like/linux/musl/mod.rs:723:12 | 723 | pub fn recvmmsg( | ^^^^^^^^ help: you can convert an i32 to a u32 and panic if the converted value doesn't fit | 140 | let res = libc!(recvmmsg(sockfd, msgvec, vlen, flags.try_into().unwrap(), timeout)); | ++++++++++++++++++++

yixinin avatar Nov 17 '23 07:11 yixinin

I tried compiling the entire workspace for musl and it looks like there's a few other issues with aws-lc-rs and s2n-tls that need to be addressed before we can add a CI task to prevent future regressions.

This PR should fix the s2n-tls issue: https://github.com/aws/s2n-tls/pull/4295

Still investigating the aws-lc-rs issue: https://gist.github.com/camshaft/95441e79397186398d4455e8e820a7a9

camshaft avatar Nov 17 '23 18:11 camshaft

The aws-lc-rs issue should be fixed by https://github.com/aws/aws-lc-rs/pull/283

camshaft avatar Nov 30 '23 18:11 camshaft

Fixed in https://github.com/aws/s2n-quic/pull/2102

camshaft avatar Aug 08 '24 17:08 camshaft