rust-cross / rust-musl-cross

Docker images for compiling static Rust binaries using musl-cross
MIT License
625 stars 69 forks source link

Bunch of errors with the `memchr` package #120

Open lucat1 opened 1 year ago

lucat1 commented 1 year ago

Hi, starting from today (but I hadn't used the tool in ~2 months, so I don't know exactly when this started to happen) I am getting loads of these errors when cross compiling (both x86 and aarch64 with musl):

error[E0425]: cannot find function, tuple struct or tuple variant `Some` in this scope

or even:

error[E0425]: cannot find function `vpmaxq_u8` in this scope

You can find the full build log here: https://ci.codeberg.org/repos/12282/pipeline/146/5

I can compile just fine on my laptop (without cross compiling) using the same nightly or stable version. I have tried both nightly and stable with rust-musl-cross but they all give me the same errors. Is this a known issue?

messense commented 1 year ago

I'm not sure why it happens, but it could be related to https://github.com/BurntSushi/memchr/pull/129.

lucat1 commented 1 year ago

Before doing a cargo upgrade, I was also having a similar issue with the value-bag package as you can see here: https://ci.codeberg.org/repos/12282/pipeline/137/5

lucat1 commented 1 year ago

The odd thing is, it does not happen if I don't use cross compilation on my x86 machine, but it does happen when cross compiling to x86 from an x86 machine. Is it musl related or what (I do have a gnu based distro)?

lucat1 commented 1 year ago

Oh my x86_64, gnu based system I compiled using rust-cross and it worked, so there is possibly something wrong in the container image. Here's the command I used:

cross build --release --target x86_64-unknown-linux-musl

Again, here's the pipeline which has been run against the same commit: https://ci.codeberg.org/repos/12282/pipeline/152/5