includeos / IncludeOS

A minimal, resource efficient unikernel for cloud services
https://www.includeos.org
Apache License 2.0
4.86k stars 358 forks source link

Conan build everything from source #2210

Open Qubasa opened 3 years ago

Qubasa commented 3 years ago

Hello,

On NixOS the ELF loader has a different path, which makes pre-compiled binaries useless. I would like to know how to build every dependency from source with conan? I tired conan install --build always but that didn't work.

ilelann commented 3 years ago

I think you can't. I'm currently trying to do exactly that, after being unable to follow the official doc, which failed during conan steps too.

My attempt is here https://github.com/ilelann/IncludeOS. DISCLAIMER : Don't hope anything. Tests don't even link. It's probably totally broken. I will shamelessly amend the commit during progress, until it has any value.

I replaced conan with CMake's FetchContent. Doing so, you discover stuff like : includeOS relies on a patched s2n, which is totally hidden by prebuilt packages. I do refer to personal forks of dependencies to fix compilation: you can see them in the top level CMake file. And change as you see fit.

My two cents.

Qubasa commented 3 years ago

Yeeeeah... I think I will skip on using IncludeOS. I am following this blog https://os.phil-opp.com on how to implement your own x64 kernel in Rust I think that's the better approach :-)

ilelann commented 3 years ago

Just in case someone else cares, a note on progress: https://github.com/ilelann/IncludeOS/tree/build_from_scratch see commit msg for status, but basically: clone, checkout build_from_scratch, open in CLion/QtCreator/etc (any CMake aware IDE, with clang toolchain), run tests => OK (and to build it will download/build musl, llvm, gsl, etc. ... so be patient :) )

I will continue amending until I have anything bootable. For now the only feat is that all tests are standalone executables. (in other words, ldd will print "is not a dynamic executable"). And what I did with "_mockable"-suffixed libs is definitely dirty. I will try to clean that, but previous CMake setup was arguable too, IMHO.

Qubasa commented 3 years ago

Cool, thanks for your work! I would still really recommend to follow the blog, I have a working kernel right now and soon with async support plus you learn so much more ;)