Compatibility Analysis of Standard C Library Substitution for openEuler
-
Graphical Abstract
-
Abstract
Most Linux distributions are using the powerful GNU C library (glibc) as their standard C library (or C library for short), but the LGPL protocol has items against commercial use, which restricts the promotion of commercial Linux distributions. A possible solution is to build a new C library by complementing a defective (compared with glibc) but business-friendly one, and substitute glibc with the new library. openEuler chooses MIT-licensed musl libc as the prototype of new C library. It is crucial for the new C library to be compatible to existing applications, and a precise method of compatibility analysis can not only identify missing APIs, but also quantitatively determine the compatibility and the priorities of missing APIs. We present a study of musl libc’s compatibility and missing APIs' priorities on four main software ecosystems of openEuler. Based on dependency relations between applications and Google PageRank, we propose two algorithms named PackageRank and APIRank for RPM packages’ compatibility measurement and APIs’ priority calculation respectively. The algorithms provide a system-specific way of compatibility analysis, and the information for input can be easily obtained, making the algorithms suitable for incomplete and lacking-statistic systems and modules. The results of our analysis on musl libc are clear and accurate, and are in line with the characteristics and status quo of the ecosystems as well as the opinion of international developers from musl libc’s community. We believe that the results can effectively benefit the complementation work on C library of openEuler.
-
-