Thursday, March 31, 2011

FOSDEM Trip Report: Brooks Davis

Brooks Davis has provided the following trip report for FOSDEM 2011; it includes some interesting notes on clang/llvm.

I attended the FOSDEM 2011 conference in Brussels, Belgium on the weekend of February 5th and 6th.

As usual FOSDEM kicked off with the massive beer event on Friday night. An absurd number of geeks packed four bars and consumed tremendous amounts of beer until the wee hours of the night.

The next morning the conference started off with an opening session at 10 including the (in)famous FOSDEM Dance followed by keynotes at 10:45 and 11:45.

The first keynote was by Eben Moglen of the Software Freedom Law Center. He argued for the creation of decentralized alternatives to systems like Facebook and promoted the creation of mesh based alternative networks using plug computers. He also promoted his new FreedomBox Foundation which aims to create and promote these devices.

The second key note was a talk by Chris Lattner of the LLVM project. He provided an overview of the LLVM project and the various tools developed under its umbrella. What once started as a toolkit of compiler building blocks has become an umbrella project encompassing tools including a C/C++/Objective-C compiler, a debugger, code analysis tools, and support libraries. He also mentioned ongoing work to replace many other pieces of binutils with a LLVM derived version. He promoted several advantages of LLVM over its competitors including a modern code base, faster generation of code that also runs faster (in some cases), and the library approach to tool building allowing tool reuse in interesting and new ways. One example is the use of the clang compiler libraries to parse expressions in the lldb debugger so you can be certain they evaluate exactly as the compiler would have evaluated them. I had seen some of the slides in the talk before, but the amount of progress since the last time was remarkable with several new sub-projects and production quality C++ support.

After the keynotes I took a lunch break while Martin Matuska's ZFS in Open Source Operating Systems talk packed the BSD Devroom. I then attended the next talk by Aleksey Cheusov on a system called mk-configure which is a bmake derived build and configuration system aimed at replacing autotools. He has some interesting ideas and the system looks like it would be comfortable for a BSD developer to use, but it seems like there are limits on the number of autoconf alternatives the world can handle. The next talk was unfortunately canceled due to the speakers' inability to leave Egypt due to the turmoil there. In the 4pm slot Marc Balmer talked about the import of Lua into NetBSD. He proposed a number of potential uses for Lua in the base system including as an extension language in place of things like the script dhclient runs to configure things when leases change and the use of Lua scripts as configuration files. One thing I found interesting was that NetBSD decided to import Lua based on its potential usefulness rather than based on an actual application. While I could see FreeBSD bringing it in, I can't see it happening without a specific use case. Another interesting point that was raised was what sort of error handling the interpreter had when Lua was used as a configuration language. One person rightly pointed out that you won't want your daemon to hang forever if a configuration file has an infinite loop in it.

The next session was my mini-summit on BSD licensed toolchains. We didn't quite fill the room but attendance was quite good. I had solicited input from a number of projects on their use of BSD licensed tools and got status reports from NetBSD and Minix 3. I started out with an update from FreeBSD including the fact that we were nearly able to build and run 100% clang/LLVM worlds on i386 and amd64 and that we have imported them into the tree. I also talked about the things we are missing including cross compilation driver support in clang, C++ exception handling for libgcc, a port of libc++, a linker, and a debugger. Marc Balmer gave a short toolchain status presentation from NetBSD. With their support for legacy architecture like VAX they are interested in tools like clang, but have also imported recent versions of GCC. On Sunday Marc mentioned to me that they had imported clang and LLVM over night which was interesting timing. Minix 3 also
talked about their efforts to move from ATK to clang and LLVM. They are in the early stages and are also planning an a.out to ELF transition in a similar time frame.

After the status reports we had a general discussion and Q&A. One audience member mentioned that he had done a port of the Apache C++ standard library to IA64 along with exception handling code. He said that starting with the BSD licensed libunwind it is maybe a week's work to implement which was good to hear. Another audience member mentioned that he was interested in pursuing cross compiler support in clang. Chris Lattner mentioned that he thought it should be quite easy to do. All the code generation machinery is there, the driver just needs to learn about the paths to all the tools, headers, and libraries when passed a non-native target architecture. Chris also mentioned a developer who is working on a number of projects including a linker. It's not clear where the linker is on his project list, but Chris feels confident it's well within his grasp. Over all there was a lot of optimism about bringing LLVM based tools to non-Apple platforms and the
momentum and breadth of those efforts seem to be growing.

The slides from my intro and status report can be found here.

After my session I hit the hallway track and checked out the BSD booth where fliers and FreeBSD DVDs were moving quickly. Dinner with fellow developers followed.

Sunday was more of a hallway track day as nearly all the sessions I was interested in were scheduled at 11am. The session I did attend was Axel Beckert's talk on Debian GNU/kFreeBSD. He gave a general overview of the project and the status including the fact that along with Debian's 6.0 release the night before Debian GNU/kFreeBSD was now an official Debian port. The current port is considered a Technology Preview due to some key pieces not yet being ported. For example the Linux compatible wrapper to the BSD ifconfig command does not yet support IPv6. Over all it sounds like the community is supportive and the number of packages that build approach that of many other Debian ports. At the end of the talk one FreeBSD developer joked that this is clearly a sign that Linux is dying and that Debian GNU/kFreeBSD provides a transition plan.

At the end of the day I attended Jonathan Corbet's talk titled "How kernel development goes wrong and why you should be a part of it anyway." My main takeaway from the talk was that it's crucial to provide a solid reason from a kernel developer's perspective why a feature should be adopted before proposing it to Linux. While I can see some problems with a world where this is a requirement, it still seem like a good idea overall when proposing a major change to any operating system kernel.

After the conference wrapped up and the my brief Belgian vacation commenced.

1 comment:

  1. "One person rightly pointed out that you won't want your daemon to hang forever if a configuration file has an infinite loop in it."

    so don't write infinite loops in your config file?

    code-as-config is extremely powerful, and i would not give it up just because it has a couple of sharp edges and can be misused.

    ReplyDelete