Clang support for debian infrastructure.
GSoC 2012 Application. See at melange
Name: Dhananjay M Balan
Country: India
Email: mb DOT dhananjay AT gmail.com
Handles: gtalk mb.dhananjay, dhananjay at OFTC Freenode, @dhananjaynav at twitter.
Background: I am a sixth semester U.G Student in Computer Science and Engineering, College Of Engineering Trivandrum, India. I have been volunteering and developing with the free software community for the past seven years. Last summer I participated in the Google Summer of code 2011 under Google Open Source Programs Office. This was a GSoC project first proposed in the debian wiki and then moved to GOSPO because of its uniqueness of the domain and debatable deliverability to debian as an operating system. However I had a chance to work closely with debian during the last soc and I still keep that connection and work with my package.
My mentor for last summer was Steffen Moeller. I worked to create a streamlined way for preparing boinc servers in debian, and created a distributed molecular docking system using BOINC. It is documented here and here.
I am interested in GNU/Linux internals and system administration and I have knowledge in debian packaging and system internals.
Project title: clang support for debian infrastructure.
Project details: The project aims for a better integration of clang to debian.I am currently trying to extend Sylvestres' build hack to sbuild, make it switch compiler on the fly inside the chroot. This project will aim at improving it (sbuild) to have a general interface, allowing a pluggable compiler. And then make it compatible with the debian autobuilder network, allowing the uploaders to specify the compiler through wanna-build. It can be like this - buildd node passes compiler information to sbuild or create a buildd node which exclusively uses clang and then redirect the build requests to it.
Design Thoughts:
My idea is to focus first on the sbuild part making it to create clang based chroots on the fly and compile anything thats been feed into that chroot(or ability to swap compilers on the buid time to sbuild). This is relativly easy since clang.debian.net have given a proof. Doing it right will be the first hurdle. i.e it should be implemented as general as possible for future inclusion of other compilers.
Then I will work on integrating this with autobuilder network, I still have to familiarise with the system since I never used it directly. The work on sbuild should be extended on the buildd network.
And how should a maintainer pass information that his package should use clang? The debian source control using the ?user defined fields is a good place, but other options changing compilers in case of a failure etc should be taken care of.
Also the general system should have a way to switch the default compiler (update-alternatives ?)
Another hurdle is extending dpkg-buildpacakge for building pacakges in the bare system without any fancy things. This tool should be able to do it as isolated as possible. (d-bp --compiler= rather than changing the default compiler)
Synopsis: The project will increase the options for a maintainer to build his package. Even if the developer thinks clang as a non-mature compiler and doesnt wish to use it as production build, he can utilize the clang redirection to get more debug info about the builds. The memory and performance improvements clang promises in the future is also a plus.
Benefits to Debian
- Using a different compiler itself gives tremendous benefits to a big project like debian.
- Better code conformity to the standards.
- Will provide a switch back for emergency situations. etc etc
- And clang itself comes with a lot good news
- A better neatly written easily hackable code base, promising a much better compiler in future than what we have now
- Clang produces much better diagnostic information.
- I could not observe much performance improvement when switching to clang but definitely have a low memory footprint. But its the point one debian should really be excited about.
- Using a different compiler itself gives tremendous benefits to a big project like debian.
Deliverables:
- A compiler switching framework for debian build services and integrating clang to it. (time permitting - include other compilers)
- Streamlined way to switch gcc/clang for the general distribution.
- Integrate clang to package building workflows. (Most packages, come configured to build with gcc. Provide tools to handle them in the package repository itself.)
- I would like to stay back and work towards a fully clang built debian (My actual vacations are in Nov/Dec), but I cant complete it during the SoC.
Project schedule: I am considering SoC as a summer job.After my exams I can work full time till my class commences in mid july, after which I can spare about 15-20 hrs per week. My plan is to complete all difficult things before mid-july.
- April 25 - 1 may Getting to know the build services and designing the system.
- 1 - 25 cannot work. Exams.
- June : Work on integrating the package building workflows to integrate clang. Start working on the sbuild part.
- Mid term: Working switching system for sbuild,local systems and a framework design for autobuilder to use clang.
- August: Extend the system to generalize the binding plugging different compilers.
Exams and other commitments: I have exams from may 1 to 25. Other than that I am free.
Other summer plans: Its not summer around here. I am obliged to take regular classes from mid - july onwards.
Why Debian?: I love the community, the ecosystem and I use it as my main distro.
Are you applying for other projects in SoC? Yes. I am applying to Berkman Center for Internet & Society at Harvard University
