Skip to content

Commit 69bcbd3

Browse files
authored
Merge pull request #151 from clux/try-update
Update ubuntu for arm compiler crashes
2 parents 27c5aeb + dd0b071 commit 69bcbd3

7 files changed

+49
-43
lines changed

.github/workflows/nightly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
shell: bash
7979
run: |
8080
docker buildx build --platform ${{ matrix.platform }} --output type=docker -t test-runner - < Dockerfile.test-runner
81-
TARGET_DIR=${{ matrix.target_dir }} PLATFORM=${{ matrix.platform }} just test
81+
TARGET_DIR=${{ matrix.target_dir }} PLATFORM=${{ matrix.platform }} just test-ci
8282
8383
# The date/channel/version are expected to be the same on both architectures and are needed for the merge step.
8484
# We store them here since it makes the merge step a bit easier - it doesn't need to figure out which of the

.github/workflows/stable.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
shell: bash
9393
run: |
9494
docker buildx build --platform ${{ matrix.platform }} --output type=docker -t test-runner - < Dockerfile.test-runner
95-
TARGET_DIR=${{ matrix.target_dir }} PLATFORM=${{ matrix.platform }} just test
95+
TARGET_DIR=${{ matrix.target_dir }} PLATFORM=${{ matrix.platform }} just test-ci
9696
9797
# The date/channel/version are expected to be the same on both architectures and are needed for the merge step.
9898
# We store them here since it makes the merge step a bit easier - it doesn't need to figure out which of the

Dockerfile.arm64

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM ubuntu:jammy
2+
FROM ubuntu:noble
33
LABEL maintainer="Eirik Albrigtsen <[email protected]>"
44

55
# Required packages:
@@ -54,12 +54,12 @@ RUN chmod a+X /root
5454
# Convenience list of versions and variables for compilation later on
5555
# This helps continuing manually if anything breaks.
5656
ENV SSL_VER="1.1.1w" \
57-
CURL_VER="8.7.1" \
57+
CURL_VER="8.12.1" \
5858
ZLIB_VER="1.3.1" \
5959
PQ_VER="11.12" \
60-
SQLITE_VER="3450300" \
61-
PROTOBUF_VER="25.3" \
62-
SCCACHE_VER="0.8.0" \
60+
SQLITE_VER="3490100" \
61+
PROTOBUF_VER="29.2" \
62+
SCCACHE_VER="0.9.1" \
6363
CC=musl-gcc \
6464
PREFIX=/musl \
6565
PATH=/usr/local/bin:/root/.cargo/bin:$PATH \
@@ -107,14 +107,14 @@ RUN curl -sSL https://www.openssl.org/source/openssl-$SSL_VER.tar.gz | tar xz &&
107107

108108
# Build curl (needs with-zlib and all this stuff to allow https)
109109
# curl_LDFLAGS needed on stretch to avoid fPIC errors - though not sure from what
110-
RUN curl -sSL https://curl.se/download/curl-$CURL_VER.tar.gz | tar xz && \
111-
cd curl-$CURL_VER && \
112-
CC="musl-gcc -fPIC -pie" LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure \
113-
--enable-shared=no --with-zlib --enable-static=ssl --enable-optimize --prefix=$PREFIX \
114-
--with-ca-path=/etc/ssl/certs/ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --without-ca-fallback \
115-
--with-openssl --without-libpsl && \
116-
make -j$(nproc) curl_LDFLAGS="-all-static" && make install && \
117-
cd .. && rm -rf curl-$CURL_VER
110+
# RUN curl -sSL https://curl.se/download/curl-$CURL_VER.tar.gz | tar xz && \
111+
# cd curl-$CURL_VER && \
112+
# CC="musl-gcc -fPIC -pie" LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure \
113+
# --enable-shared=no --with-zlib --enable-static=ssl --enable-optimize --prefix=$PREFIX \
114+
# --with-ca-path=/etc/ssl/certs/ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --without-ca-fallback \
115+
# --with-openssl --without-libpsl && \
116+
# make -j$(nproc) curl_LDFLAGS="-all-static" && make install && \
117+
# cd .. && rm -rf curl-$CURL_VER
118118

119119
# Build libpq
120120
RUN curl -sSL https://ftp.postgresql.org/pub/source/v$PQ_VER/postgresql-$PQ_VER.tar.gz | tar xz && \
@@ -128,11 +128,11 @@ RUN curl -sSL https://ftp.postgresql.org/pub/source/v$PQ_VER/postgresql-$PQ_VER.
128128
cd .. && rm -rf postgresql-$PQ_VER
129129

