高级检索
    吴亦泽, 于佳耕, 郑晨, 武延军. openEuler中C标准库替换的兼容性分析[J]. 计算机研究与发展, 2023, 60(7): 1514-1532. DOI: 10.7544/issn1000-1239.202220772
    引用本文: 吴亦泽, 于佳耕, 郑晨, 武延军. openEuler中C标准库替换的兼容性分析[J]. 计算机研究与发展, 2023, 60(7): 1514-1532. DOI: 10.7544/issn1000-1239.202220772
    Wu Yize, Yu Jiageng, Zheng Chen, Wu Yanjun. Compatibility Analysis of Standard C Library Substitution for openEuler[J]. Journal of Computer Research and Development, 2023, 60(7): 1514-1532. DOI: 10.7544/issn1000-1239.202220772
    Citation: Wu Yize, Yu Jiageng, Zheng Chen, Wu Yanjun. Compatibility Analysis of Standard C Library Substitution for openEuler[J]. Journal of Computer Research and Development, 2023, 60(7): 1514-1532. DOI: 10.7544/issn1000-1239.202220772

    openEuler中C标准库替换的兼容性分析

    Compatibility Analysis of Standard C Library Substitution for openEuler

    • 摘要: 当前大多数Linux发行版使用功能强大的glibc(GNU C library)作为C标准库(简称C库),但glibc的LGPL协议存在商用不友好条款,制约了商业Linux发行版的推广. 一种可行的解决方案是选择某个与glibc相比尚有功能缺陷但适宜商用的C库加以补全,从而制成新的C库以替代glibc. 开源欧拉(openEuler)操作系统社区以MIT协议的musl libc作为新的C库选型. 新C库对已有应用软件的兼容是成功替换的关键,而精确的兼容性分析算法不仅可以定位缺失API,还可以量化计算兼容性和API补全的优先级. 为此,提出兼容性分析算法来研究openEuler的4种主要软件生态中的musl libc兼容性和缺失API优先级. 基于应用软件包之间的依赖关系和谷歌PageRank算法的思想,提出了PackageRank算法和APIRank算法,分别用于软件包兼容性度量和优先级计算. 这2种算法提供了系统个性化兼容分析的方法,所需信息易于获取,适用于缺乏用户数据统计的、尚不完整而仍有开发需求的系统及构件. 这2种算法在musl libc上的分析结果清晰准确,与软件生态的特点和现状相符,与musl libc的国际社区开发者的观点接近,为openEuler的新C库补全工作提供了有效指导.

       

      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.

       

    /

    返回文章
    返回