au-ts / libvmm

An experimental virtual machine monitor for the seL4 microkernel
Other
26 stars 12 forks source link

Improve Linux Userlevel Driver Build System #94

Open alexandermbrown opened 2 months ago

alexandermbrown commented 2 months ago

This issue is referenced partially in both https://github.com/au-ts/libvmm/issues/57 and https://github.com/au-ts/libvmm/issues/63. @wom-bat is currently unable to run the driver VM examples as his version of glibc is different to the one used in the buildroot archive. Since this is a big build system design problem I thought I'd make an issue.

There are two issues with how we build userlevel programs.

1) We currently use zig cc to build these programs. This is all I can currently get working on macOS with Nix but ideally we would only use one compiler (GCC or Clang).

2) Since libraries such as libc and libasound (ALSA) are dynamically linked, we need to ensure we link our userlevel programs to the same version of the shared library as buildroot. This means we cannot simply use the versions installed on the user's OS (by a package manager or Nix) unless we can be sure the user has installed the correct version.

Here are some solution ideas:

I am open to ideas, please let me know if I've got anything wrong.

Ivan-Velickovic commented 2 months ago

Since libraries such as libc and libasound (ALSA) are dynamically linked, we need to ensure we link our userlevel programs to the same version of the shared library as buildroot

Another option would be to only use statically linked versions of all of these.