130130
# Build libsqlite3 using same configuration as the alpine linux main/sqlite package
131-
RUN curl -sSL https://www.sqlite.org/2024/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
131+
RUN curl -sSL https://www.sqlite.org/2025/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
132132
cd sqlite-autoconf-$SQLITE_VER && \
133133
CFLAGS="-DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_RTREE -DSQLITE_USE_URI -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1" \
134134
CC="musl-gcc -fPIC -pie" \
135-
./configure --prefix=$PREFIX --host=x86_64-unknown-linux-musl --enable-threadsafe --enable-dynamic-extensions --disable-shared && \
135+
./configure --prefix=$PREFIX --host=x86_64-unknown-linux-musl --enable-threadsafe --disable-shared && \
136136
make && make install && \
137137
cd .. && rm -rf sqlite-autoconf-$SQLITE_VER
138138

Dockerfile.test-runner

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy
1+
FROM ubuntu:noble
22

33
RUN apt-get update && apt-get install -y \
44
ca-certificates \

Dockerfile.x86_64

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:jammy
1+
FROM ubuntu:noble
22
LABEL maintainer="Eirik Albrigtsen <[email protected]>"
33

44
# Required packages:
@@ -53,12 +53,12 @@ RUN chmod a+X /root
5353
# Convenience list of versions and variables for compilation later on
5454
# This helps continuing manually if anything breaks.
5555
ENV SSL_VER="1.1.1w" \
56-
CURL_VER="8.7.1" \
56+
CURL_VER="8.12.1" \
5757
ZLIB_VER="1.3.1" \
5858
PQ_VER="11.12" \
59-
SQLITE_VER="3450300" \
60-
PROTOBUF_VER="25.3" \
61-
SCCACHE_VER="0.8.0" \
59+
SQLITE_VER="3490100" \
60+
PROTOBUF_VER="29.2" \
61+
SCCACHE_VER="0.9.1" \
6262
CC=musl-gcc \
6363
PREFIX=/musl \
6464
PATH=/usr/local/bin:/root/.cargo/bin:$PATH \
@@ -106,14 +106,14 @@ RUN curl -sSL https://www.openssl.org/source/openssl-$SSL_VER.tar.gz | tar xz &&
106106

107107
# Build curl (needs with-zlib and all this stuff to allow https)
108108
# curl_LDFLAGS needed on stretch to avoid fPIC errors - though not sure from what
109-
RUN curl -sSL https://curl.se/download/curl-$CURL_VER.tar.gz | tar xz && \
110-
cd curl-$CURL_VER && \
111-
CC="musl-gcc -fPIC -pie" LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure \
112-
--enable-shared=no --with-zlib --enable-static=ssl --enable-optimize --prefix=$PREFIX \
113-
--with-ca-path=/etc/ssl/certs/ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --without-ca-fallback \
114-
--with-openssl --without-libpsl && \
115-
make -j$(nproc) curl_LDFLAGS="-all-static" && make install && \
116-
cd .. && rm -rf curl-$CURL_VER
109+
# RUN curl -sSL https://curl.se/download/curl-$CURL_VER.tar.gz | tar xz && \
110+
# cd curl-$CURL_VER && \
111+
# CC="musl-gcc -fPIC -pie" LDFLAGS="-L$PREFIX/lib" CFLAGS="-I$PREFIX/include" ./configure \
112+
# --enable-shared=no --with-zlib --enable-static=ssl --enable-optimize --prefix=$PREFIX \
113+
# --with-ca-path=/etc/ssl/certs/ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt --without-ca-fallback \
114+
# --with-openssl --without-libpsl && \
115+
# make -j$(nproc) curl_LDFLAGS="-all-static" && make install && \
116+
# cd .. && rm -rf curl-$CURL_VER
117117

118118
# Build libpq
119119
RUN curl -sSL https://ftp.postgresql.org/pub/source/v$PQ_VER/postgresql-$PQ_VER.tar.gz | tar xz && \
@@ -127,11 +127,11 @@ RUN curl -sSL https://ftp.postgresql.org/pub/source/v$PQ_VER/postgresql-$PQ_VER.
127127
cd .. && rm -rf postgresql-$PQ_VER
128128

