This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
Docker images of working Firefly installation Please #716
Comments
Hello @steele232 , I success to build this Firefly image, I wish it's may help you. FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive
RUN useradd -ms /bin/bash user
RUN apt-get update && apt-get install -y build-essential vim git wget curl chrpath file python3
WORKDIR "/root"
# install nightly-2022-08-08 toolchain only
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain nightly-2022-08-08 -y
ENV PATH=/root/.cargo/bin:$PATH
RUN rustup default nightly-2022-08-08
ENV CARGO_MAKE_TOOLCHAIN=nightly-2022-08-08
RUN cargo install cargo-make
RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2022-08-08
RUN apt-get update && apt-get install -y ninja-build cmake ccache
# LLVM
ENV XDG_DATA_HOME=/root/.local/share
RUN mkdir -p $XDG_DATA_HOME/llvm/firefly/ && \
cd $XDG_DATA_HOME/llvm/firefly/ && \
wget https://github.com/getfirefly/llvm-project/releases/download/firefly-15.0.0-dev_2022-08-27/clang+llvm-15.0.0-x86_64-linux-gnu.tar.gz && \
tar -xz --strip-components 1 -f clang+llvm-15.0.0-x86_64-linux-gnu.tar.gz && \
rm clang+llvm-15.0.0-x86_64-linux-gnu.tar.gz && \
cd -
# llvm-project
RUN git clone --depth 1 https://github.com/lumen/llvm-project
RUN cd /root/llvm-project && git checkout firefly
RUN make llvm-shared -C /root/llvm-project
RUN cd -
# FireFly
Run git clone https://github.com/GetFirefly/firefly.git
ENV CC=$XDG_DATA_HOME/llvm/firefly/bin/clang
ENV CXX=$XDG_DATA_HOME/llvm/firefly/bin/clang++
ENV LLVM_PREFIX=$XDG_DATA_HOME/llvm/firefly
ENV FIREFLY_BUILD_TYPE=static
RUN cd /root/firefly && cargo make firefly |
Ok! Just saw this. I will try this soon! |
So unfortunately this one fails for me. It made my Ubuntu 16GB laptop crash several times from CPU utilization or something and then when I tried to build the docker image without any other programs running simultaneously, it didn't crash the computer but it did fail with an error status of 2. It was very weird. It seemed to have problems shortly after step [ 2646 / 5700 ] or something like that. But I'm glad that you and other people have gotten it working!
I suppose possible next steps for me would be to
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
TL;DR
I was recently unable to build Firefly myself and I would love to use a Docker image made by someone who has successfully built it. I might be willing to dedicate more time to get it to build but it would be a lot nicer if I could try using it in a Docker environment to try out some things first.
The long story:
Hi all, I love the work you all are doing and I have high hopes for this project.
Disclaimers: I am new to Rust; I have written only Hello World types of programs in Rust, but I have installed Rust on several development computers in the last few years. I really have a love of Erlang/Elixir and I can see how Firefly would be a great benefit to the BEAM ecosystem so I am taking an interest in this. I think Rust has great potential as well and this is a great application of it.
This time around installing Rust on a new computer, I had no problem at all installing Rust and I was even able to try a few different nightly builds of Rust to try and compile Firefly successfully. In the nightly build that Firefly recommends for most stability (because it matches the version that the CI uses), I had several issues relating to "features" and "core_c_str" or something like that and I even tried learning how Rust "features" work in Cargo and kind of made progress but that's probably a fairly advanced thing to be worrying about for someone with my level of Rust/Cargo knowledge.
Rather than open an issue about the compiler errors and my installation problems, I thought it would be more efficient to ask for a working Docker container because I'm sure several of the project authors are able to compile the project and work on it and I would mostly love to try out the tool and see if I can use it for my use cases. If I am able to do some things with it, I can more easily justify further investigations into Rust and figuring out how to build Firefly by myself.
One of my use cases is compiling Erlang code down to Web Assembly so I think that's the sort of thing that would be doable from a Docker container, since it doesn't have anything to do with cross-compiling to other operating systems and things (which I think can be difficult in Docker sometimes).
The text was updated successfully, but these errors were encountered: