Skip to content

sel4-deps: simplify instructions - #345

Open
lsf37 wants to merge 1 commit into
masterfrom
lsf37/protobuf
Open

sel4-deps: simplify instructions#345
lsf37 wants to merge 1 commit into
masterfrom
lsf37/protobuf

Conversation

@lsf37

@lsf37 lsf37 commented Jul 30, 2026

Copy link
Copy Markdown
Member

protobuf is now included in the python dependencies of the sel4-deps package and no longer needs to be installed via a package manager (since seL4/seL4#1721).

This makes it easier to control the protobuf version and more robust against install paths that have missed these instructions.

This fixes #317

In a separate commit: Collapse the first two apt install sections into one section that can be more easily copied and pasted.

@lsf37
lsf37 requested a review from midnightveil July 30, 2026 07:15
@lsf37

lsf37 commented Jul 30, 2026

Copy link
Copy Markdown
Member Author

Turns out this does not work: seL4/seL4-CAmkES-L4v-dockerfiles#101

Apparently the python package does not include protoc, which the apt package protobuf-compiler does include. Which is strange, because I think it did work for me locally on Mac. I must have installed something equivalent.

@midnightveil

Copy link
Copy Markdown
Contributor

Yeah, I guess I wouldn't expect the Python package to install the compiler not written in Python..m

Collapse the first two sections into one section that can be more easily
copied and pasted.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
@lsf37 lsf37 changed the title sel4-deps: remove protobuf sel4-deps: simplify instructions Jul 31, 2026
@lsf37

lsf37 commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

Ok, this doesn't work. I've re-added the protobuf packages which just leaves the reformatting/simplification commit.

Keeping only protobuf-compiler creates a potential version problem between protoc and the python package. On Ubuntu 22.04, the protoc version needs protobuf<=3.20. On Ubuntu 24.04 it is fine with the most recent version of protobuf.

Our sel4-deps only requires >=3.19, so it works with both protoc versions and will not install a newer version if 3.19 is satisfied.

@lsf37

lsf37 commented Jul 31, 2026

Copy link
Copy Markdown
Member Author

Our sel4-deps only requires >=3.19, so it works with both protoc versions and will not install a newer version if 3.19 is satisfied.

Ugh, but it is worse, because 3.19 is not satisfied on Ubuntu 22.04. This means my addition of protobuf to sel4-deps actually breaks Ubuntu 22.04. Well, it was broken before, but it is broken more now. The default install on 22.04 is broken, because it installs a python protobuf < 3.19, so it is not compatible with our version of nanopb (although we don't seem to trigger anything that needs it). pip3 install sel4-deps sees that it doesn't satisfy 3.19 and installs a current protobuf, but the current versions of protobuf don't work with the protoc installed in Ubuntu 22.04. There are no error or conflict messages, because it does indeed just break system packages. Maybe the pip maintainers do have a point with their annoying warning.

The only fix I can see at the moment is to constrain protobuf in sel4-deps to <4 (which allows 3.20.x, which does work with the protoc from Ubuntu 22.04). This is not great, because it keeps it back. We can drop it at end-of-life of Ubuntu 22.04 in Apr 2027.

I don't see any issues with 24.04 or newer, they'll all work with current versions. (In fact I can't reproduce #317 at all, none of the version numbers there make sense to me, Ubuntu 24 or 25 will definitely not install protoc version 2.x by default).

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

Successfully merging this pull request may close these issues.

Host Dependencies nuance for the latest Ubuntu

2 participants