129129
# Build libsqlite3 using same configuration as the alpine linux main/sqlite package
130-
RUN curl -sSL https://www.sqlite.org/2024/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
130+
RUN curl -sSL https://www.sqlite.org/2025/sqlite-autoconf-$SQLITE_VER.tar.gz | tar xz && \
131131
cd sqlite-autoconf-$SQLITE_VER && \
132132
CFLAGS="-DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_ENABLE_RTREE -DSQLITE_USE_URI -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1" \
133133
CC="musl-gcc -fPIC -pie" \
134-
./configure --prefix=$PREFIX --host=x86_64-unknown-linux-musl --enable-threadsafe --enable-dynamic-extensions --disable-shared && \
134+
./configure --prefix=$PREFIX --host=x86_64-unknown-linux-musl --enable-threadsafe --disable-shared && \
135135
make && make install && \
136136
cd .. && rm -rf sqlite-autoconf-$SQLITE_VER
137137

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ For pinned, or historical builds, see the [available tags on dockerhub](https://
5050

5151
The following system libraries are compiled against `musl-gcc`:
5252

53-
- [x] curl ([curl crate](https://github.com/carllerche/curl-rust))
5453
- [x] openssl ([openssl crate](https://github.com/sfackler/rust-openssl))
5554
- [x] pq ([pq-sys crate](https://github.com/sgrif/pq-sys) used by [diesel](https://github.com/diesel-rs/diesel))
5655
- [x] sqlite3 ([libsqlite3-sys crate](https://github.com/jgallagher/rusqlite/tree/master/libsqlite3-sys) used by [diesel](https://github.com/diesel-rs/diesel))
5756
- [x] zlib (used by pq and openssl)
57+
- [~] curl ([curl crate](https://github.com/carllerche/curl-rust)) - dropped [#96](https://github.com/clux/muslrust/issues/96)
5858

5959
We **[try](https://github.com/clux/muslrust/blob/main/update_libs.py)** to keep these up to date.
6060

@@ -75,11 +75,11 @@ Before we push a new version of muslrust we [test](https://github.com/clux/muslr
7575
- [x] [serde](https://crates.io/crates/serde)
7676
- [x] [diesel](https://crates.io/crates/diesel)
7777
- [x] [hyper](https://crates.io/crates/hyper)
78-
- [x] [curl](https://crates.io/crates/curl)
7978
- [x] [rustls](https://crates.io/crates/rustls)
8079
- [x] [openssl](https://crates.io/crates/openssl)
8180
- [x] [flate2](https://crates.io/crates/flate2)
8281
- [x] [rand](https://crates.io/crates/rand)
82+
- [~] [curl](https://crates.io/crates/curl) - dropped [#96](https://github.com/clux/muslrust/issues/96)
8383

8484
## Caching
8585

justfile

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# See https://just.systems/man/
21

32
[private]
43
default:
@@ -19,31 +18,38 @@ build-nightly-arm: (_build "nightly" "arm64" "linux/arm64" "arm64")
1918
run:
2019
docker run -v $PWD/test:/volume -w /volume -it rustmusl-temp /bin/bash
2120

21+
# Build test runner
2222
test-setup:
2323
docker build -t test-runner . -f Dockerfile.test-runner
2424

2525
# Test an individual crate against built container
2626
_t crate:
2727
./test.sh {{crate}}
2828

29-
# when running locally use one of these instead of _t
30-
_t_amd crate:
29+
# Test an individual crate locally using env vars set by _t_amd or t_arm
30+
_ti crate:
31+
# poor man's environment multiplex
32+
just _t_{{ os() }}_{{ arch() }} {{crate}}
33+
34+
# when running locally we can use one of these instead of _t
35+
_t_linux_amd64 crate:
3136
#!/bin/bash
32-
# TODO: make a variant for arm here, or do platform inference
3337
export PLATFORM="linux/amd64"
3438
export TARGET_DIR="x86_64-unknown-linux-musl"
3539
export AR="amd64"
3640
./test.sh {{crate}}
37-
_t_arm crate:
41+
_t_macos_aarch64 crate:
3842
#!/bin/bash
3943
export PLATFORM="linux/arm64"
4044
export TARGET_DIR="aarch64-unknown-linux-musl"
4145
export AR="arm64"
4246
./test.sh {{crate}}
4347

44-
45-
# Test all crates against built container
46-
test: (_t "plain") (_t "ssl") (_t "rustls") (_t "pq") (_t "serde") (_t "curl") (_t "zlib") (_t "hyper") (_t "dieselpg") (_t "dieselsqlite")
48+
# Test all crates against built container locally
49+
test: (_ti "plain") (_ti "ssl") (_ti "rustls") (_ti "pq") (_ti "serde") (_ti "zlib") (_ti "hyper") (_ti "dieselpg") (_ti "dieselsqlite")
50+
# Test all crates against built container in ci (inheriting set PLATFORM/TARGET_DIR/AR vars)
51+
test-ci: (_t "plain") (_t "ssl") (_t "rustls") (_t "pq") (_t "serde") (_t "zlib") (_t "hyper") (_t "dieselpg") (_t "dieselsqlite")
52+
# NB: taken out curl for #96 and build issuse
4753

4854
# Cleanup everything
4955
clean: clean-docker clean-tests

0 commit comments

Comments
 (0)