seL4 / seL4-CAmkES-L4v-dockerfiles

Dockerfiles defining the dependencies required to build seL4, CAmkES, and L4v.
13 stars 40 forks source link

Is the stack group required for a regular build environment? #26

Closed Jesse-Millwood closed 3 years ago

Jesse-Millwood commented 4 years ago

I can see needing the stack group for the l4v image but it doesn't seem required for a regular build environment. It seems to work fine if I remove this line:

https://github.com/SEL4PROJ/seL4-CAmkES-L4v-dockerfiles/blob/759234c023b09fef9d7a1ea655c3a2ce8ede3a82/Makefile#L143

LukeMondy commented 4 years ago

It is so that the haskell dependencies for the capDL loader (I believe) can be cached for building camkes apps.

Removing it should still work, but it means that the first time a camkes app is built, it has to go and fetch everything from stack.

Is it causing an issue for you?

Jesse-Millwood commented 4 years ago

I was helping someone get going with seL4test and we were running into problems because there wasn't a stack group on the host machine.

LukeMondy commented 4 years ago

That's a bit odd - the host machine groups shouldn't cause an issue, because the --group-add should only be acting in the container. Do you have any logs that show the issue?

Jesse-Millwood commented 4 years ago

When I build with make -C ${DOCKER_PATH} user_sel4-riscv USER_IMG=jesse-sel4-riscv HOST_DIR=$(pwd) I get this:

Successfully tagged jesse-sel4-riscv:latest
docker run \
    -it \
    --hostname in-container \
    --rm \
    -u 1000:1000  \
    --group-add stack \
    --group-add sudo \
    -v /home/jesse/Code/gitrepos/sel4test:/host:z \
    -v jesse-home:/home/jesse \
    -v /etc/localtime:/etc/localtime:ro \
    jesse-sel4-riscv bash
docker: Error response from daemon: Unable to find group stack.
Makefile:138: recipe for target 'user_run' failed
make: *** [user_run] Error 125
make: Leaving directory '/home/jesse/Code/gitrepos/seL4-CAmkES-L4v-dockerfiles'

When I remove that line it's fine.

LukeMondy commented 4 years ago

Ah, right, I see the issue - you're right, it should not be added in this case.

The makefile is mistakenly assuming that the stack group has been added - but this will only have occurred when using the camkes image.

I'll put up a fix soon.

LukeMondy commented 3 years ago

This should be fixed up via https://github.com/seL4/seL4-CAmkES-L4v-dockerfiles/commit/76e0b7eaef30f88fdb71f4b7d21b5b5fced75c08 Sorry for the delays, and let us know if there are still issues.