Closed podhrmic closed 4 months ago
I found that upgrading pyoxidizer
to at least version 0.20.0 fixes the issue. I'm trying to find out why that works but hopefully upgrading the package fixes the issue so you can at least try out seL4CP.
Thanks, that helped. I haven't found a list of platform dependencies, so I ended up making a docker image that lets you build the SDK.
Save the following into Dockerfile
somewhere:
FROM ubuntu:latest
WORKDIR /sel4cp
ADD seL4 /seL4
ADD sel4cp /sel4cp
ARG DEBIAN_FRONTEND=noninteractive
# Deps
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y python3 make git python3-venv \
musl-dev musl-tools vim pandoc \
texlive-latex-base texlive-fonts-recommended texlive-fonts-extra \
texlive-latex-extra \
cmake wget curl \
xz-utils \
gcc-aarch64-linux-gnu \
device-tree-compiler \
libxml2-utils
RUN python3 -m venv pyenv
RUN wget -qO /usr/local/bin/ninja.gz https://github.com/ninja-build/ninja/releases/latest/download/ninja-linux.zip
RUN gunzip /usr/local/bin/ninja.gz
RUN chmod a+x /usr/local/bin/ninja
RUN ninja --version
# Build prep
RUN ./pyenv/bin/pip install --upgrade pip setuptools wheel
RUN ./pyenv/bin/pip install -r /sel4cp/requirements.txt
# ARM toolchain
RUN curl -Lo gcc-aarch64-linux-gnu.tar.xz "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz?revision=79f65c42-1a1b-43f2-acb7-a795c8427085&hash=61BBFB526E785D234C5D8718D9BA8E61"
RUN mkdir /opt/gcc-aarch64-linux-gnu
RUN tar -xf gcc-aarch64-linux-gnu.tar.xz --strip-components=1 -C /opt/gcc-aarch64-linux-gnu
ENV PATH="${PATH}:/opt/gcc-aarch64-linux-gnu/bin"
RUN rm -rf gcc-aarch64-linux-gnu.tar.xz
# Build SDK
RUN ./pyenv/bin/python /sel4cp/build_sdk.py --sel4=/seL4
And then in the same directory, run:
git clone git@github.com:BreakawayConsulting/seL4.git -b sel4cp-core-support
git clone git@github.com:BreakawayConsulting/sel4cp.git
docker build -t sel4cp .
I can build the ethernet example, haven't really tested if it runs.
Thanks for the docker file. Could be a fist step towards a github CI action. I wonder, what is the reason to pick ninja from the source and not install the package ninja-build
?
I didn't realize there is ninja-build
package (the Docker image was a rather hasty work), so indeed that should be equivalent. Happy to help with the CI stub if you would like? it should be pretty straightforward.
Okay I've looked into this again. I'm now not convinced that upgrading the pyoxidizer is the right solution. I've just tested musl-1.2.2 on a fresh Ubuntu 22.04, and the SDK builds. The libpython Python.h
that the newer pyoxidizer uses does not include crypt.h
which is why it works to just upgrade pyoxidizer, I think it might just be a coincidence that it works? Not sure.
Since the seL4CP README says that musl-1.2.2 should be used, there does not seem to be anything wrong there as it works on Ubuntu 22.04. I suspect that installing musl from apt install musl-tools
on Ubuntu 22.04 installs a version of musl that is not compatible with musl-1.2.2, hence the error you've run into.
This specific issue has been solved (I can't really do anything about how Ubuntu packages dependencies though). But, the general issue of making it easier to build Microkit from source should happen so people don't run into similar kinds of issues (e.g Nix or Docker).
Hello!
I am very excited about the new core platform! I tried to build the SDK following the instructions, but I am getting this error:
Not quite sure where is the problem coming from,
libcrypt-dev
is installed, and a simple call toimport crypt
succeeds:I am building this on
ubuntu:latest
: