Added tutorial section on extending docker image#64
Added tutorial section on extending docker image#64stffrdhrn merged 1 commit intoopenrisc:masterfrom
Conversation
stffrdhrn
left a comment
There was a problem hiding this comment.
Thanks for you patch, please find my comments.
images.md
Outdated
| $ vi hello.c | ||
| ``` | ||
|
|
||
| 5. In case you see missing dependent libraries while going through this tutorial (especially while compiling with `gcc` if you see libmpc3, libmpfr6, libgmp10 libraries missing), you can add these to the Dockerfile and compile without errors: |
There was a problem hiding this comment.
Why would this be needed? If gcc is not working then there is a uig with the docker image we should fix. Do you have a case where this happens?
There was a problem hiding this comment.
You're right, ideally, we should be fixing this in the image itself. I'll open a separate issue in the image.
In the meantime, let me know if I should remove this step or keep this while we fix the image.
FYI the details are:
The issue is seen when running the outlined steps for simulator environment, while running the hello world example.
amo@pop-os:~/Desktop/openRISC$ docker pull stffrdhrn/or1k-sim-env
Using default tag: latest
latest: Pulling from stffrdhrn/or1k-sim-env
Digest: sha256:fdc2c5c84804f6497fa8eccdf1b1de21684678076be330d1280f2cf10445f64b
Status: Image is up to date for stffrdhrn/or1k-sim-env:latest
docker.io/stffrdhrn/or1k-sim-env:latest
amo@pop-os:~/Desktop/openRISC$ docker run -it --rm stffrdhrn/or1k-sim-env
root@7696817a20cc:/tmp# cat <<EOF >hello.c
#include <stdio.h>
int main() {
puts("Hello\n");
return 0;
}
EOF
root@7696817a20cc:/tmp# ls
hello.c
root@7696817a20cc:/tmp# or1k-elf-gcc hello.c -o hello
/opt/or1k/or1k-elf/bin/../libexec/gcc/or1k-elf/15.1.0/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
root@7696817a20cc:/tmp# or1k-elf-gcc --version
or1k-elf-gcc (GCC) 15.1.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.There was a problem hiding this comment.
Definitely the original image needs to be fixed. We should remove this section from the docs and fix the original image. Do you want to do that?
There was a problem hiding this comment.
Sounds good. I'll take up the fix for docker image, and also update the PR to remove the 5th step in a while.
There was a problem hiding this comment.
-
Opened a new issue to track the fix needed in docker image. Taking up the task.
-
Addressed the review comment to remove the 5th step with the latest commit.
If there's anything else, please let me know. If not then, I think we are good to push the changes. Also updated the main comment on the PR.
There was a problem hiding this comment.
Can you squash this commit with the previous commit? We do not need the history of this to stay in the git tree.
1a3de25 to
fbfbf49
Compare
|
Thank you |
Description:
While following the OpenRISC tutorial, I noticed the Docker environment lacks a text editor by default. This addition provides steps to create a custom
Dockerfileto include Vim.I also encountered a few missing dependency errors while running hello world and compiling with(Separate issue tracked here: stffrdhrn/or1k-docker-images#2 (comment))gcc, so I also added these libraries in case the user also sees missing dependencies.Changes:
Added a section on "Extending the docker image" to images.md.
Verified Markdown rendering and list numbering locally using jekyll and bundle.