cross icon indicating copy to clipboard operation
cross copied to clipboard

Issue building openssl on mips-unknown-linux-musl

Open brentalanmiller opened this issue 1 year ago • 0 comments

Checklist

Describe your issue

I cannot build a project that uses openssl on mips-unknown-linux-musl as it cannot find mips-linux-musl-ranlib.

Adding:

[target.mips-unknown-linux-musl.env]
passthrough = ["RANLIB_mips_unknown_linux_musl=mips-linux-muslsf-ranlib"]

Fixes the issue.

This seems like its related to https://github.com/cross-rs/cross/issues/1137

What target(s) are you cross-compiling for?

mipsel-unknown-linux-musl

Which operating system is the host (e.g computer cross is on) running?

  • [X] macOS
  • [ ] Windows
  • [ ] Linux / BSD
  • [ ] other OS (specify in description)

What architecture is the host?

  • [ ] x86_64 / AMD64
  • [ ] arm32
  • [X] arm64 (including Mac M1)

What container engine is cross using?

  • [X] docker
  • [ ] podman
  • [ ] other container engine (specify in description)

cross version

cross 0.2.5 (b7f7ace 2023-05-18)

Example

git clone https://github.com/brentalanmiller/cross-mips-ssl-issue.git
cross build --target mips-unknown-linux-musl

Gives the build error:

...
 mips-linux-muslsf-ar: creating apps/libapps.a
  /bin/sh: 1: mips-linux-musl-ranlib: not found
  mips-linux-muslsf-ar: creating libcrypto.a
  /bin/sh: 1: mips-linux-musl-ranlib: not found
  mips-linux-muslsf-ar: creating libssl.a
  /bin/sh: 1: mips-linux-musl-ranlib: not found
...

Now uncomment the following in Cross.toml

[target.mips-unknown-linux-musl.env]
passthrough = ["RANLIB_mips_unknown_linux_musl=mips-linux-muslsf-ranlib"]

And the build succeeds.

Additional information / notes

No response

brentalanmiller avatar May 23 '23 00:05 brentalanmiller