skip to main content
article
Public Access

Four languages and lots of macros: analyzing autotools build systems

Published:23 October 2017Publication History
Skip Abstract Section

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.mdGoogle ScholarGoogle Scholar
  2. 2017. BOA website. (2017). http://boa.cs.iastate.edu/boa/Google ScholarGoogle Scholar
  3. 2017. CMake Official Site. (2017). cmake.orgGoogle ScholarGoogle Scholar
  4. 2017. D2X-XL. (2017). https://sourceforge.net/projects/d2x-xl/Google ScholarGoogle Scholar
  5. 2017. GitHub software code repository. (2017). https://github.com/Google ScholarGoogle Scholar
  6. 2017. GNU Autoconf Manual. (2017). gnu.org/software/automake/ manual/html_node/GNU-Build-System.html#GNU-Build-SystemGoogle ScholarGoogle Scholar
  7. 2017. GNU Autotools. (2017). gnu.org/softwareGoogle ScholarGoogle Scholar
  8. 2017. GNU Compiler Collection (GCC). (2017). https://gcc.gnu.org/Google ScholarGoogle Scholar
  9. 2017. GNU Emacs. (2017). https://www.gnu.org/software/emacs/Google ScholarGoogle Scholar
  10. 2017. JavaCPP. (2017). https://github.com/bytedeco/javacppGoogle ScholarGoogle Scholar
  11. 2017. K Development Environment. (2017). www.kde.orgGoogle ScholarGoogle Scholar
  12. 2017. M4 macro language. (2017). https://www.gnu.org/software/m4/ m4.htmlGoogle ScholarGoogle Scholar
  13. 2017. Map Server Official Site. (2017). mapserver.orgGoogle ScholarGoogle Scholar
  14. 2017. Map Server: Request to migrate to CMake. (2017). mapserver. org/development/rfc/ms-rfc-92.htmlGoogle ScholarGoogle Scholar
  15. 2017. Open SSH. (2017). https://www.openssh.com/Google ScholarGoogle Scholar
  16. 2017. Open VPN. (2017). https://openvpn.net/Google ScholarGoogle Scholar
  17. 2017. SourceForge software code repository. (2017). https:// sourceforge.net/Google ScholarGoogle Scholar
  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 .Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. G. Kumfert and T. Epperly. 2002. Software in the doe: The hidden overhead of the build . Lawrence Livermore National Laboratory.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Alexander Neundorf. 2017. Why the KDE project switched to CMake. (2017). lwn.net/Articles/188693/Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarCross RefCross Ref
  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-kdeGoogle ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • 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

      Copyright © 2017 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 23 October 2017

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!