rust-lang / crates-build-env

Build environment for third-party Rust crates
MIT License
69 stars 89 forks source link

Add libprotoc-dev #135

Closed progval closed 1 year ago

progval commented 1 year ago

It is also needed to build orcxx. Sorry, I missed it when writing #134

syphar commented 1 year ago

@progval before we do more trial & error,

did you now try your build inside our container image?

progval commented 1 year ago

yes:

$ cat Dockerfile
FROM ghcr.io/rust-lang/crates-build-env/linux:latest

RUN apt-get update
RUN apt-get install libprotoc-dev

ENV DOCS_RS=1
WORKDIR /opt/orcxx

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
RUN sh rustup.sh -y
RUN /root/.cargo/bin/rustup default nightly

COPY . /opt/orcxx

RUN cd /opt/orcxx && /root/.cargo/bin/cargo fetch

$ docker build .
[...]
Successfully built 82feb369978f

$ docker run --network=none 82feb369978f /root/.cargo/bin/cargo build
[...]
    Finished dev [unoptimized + debuginfo] target(s) in 58.23s
syphar commented 1 year ago

@progval I deployed the new image & queued a rebuild for both releases

progval commented 1 year ago

It worked, thanks again for your time