rust-cross / rust-musl-cross

Docker images for compiling static Rust binaries using musl-cross
MIT License
621 stars 69 forks source link

Additional dependencies for Bindgen #23

Closed Sparika closed 3 years ago

Sparika commented 4 years ago

Hi,

Thanks for the image. For my project, I required to also use rust-bindgen for generating bindings. According to the documentation, bindgen requires llvm-dev libclang-dev clang

In addition, I was also requiring development headers so I ended up adding packages linux-headers-generic libc6-dev-i386.

Here is my Dockerfile used for building on Alpine RPi2 armv7:

FROM messense/rust-musl-cross:armv7-musleabihf

RUN apt-get update && \
    apt-get install -y software-properties-common apt-transport-https ca-certificates
RUN add-apt-repository 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-10 main'

RUN apt-get update && \
    apt-get install -y llvm-dev libclang-dev clang linux-headers-generic libc6-dev-i386
messense commented 3 years ago

Added in https://github.com/messense/rust-musl-cross/commit/61ca9e5b10cd0fe96b381e16262a9e62b2ba718d