Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Good morning.
A few days ago I opened an issue due to a compilation problem in a cluster where I could not install the dependencies with apt-get.
Due to this problem I thought to make a docker container and compile inside the toolchain. I think it is interesting to add it to the repository and update it with the versions.
I think it would be interesting that when a new release of the toolchain is released, a container is left in DockerHub with the compiled toolchain.
To test it I compiled it with the options:
./configure --prefix=/opt/riscv --with-arch=rv64gc --with-abi=lp64d
Since different architectures and ABIs are supported, maybe an option to make the container more generic is to compile for several architectures and ABIs using “--with-multilib-generator=”. (I didn't test this option, but I think that's what it refers to).
To build the image, just have docker installed and run in the directory where the Dockerfile is the command:
docker build -t riscv-gnu-toolchain:2025.01.20_rv64gc_lp64d .
where before the colon (
riscv-gnu-toolchain
) is the name of the image and after (2025.01.20_rv64gc_lp64d
) is the tag of the image.Once you have the image, you only have to lift the container with the command
docker run --name riscv-gnu-toolchain -id riscv-gnu-toolchain:2025.01.20_rv64gc_lp64d bash
and run:
docker exec riscv64-unknown-linux-gnu-gcc -v
To run in HPC environment (clusters), you have to convert the image to singularity.
I look forward to your comments,
David