Comments (4)
we don't have openssl installed in our images, you'll have to install it yourself or use vendored
You can maybe use system packages using debian (ubuntu doesn't distribute mips anymore).
I'd recommend you to use the vendored feature
from cross.
Pasting the Dockerfile I used for a custom cross image
FROM ghcr.io/cross-rs/mips-unknown-linux-musl:latest
## Base rust 'cross' image for compiling on mips-unknown-linux-musl (gl-inet)
ENV OPENSSL_V="1.1.1t"
ENV OPENSSL_LIB_DIR=/tmp/openssl-${OPENSSL_V}
ENV OPENSSL_INCLUDE_DIR=/tmp/openssl-${OPENSSL_V}/include
RUN set -o errexit \
&& apt-get update \
&& apt install --yes wget clang g++-multilib \
&& cd /tmp \
&& wget https://www.openssl.org/source/openssl-${OPENSSL_V}.tar.gz \
&& tar xzf openssl-${OPENSSL_V}.tar.gz \
&& export MACHINE=mips \
&& export ARCH=mips-linux-muslsf \
&& export CC=${ARCH}-gcc \
&& cd /tmp/openssl-${OPENSSL_V} \
&& ./config \
&& make
RUN export OPENSSL_V="1.1.1t" \
&& export OPENSSL_LIB_DIR=/tmp/openssl-${OPENSSL_V} \
&& export OPENSSL_DIR=/tmp/openssl-${OPENSSL_V} \
&& export OPENSSL_INCLUDE_DIR=/tmp/openssl-${OPENSSL_V}/include
from cross.
specifically for mips-unknown-linux-musl, I had to download openssl, compile it, and set OPENSSL_LIB_DIR/OPENSSL_INCLUDE_DIR properly for this to happen, as I could not apt install openssl-devel nor libssl-dev (not found)
I basically followed the instructions in the first answer here, changed as follows:
`
cd /tmp
apt update
apt install wget
wget https://www.openssl.org/source/openssl-1.1.1t.tar.gz
tar xzf openssl-1.1.1t.tar.gz
export MACHINE=mips
export ARCH=mips
export CC=mips-unknown-linux-musl-gcc
cd openssl-1.1.1t && ./config && make
cd $PROJECT_DIR
export OPENSSL_LIB_DIR=/tmp/openssl-1.1.1t/
export OPENSSL_INCLUDE_DIR=/tmp/openssl-1.1.1t/include
cargo build --target mips-unknown-linux-musl --release
`
from cross.
Got this working and attached a working description
from cross.
Related Issues (20)
- FreeBSD docker image has headers and libs in wrong place HOT 1
- Any plan to support higher Ubuntu base image? say, Ubuntu 22.04 LTS? HOT 1
- Cross isn't working due to docker run exiting without error HOT 29
- windows-gnu target can't be emulated arm64 qemu via wine HOT 12
- Compiling udev with hwdb support HOT 3
- Build linux binary from Windows HOT 1
- add docker/buildx compatible tags HOT 4
- Config via `package.metadata` does not get read when in a workspace HOT 2
- Remote docker throws "sh: 1: cargo: not found" error if cargo comes from nix distribution HOT 2
- FreeBSD: Docker image doesn't set PKG_CONFIG_PATH
- cross build --target armv7-unknown-linux-gnueabihf HOT 2
- Investigate bindgen woes - "file not found" HOT 9
- FreeBSD 12 is EoL, update to 13 HOT 1
- `cross metadata` target_dir does not match target dir used during build HOT 5
- cannot install mips-unknown-linux-musl, and 'rustup target --list | grep mips' is empty HOT 1
- Building a custom `initrd` with the `linux-image.sh` script of the docker image fails on powerpc64 HOT 2
- loongarch64 support
- Set `PKG_CONFIG_ALLOW_CROSS=1` inside our dockerfiles instead of on invocation of docker HOT 3
- Unable to `-Zbuild-std` for `mips-unknown-linux-musl` HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cross.