GetFirefly / firefly

An alternative BEAM implementation, designed for WebAssembly
Apache License 2.0
3.61k stars 104 forks source link

can't build lumen on linux using the latest nightly nor nightly-2022-07-12 #711

Closed adjivas closed 2 years ago

adjivas commented 2 years ago

Hello,

Thank you for this amazing project!

I try to test it, I written this Dockerfile for apply the Readme:

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

WORKDIR "/root"

# install nightly-2020-05-13 toolchain only
RUN curl https://sh.rustup.rs -sSf | \
    sh -s -- --default-toolchain nightly-2022-07-12 -y

ENV PATH=/root/.cargo/bin:$PATH

RUN rustup default nightly-2022-07-12

ENV CARGO_MAKE_TOOLCHAIN=nightly-2022-07-12

RUN cargo install cargo-make

RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2022-07-12

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/lumen/ && \
    cd $XDG_DATA_HOME/llvm/lumen/ && \
    wget https://github.com/lumen/llvm-project/releases/download/lumen-12.0.0-dev_2020-10-22/clang+llvm-12.0.0-x86_64-linux-gnu.tar.gz && \
    tar -xz --strip-components 1 -f clang+llvm-12.0.0-x86_64-linux-gnu.tar.gz && \
    rm clang+llvm-12.0.0-x86_64-linux-gnu.tar.gz && \
    cd -

# Lumen
RUN git clone https://github.com/lumen/lumen
RUN cd /root/lumen && LLVM_PREFIX=$XDG_DATA_HOME/llvm/lumen cargo make

CMD ["/bin/bash"]

Unfortunally, I get this error

Build finished with errors!
Build command completed, waiting for exit..
command did not execute successfully: "rustup" "run" "nightly-2022-07-12" "cargo" "rustc" "-p" "lumen" "--target" "x86_64-unknown-linux-gnu" "--message-format=json-diagnostic-rendered-ansi" "-vv" "--" "--remap-path-prefix" "/root/lumen=." "-Clink-args=-Wl,-rpath,$ORIGIN/../lib,-v"
expected success, got: exit status: 101
Error: ()
[cargo-make] ERROR - Unable to execute rust code.
[cargo-make] WARN - Build Failed.
The command '/bin/sh -c cd /root/lumen && LLVM_PREFIX=$XDG_DATA_HOME/llvm/lumen cargo make' returned a non-zero code: 1
bitwalker commented 2 years ago

Hi! Sorry for the trouble! I need to rework our install instructions and put together new toolchains with our latest LLVM patches, which I plan to do sometime in the next few days. I'll follow up here as soon as that's done.

lalanikarim commented 2 years ago

Running into the same issue on Linux. Will wait for updated instructions.

bitwalker commented 2 years ago

@adjivas @lalanikarim This issue should now be resolved using the latest on develop combined with the latest release of our llvm fork. See the instructions in the readme for details on setup.

NOTE: I tested on Debian 11, using the release above and following the instructions in the readme, so barring something unknown to me, things should just work™