-
Notifications
You must be signed in to change notification settings - Fork 9
Config.uk: Fix dependency issues & defaults #6
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
Conversation
Unless specifically required (like by app-sqlite) the main function should not be provided by default. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
This change replaces the hard select of LIBUKMMAP and LIBNEWLIBC, using more appropriate relationships. In addition, lib-sqlite will no longer select itself by default. Signed-off-by: Andrei Tatar <andrei@unikraft.io>
mariasfiraiala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok, thanks @andreittr!
Reviewed-by: Maria Sfiraiala maria.sfiraiala@gmail.com
|
Updated w/ 1 new commit; please re-review, thanks! |
mariasfiraiala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works as expected. However it's a bit weird not having the library show up in the menu unless musl is selected.
Reviewed-by: Maria Sfiraiala maria.sfiraiala@gmail.com
StefanJum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreittr is there a way to have lib-sqlite depend on a libc but have it show up in the menufonfig anyway if no libc is selected?
I would use depends on as less as possible, since it's confusing to not have the library show up in the menuconfig, and since you don't always know the dependencies from the top of your head. It's frustrating to have to search for them, enable them and then select the library you want.
I see your point re: visibility of dependent config options; the one solution I see is to error out of the build process with an explicit check for Basically we have to decide which situation would inconvenience users less: |
100% agree. I would go for (2), as I personally would hate to add a library to the Thoughts @mariasfiraiala @razvand ? LE: We already use (2) in |
|
I'd also go with no. 2, just like @StefanJum suggested. Easier for both the users and us. |
Fun fact: that example has been done precisely because lib-compiler-rt and libunwind (used to) have a circular dependency on eachother. The PR unikraft/lib-compiler-rt#14 halfway solves this issue, making the check redundant, unikraft/lib-compiler-rt#19 proposes to remove this check altogether and I've got a soon-to-be-PRed patch for libunwind that lets it simply |
|
After some more consideration, I believe there are, despite its downsides, still several strong arguments in favour of using Kconfig dependency instead of erroring out:
I also think the downside of the library being hidden with
Thoughts? @StefanJum @mariasfiraiala @razvand |
Agree with the points, it's clearly a lot better to generally have config dependencies instead of build errors. The only thing I really don't like it's the verbosity of the config dependencies. If we error out at the build it can be clear for everyone what's missing. If we have some weird config dependencies, there is no way to figure them out other than looking in the libraries That being said, I'm totally fine with a dependency like this one ( |
StefanJum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@razvand you can do your magic.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com
I think you could get into this situation only if B, C and so on are all stuff like libc that have multiple implementations (otherwise we'd just use a |
Yes, exactly 🙏 |
razvand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved-by: Razvan Deaconescu razvand@unikraft.io
This change replaces the hard select of LIBUKMMAP and LIBNEWLIBC, using more appropriate relationships. In addition, lib-sqlite will no longer select itself by default. Signed-off-by: Andrei Tatar <andrei@unikraft.io> Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #6
Unless specifically required (like by app-sqlite) the main function should not be provided by default; lib-sqlite should also not be enabled by default if included (in line with other libs)
In addition, remove the hard select of UKMMAP and LIBNEWLIBC, allowing the use of posix-mmap & musl.
edit: Added new commit, renamed to be more descriptive of issues fixed