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
Support for musl C library #47
Conversation
Make it work with musl where comparison_fn_t is not provided Based on work by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Original patch author: Emil Renner Berthing <systemd@esmil.dk> Includes work by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Based on work by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Why don't you patch yocto's build of musl to provide As you are not copyright holder, it would be nice to hear from Tim or Intel if they want this contributed. Overall, normally systemd & systemd-bootchart target full glibc based systems. So I am kind of indifferent to taking this patches. Looks like CI has regressed and not running on this repository. We should fix CI, and do build against glibc. And if we are to merge this patch, also enable builds against musl to ensure it doesn't regress. As most integrators do not use musl. |
musl has decided to not implement it and carrying such a patch will be permanent diversion. Perhaps someone can
some of them are from me and its fine to contribute them here.
yes, and perhaps some of these patches will help to reduce the delta for non-glibc systems without much of trouble to maintainers. if not thats fine.
That will be awesome. |
As mentioned many times, these sort of patches should be maintained in the musl package in distributions that ship it, rather than being sprinkled all over the place. The standard on Linux is glibc, and Linux distributions need to support that standard. |
glibc is not any kind of standard, it's an implementation of the standards, which are defined in published POSIX and ISO C documents. If systemd aims to be compatible with only one implementation of those specifications, then please don't do so under the pretense of 'standards'. |
It's the standard for Linux. 'standard' doesn't just mean something certified by ISO or some other committee. |
It is not required by the linux kernel, or by userspace. The only significant piece that is glibc-specific is systemd. Yocto ships musl systems, and so does buildroot, so musl is a viable, and widely used option in embedded Linux. |
Considering that there's plenty of musl-specific patches all over the place, I am having a really hard time believing that - just a quick grep of 'musl' through Yocto's git log shows a very different picture
Then Yocto and Buildroot have three choices:
We are not going to be stuck with the lowest common denominator and drop widely used and useful interfaces, sorry. |
These patches happen because upstreams unknowigly introduce glibc-specific code, which is then fixed in yocto, and fixes are submitted back to them. The only upstream which actively rejects such fixes is systemd, others tend to accept them. Other points I'm not going to continue to argue with. Your position is clear. |
I can't be bothered to check, but I'm pretty sure I saw other projects rejecting some of these changes too in the past. And rightfully so, given some of those changes are really wrong and introduce serious security bugs, such as dropping AT_SYMLINK_NOFOLLOW all over the place. |
You don't need to check. As someone who is maintaining the bulk of core Yocto recipes I'm telling you: musl fixes tend to be accepted. I have looked at one such just now, to confirm it can be dropped on a version update: The only patch in Yocto that even mentions AT_SYMLINK_NOFOLLOW is another rejected patch to systemd proper. It may be technically incorrect and in need of a rework, but you can't generalize from that to upstreams generally not willing to support musl. The only one that holds that position is systemd. Given all this, should Yocto documentation recommend avoiding using systemd with musl, as it requires a ton of custom patches? Would you be ok with users of yocto seeking alternatives to systemd if we do so? |
No, instead Yocto's documentation should recommend to avoid using musl altogether, given how projects have to be patched in such a broken way to adapt to its outdated and broken interfaces, introducing bugs and security issues in the process. |
musl is a small, embedded-oriented alternative to glibc. These patches address issues when using systemd-bootchart with it, and are taken from Yocto project:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/systemd-bootchart/systemd-bootchart