clang support for build services
Name: Jacinto Revuelta
Contact/Email: +5218116864403 / firstname.lastname@example.org
Background: I’m a 23 years old senior Computer Engineering student from Mexico. I’m currently studying at ITESM Campus Monterrey, the best Mexican college in technology. I’ve had school programming experience in Java, C and Matlab and working experience in both C and Python. I have used different Linux flavors for the last 5 years and I’ve been a supporter of open source software since then. I’ve already learnt the Archlinux pakaging system and been hacking around Debian’s packaging system for around a month. I am the most qualified for the project because I have already started working closely with Sylvestre Ledru (email@example.com) in making improvements to the build infrastructure.
Source repository: https://github.com/chintux/clang-support-for-build-services
Project title: clang support for build services
Project details: The project involves modifying the Debian Project’s build infrastructure so it accepts different compilers and use clang to build a Debian distribution. This will involve modifying several Debian’s programs, like the dpkg-buildpackage, debuild and sbuild (and its related services: wanna-build and buildd) so they support the new options. These new options will include changing the C compiler, C++ compiler, Objective C compiler and Fortran compiler. At the end of the project, we will be able to automatically compile packages using clang, icc, ifort or any other compiler.
- Analyzing the several ways to implement this project, I compared the different approaches:
- The compiler to use is specified in the .dsc file:
- advantages The maintainer can specify if gcc, clang or any (ideally, they would choose any). The same autobuilder will be able to compile with both compilers .
- disadvantages We will need to change ALL of the .dsc files.
- The compiler to use is specified in the autobuilder's conf:
- advantages An easier implementation; in this mode, the autobuilder would acts as if it were just an autobuilder for a new 'arch', named clang_i386, etc. We will not need to change anything from the .dsc files.
- disadvantages The auto builder would read the conf file and act accordingly, so it would be tied to one compiler until the conf file is changed and the daemon forced to read it again (not such a big deal).
The best method would be to choose the compiler inside the autobuilder’s conf file.
Synopsis: Integrate clang into Debian’s build services.
Benefits to Debian: Debian will benefit because the package’s quality will improve by using different compilers to improve our detection of errors. Debian will also benefit by exposing bugs, making most of clangs error/warning messages. Debian’s build infrastructure will become future proof, as it will be ready if another compiler becomes the most popular in the open source world. The source code for this project will help other Linux distributions adopt the same flexibility of choosing the compiler into their build infrastructures.
Deliverables: A patched version of dpkg-buildpackage that will provide a clear and easy way to switch from the standard gcc-based compilation. A patched version of wanna-build where the debian maintainer can explicitly tell the autobuilder which compilers to use. A patched version of buildd that recognizes the new options and calls sbuild accordingly. A patched version of sbuild that accepts the explicit option of using a certain compiler. A patched version of debuild that passes the options down to dpkg-buildpackage. A fully clang-built Debian distribution.
Project schedule: how long will the project take? When can you begin work?
I can begin full time work for this project in May 15, right after my semester’s final exams.
- 1 week: Finish modifying the core package building programs (dpkg-buildpackage, debuild) 7 weeks: Setup a local sbuild autobuilder. Modify wanna-build, sbuild, and build to accept the new options. 4 weeks: Make a fully clang-built Debian installation. 1 week: Write documentation for the deliverables.
Exams and other commitments:
No other commitments.
Other summer plans:
No other summer plans.
The Debian Project is one of the most influential open source projects in the entire world and by updating its build infrastructure Debian will continue to innovate and lead the way for other Linux distributions. It is worth mentioning that Debian has always been my favorite Linux distribution as I understand the great amount of work required to maintain and ship such a complex product with its excellent quality.
- I will NOT be applying for more Summer of Code Projects.