Debian

Wiki

Login
  • FrontPage
  • RecentChanges
  • FindPage
  • HelpContents
  • MohitBhakkad
Debian
Wiki/
  • Login
  • Comments
  • Info
  • Attachments

  • SummerOfCode2015
  • StudentApplications
  • MohitBhakkad

  • Name: Mohit Bhakkad

  • Project title: Bootable Clang-Built Debian

  • Contact/Email/IRC nick:

    • Email: mohit.bhakkad@gmail.com

    • IRC nick: mohit7

    • Phabricator: LLVM Reviews

    • Github: github.com/Mohit7

  • Background: I am a 21 year old computer science student from Pune, India. I have been programming from past four years, and am well versed with C/C++, shell scripting and some other high level languages like Python, Java etc. From past one year, I have been contributing to llvm/compiler-rt, clang and lldb which included MIPS port for sanitizers and some part of clang, lldb. Before that I have worked on improving the efficiency of twitter-storm project, and some database related projects which included REST APIs and NoSQL databases. These projects can be found here.

    • I am already in love with clang and very excited to use it to improve my day-to-day operating system.
  • I am right for this project because:

    • I have strong programming skills and experience with C, C++.
    • I have good understanding of Debian Packaging and building.
    • I have good exposure with clang and llvm framework.
    • I have experience of VCS, bugtrackers and mailing lists.
    • I have already started my research to show my interest:
      • Studied dependency related flags in packages and listed packages required to bootstrap a minimal Debian system.
      • Learned Debian packaging throughly and reproduced some of the errors listed on clang.debian.net while building with clang.

      • Set up a basic chroot system and tried installing some clang-compiled packages.
      • Learning about bootstrapping an OS.
  • Synopsis: The goal of this project is to produce a minimal bootable Debian which is built with Clang.

  • Project details:

    • This project is one of the future steps for its mother project clang.debian.net, which was started with the aims:

      • To rebuild the Debian archive with clang.
      • To find and categorise errors which are undetected by gcc.
      • To provide patches to solve the found errors.
        • This will make code more aligned with latest C/C++ standard improving the security and overall compatibility of the system.
      Some of the previous GSoC projects towards this direction are:
      • Clang support for build services(GSoC '12)
      • Provide an alternative to libstdc++ with libc++(GSoC '12)
      • scan-build on the Debian archive(GSoC '13)
      • Debian built with clang(GSoC '14)

      One of the deliverables of clang.debian.net is to create a repository of packages built with clang, and to fulfill this, this project seeks to start with a small minimal subset of packages required to run an OS.

  • Requirements:

    • I have tried to address all the 3 requirements for this project, and documented these in a github repository:

      • #1. The list of packages which must be fixed to reach this objective:

        • I have studied dependency related flags in Debian packages, and I feel that we should consider all the packages which are marked with priority field : "required".
        • If we go in more deep, out of all 61 required packages, 25 packages are "Essential" packages, and remaining required packages are dependencies (direct or transitive) of these "Essential" packages, which are known as pseudo-essential.
        • And then to satisfy dependency of these "required" packages,we require:
          • insserv (dependency of sysvinit)
          • libsemanage1 (dependency of shadow)
          • libsemanage-common (dependency of libsemanage1)
          • ustr (dependency of libsemanage-common)
        • This makes the list to be considered for our minimal bootstrapable Debian. Which I have uploaded as required.list.

        • Now we need to find which packages are failing with Clang. For now I have used data from clang.debian.net, and listed some failing packages in failing.list.

        #2. A patch to fix a bug:

        • I have tried to fix Bug #777914 for insserv with a patch:

        • As per my understanding, here problem is a wrong assumption about declared variables with respect to STDC_VERSION.

        • This issue doesn't pop up with gcc based build-essential, because some of the Standard Predefined Macros (here STDC_VERSION) are not set in gcc.

        • I have uploaded the patch as undeclare_identifier.patch.( Right now not as per submission standards, but I am trying to learn it soon).

        • **Update: I have submitted the patch on bugs.debian.org.

        #3. Step by step documentation on how to make a bootable Debian:

        • I have tried it on my board, and have documented the steps here.

  • Benefits to Debian: Debian's most basic and critical packages would have code conforming to the C standards which surely will be a great takeaway for Debian from this project.

  • Deliverables:

    • A set of packages built with Clang.
    • List of packages which are not building with clang.(Goal is to reduce this to zero)
    • Patches for packages not building with clang.
  • Project schedule:

    • Mar 16 - Mar 27 : Application Period
    • Mar 27 - Apr 27 : Applications evaluation period
      • This time can be utilized as a pure research time for preparation of project:
      • To learn thoroughly about previous related projects, their results and conclusions.
      • To communicate with mentor to clear any doubt regarding the project.
      • To perform pre-coding tasks given by mentor.
    • Apr 27 - May 25 : Community bonding
      • To continue communicating with mentor.
      • To know more about Debian Community and its processes.
      • To learn how bug system and patch submission works in Debian.
    • May 25 - Aug 17:
      • This is a the basic order of tasks to be performed, will become more clear while communicating with mentor:
      • Identify list of packages required for bootstrapping Debian.
      • To confirm this list by actually bootstrapping Debian using gcc build-essentials.
      • Then try to build and install packages using clang.
      • To list out packages which are not compiling, building or installing, categorize these according to reasons of failure.
      • Subsequently submit bugs for these.
      • To find and apply solutions to solve these bugs.
      • Submit these solutions as patches.
      To continue this process to reduce number of failing packages and to move towards final goal i.e. a bootable Debian built with Clang.
      • A rough schedule for coding period:
      • May 25 - June 25:
        • Communicate with the team of Debian-Clang to decide the approach.
        • To have a list of packages which are failing with Clang, with reasons and categories.
        • Bug submission for above packages.
        • Documentation of the work till this date.
      • June 26 - July 3:
        • Mid-term Evaluation.
      • July 4 - Aug 17:
        • Finding solutions for failing packages.
        • Patch submission and communication with upstream projects to resolve issues.
        • Try to reduce number of failing packages to zero.
        • Finishing Documentation.
      • Aug 17 - Aug 21:
        • Final testing, results and conclusions.
      • Aug 21 - Aug 28:
        • Final evaluation.
        • Submission of work done.
  • Exams and other commitments: No exams.

  • Other summer plans: No other plans.

  • Why Debian?: I am using Debian from the day I was introduced to Linux, and would love to join this wonderful community as a contributor.

  • Are you applying for other projects in SoC? Yes, I am applying to another Debian project "Archive built with asan", but this project would be my priority.

SummerOfCode2015/StudentApplications/MohitBhakkad (last modified 2015-04-05 09:43:05)

  • Debian privacy policy, Wiki team, bugs and config.
  • Powered by MoinMoin and Python, with hosting provided by Metropolitan Area Network Darmstadt.