Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade musl to 1.1.24 #485

Merged
merged 2 commits into from
Jun 8, 2022
Merged

Downgrade musl to 1.1.24 #485

merged 2 commits into from
Jun 8, 2022

Conversation

malbarbo
Copy link
Contributor

Fixes #478.

@malbarbo malbarbo requested review from Dylan-DPC-zz and a team as code owners November 13, 2020 17:57
@brainstorm
Copy link
Contributor

At this point, I think it's best to NOT downgrade MUSL on the cross images. A few months have passed with MUSL 1.2.0 merged in and:

  1. It allows OpenSSL to be cross-compiled successfully.
  2. I'm not aware of any other specific breakage from apps/users?

@malbarbo Which packages have you seen breaking "in the wild" due to this?

@malbarbo
Copy link
Contributor Author

The problem can happen with any project that interacts with C. See https://github.com/ericonr/rust-time64.

@reitermarkus
Copy link
Member

Is this still relevant? I'm guessing it is since the libc issue is still open, so please rebase this.

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented May 28, 2022

It is, I just tested it with a Dockerfile with OpenSSL. Sample code to reproduce is (based off of sheldon-cross).

Dockerfile

FROM ghcr.io/cross-rs/armv7-unknown-linux-musleabihf:main

COPY install_openssl.sh /
RUN apt-get update && apt-get install wget
RUN wget https://github.com/rossmacarthur/sheldon-cross/blob/trunk/docker/install_openssl.sh
RUN bash /install_openssl.sh linux-armv4 arm-linux-musleabihf-

ENV OPENSSL_DIR=/openssl \
    OPENSSL_STATIC=1 \
    OPENSSL_INCLUDE_DIR=/openssl/include \
    OPENSSL_LIB_DIR=/openssl/lib

Then, set the appropriate target in Cross.toml using the local tag, and try to build the image:

git clone https://github.com/rossmacarthur/sheldon
cd sheldon
cargo build --target armv7-unknown-linux-musleabihf

Which produces a lot of errors related to 64-bit time (undefined references to __time64, __fstat_time64, __clock_gettime64, __stat_time64, and more). Could we get a rebase or I could make the modifications and merge.

I'm using the latest stable Rust version (1.61.0) and cross installed from git (the most recent commit as of the time this comment was posted).

@Alexhuszagh Alexhuszagh requested a review from a team as a code owner June 8, 2022 20:46
@Alexhuszagh
Copy link
Contributor

bors try --target -musl

bors bot added a commit that referenced this pull request Jun 8, 2022
@bors
Copy link
Contributor

bors bot commented Jun 8, 2022

try

Build succeeded:

@otavio
Copy link
Contributor

otavio commented Jun 8, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Jun 8, 2022

Build succeeded:

@bors bors bot merged commit cf38147 into cross-rs:main Jun 8, 2022
@Emilgardis Emilgardis added this to the v0.2.2 milestone Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

musl cannot be update to 1.2.0 yet
6 participants