Skip to content

Commit 4ea25d1

Browse files
committed
rust hackjob
1 parent 1cb728b commit 4ea25d1

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM git.stratasource.org:5050/strata/ci/chaos-cas2-steamrt:latest
2+
3+
RUN apt-get update -y && apt-get install -y txt2man chrpath
4+
5+
#RUN apt-get install -y cargo
6+
7+
# Hackjob of a rust install. cargo/rust provided by the package manager is way too old, so install it externally.
8+
RUN curl https://sh.rustup.rs -sSf > install.sh && sh install.sh -y
9+
10+
# And of course we can't just throw it in /usr/local!
11+
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.cargo/bin
12+
13+
RUN rustup +stable install && rustup default stable
14+
15+
# Yet another horrible hack! I'm not able to override the cc/cxx that the cargo-c/cc package uses, so I literally have to override the cc/cxx symlinks.
16+
# Why would you ever want to respect CC/CXX environment vars, anyway?
17+
# The current version of cc (gcc-15) does not have libgcc_s.so, only libgcc_s.a. Rust can't handle this for whatever reason. gcc-10 in our container *does* have this, though.
18+
RUN cd /usr/bin; \
19+
rm cc; rm cxx; \
20+
ln -s gcc-10 cc; \
21+
ln -s g++-10 cxx;
22+
23+
# Finally we can install the single package we need.
24+
RUN cargo install cargo-c

run-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
# Runs this in a docker container for portability
44
ARGS="$@"
5-
docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd)":/build -w /build -e ARCH=amd64 strata-deps-builder bash -c "./build.py $ARGS"
5+
docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd)":/build -w /build -e ARCH=amd64 -e HOME=/root strata-deps-builder bash -c "./build.py $ARGS"

0 commit comments

Comments
 (0)