Nothing Special   »   [go: up one dir, main page]

skip to main content
article
Public Access

Four languages and lots of macros: analyzing autotools build systems

Published: 23 October 2017 Publication History

Abstract

Build systems are crucial for software system development, however there is a lack of tool support to help with their high maintenance overhead. GNU Autotools are widely used in the open source community, but users face various challenges from its hard to comprehend nature and staging of multiple code generation steps, often leading to low quality and error-prone build code. In this paper, we present a platform, AutoHaven, to provide a foundation for developers to create analysis tools to help them understand, maintain, and migrate their GNU Autotools build systems. Internally it uses approximate parsing and symbolic analysis of the build logic. We illustrate the use of the platform with two tools: ACSense helps developers to better understand their build systems and ACSniff detects build smells to improve build code quality. Our evaluation shows that AutoHaven can support most GNU Autotools build systems and can detect build smells in the wild.

References

[1]
2017. ANTLR 4.0. (2017). https://github.com/antlr/antlr4/blob/master/ doc/index.md
[2]
2017. BOA website. (2017). http://boa.cs.iastate.edu/boa/
[3]
2017. CMake Official Site. (2017). cmake.org
[4]
2017. D2X-XL. (2017). https://sourceforge.net/projects/d2x-xl/
[5]
2017. GitHub software code repository. (2017). https://github.com/
[6]
2017. GNU Autoconf Manual. (2017). gnu.org/software/automake/ manual/html_node/GNU-Build-System.html#GNU-Build-System
[7]
2017. GNU Autotools. (2017). gnu.org/software
[8]
2017. GNU Compiler Collection (GCC). (2017). https://gcc.gnu.org/
[9]
2017. GNU Emacs. (2017). https://www.gnu.org/software/emacs/
[10]
2017. JavaCPP. (2017). https://github.com/bytedeco/javacpp
[11]
2017. K Development Environment. (2017). www.kde.org
[12]
2017. M4 macro language. (2017). https://www.gnu.org/software/m4/ m4.html
[13]
2017. Map Server Official Site. (2017). mapserver.org
[14]
2017. Map Server: Request to migrate to CMake. (2017). mapserver. org/development/rfc/ms-rfc-92.html
[15]
2017. Open SSH. (2017). https://www.openssh.com/
[16]
2017. Open VPN. (2017). https://openvpn.net/
[17]
2017. SourceForge software code repository. (2017). https:// sourceforge.net/
[18]
B. Adams, K. de Schutter, H. Tromp, and W. de Meuter. 2008. The evolution of the Linux build system. In Electronic Communications of the ECEASST .
[19]
B. Adams, H. Tromp, K. de Schutter, and W. de Meuter. 2007. Design recovery and maintenance of build systems. In Proceedings of the 23rd International Conference on Software Maintenance (ICSM ’07) . 114–123.
[20]
J. M. Al-Kofahi, H. V. Nguyen, A. T. Nguyen, T. T. Nguyen, and T. N. Nguyen. 2012. Detecting semantic changes in Makefile build code. In Proceedings of the 28th International Conference on Software Maintenance (ICSM ’12) . 150–159.
[21]
J. M. Al-Kofahi, H. V. Nguyen, and T. N. Nguyen. 2014. Fault localization for Make-Based build crashes. In Proceedings of the 30th International Conference on Software Maintenance and Evolution (ICSME ’14) . 526– 530.
[22]
J. M. Al-Kofahi, T. Nguyen, and C. Kästner. 2016. Escaping AutoHell: A Vision for Automated Analysis and Migration of Autotools Build Systems. In Proceedings of the 4th International Workshop on Release Engineering (RELENG ’16) . 12–15.
[23]
T. H. Austin and C. Flanagan. 2012. Multiple Facets for Dynamic Information Flow. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’12) . 165–178.
[24]
C. Dietrich, R. Tartler, W. Schröder-Preikschat, and D. Lohmann. 2012. A Robust Approach for Variability Extraction from the Linux Build System. In Proceedings of the 16th International Software Product Line Conference - Volume 1 (SPLC ’12) . 21–30.
[25]
R. Dyer, H. A. Nguyen, H. Rajan, and T. N. Nguyen. 2013. Boa: A Language and Infrastructure for Analyzing Ultra-large-scale Software Repositories. In Proceedings of the 35th International Conference on Software Engineering (ICSE ’13) . 422–431.
[26]
M. Gligoric, W. Schulte, C. Prasad, D. van Velzen, I. Narasamdya, and B. Livshits. 2014. Automated Migration of Build Scripts Using Dynamic Analysis and Search-based Refactoring. In Proceedings of the 2014 International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA ’14) . 599–616.
[27]
R. Hardt and E. V. Munson. 2013. Ant Build Maintenance with Formiga. In Proceedings of the 1st International Workshop on Release Engineering (RELENG ’13) . 13–16.
[28]
L. Hochstein and Y. Jiao. 2011. The Cost of the Build Tax in Scientific Software. In Proceedings of the 5th International Symposium on Empirical Software Engineering and Measurement (ESEM ’11) . 384–387.
[29]
N. Kerzazi, F. Khomh, and B. Adams. 2014. Why Do Automated Builds Break? An Empirical Study. In Proceedings of the 30th International Conference on Software Maintenance and Evolution (ICSME ’14) . 41–50.
[30]
G. Kumfert and T. Epperly. 2002. Software in the doe: The hidden overhead of the build . Lawrence Livermore National Laboratory.
[31]
C. Macho, S. McIntosh, and M. Pinzger. 2017. Extracting Build Changes with BuildDiff. In Proceedings of the 14th International Conference on Mining Software Repositories (MSR ’17) . 368–378.
[32]
D. H. Martin and J. R. Cordy. 2016. On the Maintenance Complexity of Makefiles. In Proceedings of the 7th International Workshop on Emerging Trends in Software Metrics (WETSoM ’16) . 50–56.
[33]
D. H. Martin, J. R. Cordy, B. Adams, and G. Antoniol. 2015. Make It Simple: An Empirical Analysis of GNU Make Feature Use in Open Source Projects. In Proceedings of the 23rd International Conference on Program Comprehension (ICPC ’15) . 207–217.
[34]
S. McIntosh, B. Adams, T. H. D. Nguyen, Y. Kamei, and A. E. Hassan. 2011. An empirical study of build maintenance effort. In Proceedings of the 33rd International Conference on Software Engineering (ICSE ’11) . 141–150.
[35]
J. Meinicke, C. Wong, C. Kästner, T. Thüm, and G. Saake. 2016. On Essential Configuration Complexity: Measuring Interactions in Highlyconfigurable Systems. In Proceedings of the 31st International Conference on Automated Software Engineering (ASE 2016) . 483–494.
[36]
Alexander Neundorf. 2017. Why the KDE project switched to CMake. (2017). lwn.net/Articles/188693/
[37]
H. V. Nguyen, C. Kästner, and T. N. Nguyen. 2014. Exploring Variabilityaware Execution for Testing Plugin-based Web Applications. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014) . 907–918.
[38]
K. Sen, G. Necula, L. Gong, and W. Choi. 2015. MultiSE: Multi-path Symbolic Execution Using Value Summaries. In Proceedings of the 10th Joint Meeting on Foundations of Software Engineering (ESEC/FSE ’15) . 842–853.
[39]
H. Seo, C. Sadowski, S. Elbaum, E. Aftandilian, and R. Bowdidge. 2014. Programmers’ Build Errors: A Case Study (at Google). In Proceedings of the 36th International Conference on Software Engineering (ICSE ’14) . 724–734.
[40]
R. Suvorov, M. Nagappan, A. E. Hassan, Y. Zou, and B. Adams. 2012. An empirical study of build system migrations in practice: Case studies on KDE and the Linux kernel. In Proceedings of the 28th International Conference on Software Maintenance (ICSM ’12) . 160–169.
[41]
A. Tamrawi, H. A. Nguyen, H. V. Nguyen, and T. N. Nguyen. 2012. Build code analysis with symbolic evaluation. In Proceedings of the 34th International Conference on Software Engineering (ICSE ’12) . 650–660.
[42]
Troy Unrau. 2017. The Road to KDE 4: CMake, a New Build System for KDE. (2017). dot.kde.org/2007/02/22/ road-kde-4-cmake-new-build-system-kde
[43]
S. van der Burg, E. Dolstra, S. McIntosh, J. Davies, D. M. German, and A. Hemel. 2014. Tracing Software Build Processes to Uncover License Compliance Inconsistencies. In Proceedings of the 29th International Conference on Automated Software Engineering (ASE ’14) . 731–742.
[44]
S. Zhou, J. M. Al-Kofahi, T. N. Nguyen, C. Kästner, and S. Nadi. 2015. Extracting Configuration Knowledge from Build Files with Symbolic Analysis. In Proceedings of the 3rd International Workshop on Release Engineering (RELENG ’15) . 20–23.

Index Terms

  1. Four languages and lots of macros: analyzing autotools build systems

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 52, Issue 12
    GPCE '17
    December 2017
    258 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/3170492
    Issue’s Table of Contents
    • cover image ACM Conferences
      GPCE 2017: Proceedings of the 16th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
      October 2017
      258 pages
      ISBN:9781450355247
      DOI:10.1145/3136040
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 23 October 2017
    Published in SIGPLAN Volume 52, Issue 12

    Check for updates

    Author Tags

    1. Autoconf
    2. GNU Autotool
    3. build maintenance
    4. build-system

    Qualifiers

    • Article

    Funding Sources

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)112
    • Downloads (Last 6 weeks)20
    Reflects downloads up to 25 Nov 2024

    Other Metrics

    Citations

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media