New comment by zippy2 on void-packages repository https://github.com/void-linux/void-packages/issues/14721#issuecomment-541519667 Comment: > I don't know for sure if libvirt ever worked on musl since I've never tried it. But if this is the only issue there is on musl, it should have worked before the last update. Version 5.7.0 introduced the virHostGetBootTime() check and thus also stopped working on Void glibc systems. This was solved by writing a record to utmp at boot time. > > I'm not sure how we should deal with this. Libvirt is using POSIX functions here so they are not relying on something that generally is libc specific. Musl implements the POSIX specifications which only states that these functions shall be declared and function prototypes shall be provided, not that the functions actually have to do anything. Wait what? Can you elaborate more please? I'm the one who wrote that code and I don't recall seeing this behaviour documented somewhere. How can one write good software when libraries are playing tricks like this? Our code is #ifdef-ed and at configure time presence of getutxid() is checked. I can put another case for linux systems that don't have the function (presumably the function will read /proc/uptime and then do some time calculations). > > I tried earlier to pretend that the function is not available and compile libvirtd that way but that just makes it error out with a different error. Yes, because libvirt's philosophy is to use POSIX and be able to compile on POSIX systems. Anything that's above has to be in a separate module.