Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot open output file dummy_payload" when building with docker #319

Open
kper opened this issue Mar 23, 2024 · 1 comment
Open

"Cannot open output file dummy_payload" when building with docker #319

kper opened this issue Mar 23, 2024 · 1 comment

Comments

@kper
Copy link

kper commented Mar 23, 2024

Hey,

I am trying to build the riscv proxy kernel together with the gnu toolchain with docker and I receive the following error:

0.966 riscv32-unknown-linux-gnu-gcc -Wl,--build-id=none -nostartfiles -nostdlib -static    -fno-stack-protector -o dummy_payload dummy_payload.o -L.  -ldummy_payload -lgcc -Wl,--defsym=MEM_START=0x80000000,-T,./dummy_payload/dummy_payload.lds
0.970 /opt/riscv-cross/lib/gcc/riscv32-unknown-linux-gnu/13.2.0/../../../../riscv32-unknown-linux-gnu/bin/ld: cannot open output file dummy_payload: Is a directory
0.970 collect2: error: ld returned 1 exit status
0.971 make: *** [Makefile:336: dummy_payload] Error 1
0.971 make: *** Waiting for unfinished jobs....

with the following docker file:

FROM debian:12 as builder-riscv-toolchain
ARG num_jobs=24

ENV RISCV=/opt/riscv-cross
ENV PATH=$RISCV/bin:$PATH

RUN apt update && apt upgrade -y
RUN apt install -y build-essential autoconf automake autotools-dev python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev curl device-tree-compiler curl libmpc-dev

WORKDIR /root
RUN git clone https://github.com/riscv-collab/riscv-gnu-toolchain
WORKDIR riscv-gnu-toolchain
RUN git submodule update --init --depth=1 -- gcc
RUN git submodule update --init --depth=1 -- glibc
RUN git submodule update --init --depth=1 -- binutils
RUN ./configure --with-arch=rv32gc --with-abi=ilp32 --enable-multilib --prefix=/opt/riscv-cross && make linux -j $num_jobs && make clean

# Spike

RUN apt install -y build-essential autoconf automake autotools-dev python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev curl device-tree-compiler
WORKDIR /root
RUN git clone https://github.com/riscv-software-src/riscv-isa-sim
WORKDIR riscv-isa-sim
RUN ./configure --prefix=/opt/spike && make -j $num_jobs && make install && make clean

# Spike Proxy Kernel

WORKDIR /root
RUN git clone https://github.com/riscv-software-src/riscv-pk
WORKDIR riscv-pk
RUN ./configure --prefix=$RISCV --host=riscv32-unknown-linux-gnu
RUN make -j $num_jobs && make install && make clean

Run docker build -f Dockerfile -t riscv-spike .

@kper
Copy link
Author

kper commented Mar 27, 2024

Also RUN ./configure --prefix=$RISCV --host=riscv32-unknown-linux-gnu --with-arch=rv32gc does not work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant