Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conan build everything from source #2210

Open
Qubasa opened this issue Oct 6, 2020 · 4 comments
Open

Conan build everything from source #2210

Qubasa opened this issue Oct 6, 2020 · 4 comments

Comments

@Qubasa
Copy link

Qubasa commented Oct 6, 2020

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
Copy link

ilelann commented Oct 17, 2020

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
Copy link
Author

Qubasa commented Oct 17, 2020

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
Copy link

ilelann commented Oct 26, 2020

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
Copy link
Author

Qubasa commented Oct 27, 2020

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 ;)

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

No branches or pull requests

2 participants