plrust
plrust copied to clipboard
Plrustc will not compile on alpine/postgres.
I get this output when running the build script for plrustc:
3.516 + env 'RUSTFLAGS=-Clink-args=-Wl,-rpath,/usr/local/rustup/toolchains/1.70.0-x86_64-unknown-linux-musl/lib/rustlib/x86_64-unknown-linux-musl/lib -Zunstable-options -Zbinary-dep-depinfo' cargo build --release -p plrustc --bin plrustc --target x86_64-unknown-linux-musl
3.800 Updating crates.io index
4.751 Downloading crates ...
5.213 Downloaded once_cell v1.18.0
5.725 Downloaded libc v0.2.147
5.872 Compiling libc v0.2.147
5.872 Compiling once_cell v1.18.0
7.969 Compiling plrustc v1.2.3 (/tmp/plrust-1.2.3/plrustc/plrustc)
8.681 error: crate `rustc_ast` required to be available in rlib format, but was not found in this form
8.681
I looked in the library path, and indeed many rlibs are missing.
FROM rust:alpine3.17 AS rust-builder
RUN rustup update 1.70.0 \
&& rustup default 1.70.0 \
&& rustup component add --toolchain 1.70.0 llvm-tools-preview rustc-dev rust-src
RUN wget -qO /tmp/plrust.tar.gz https://github.com/tcdi/plrust/archive/refs/tags/v1.2.3.tar.gz \
&& tar -xvzf /tmp/plrust.tar.gz -C /tmp
WORKDIR /tmp/plrust-1.2.3/plrustc
RUN /bin/ash -x ./build.sh
pgrx, plrust both compile without errors. Just plrustc breaks.