Kona 2019 Trip Report

I’ve just returned from the February 2019 meeting of WG21 held in Kona, Hawaii. This was my fifth meeting; my first was the July 2017 meeting in Toronto, and I’ve been to each since then, except Rapperswill. I joined the U.S. national body INCITS this past December, and so this was my first meeting as a voting member of PL22.16, representing myself (through my consulting company, KEWB Computing). (continue…)

CppCon 2018 Call for Poster Submissions

Are you doing something really cool with C++?  Then you should consider creating a poster and presenting it at CppCon 2018.

The purpose of the poster session is to encourage innovation and foster communication. With all the different kinds of talks — plenaries, keynotes, sessions, panels, open content, and lightning talks — we have lots of great ways to share ideas.  And as great as those ways are, that kind of sharing is also ephemeral. After the words are spoken, they’re gone, at least until the talks show up on YouTube. In contrast, posters provide a persistent medium for sharing knowledge throughout the week, one that enriches the whole CppCon experience.   Don’t forget that accepted poster presentations will have their conference registration fee refunded (one presenter per poster).

The poster submissions deadline is August 5th, with decisions sent by August 13th. For topic ideas, submission instructions, and advice on making the best possible submission, see the Poster Submissions page.

C++Now 2018 Trip Report

I’m writing this on the journey home after attending C++Now 2018. It’s been a long week, but also a rewarding one. This is my second time attending the conference, and like last year, it was excellent. The quality of content at C++Now is just outstanding. Conference chair Jon Kalb is fond of saying,

To hear the answer to a C++ question, go to CppCon. If you want to be part of finding the answer, go to C++Now.

C++Now is a conference like no other. There’s a unique and special quality about it that’s difficult to describe — it’s something you have to experience for yourself to appreciate. Sessions are held at the Aspen Center for Physics, and most attendees stay at the Aspen Meadows Resort, which is an easy walking distance from the ACFP. The entire site is surrounded by the mountains of Aspen, and the Roaring Fork River runs along the northeastern border of the resort. I stayed in Mallot House in a room facing toward the river, and with my room windows open, I could hear it at night. Attending C++Now is like being in college again but with only the good parts: walking back and forth to class with your backpack in what is about the most gorgeous setting you can imagine; attending the sessions you want to attend while goofing off with old friends and making new ones; and most importantly, intense learning without the hassle of exams. (continue…)

CppCon 2108 Call For Submissions

CppCon is the annual, week-long, face-to-face gathering for the entire C++ community, organized by C++ the community for the C++ community.  This is an outstanding conference for the professional C++ programmer, and I’m proud to serve as its Poster Chair.

Proposals for talks at CppCon 2018 are now being accepted, through May 11, with decisions sent by July 1.  To submit a proposal, see the guidelines on the Call For Submissions page.

I’m Speaking at C++Now 2018!

C++Now, a meeting C++ experts from around the worldI’m very pleased to announce that I’ll be presenting three talks this year at C++Now 2018:

This is my second time attending C++Now; I attended for the first time last year when I gave a talk entitled “Testing the Limits of Allocator Awareness“.   Here’s the video for you allocator nerds… 🙂  This is the conference to attend for an in-depth and technical C++ experience like no other.

Building Clang on Linux

GCC is not the only open source C++ compiler that’s available out there on the interwebs — there’s also Clang, which is part of the LLVM Compiler Infrastructure. Each has its strengths and weaknesses, and both are excellent compilers for a wide variety of platforms. Whenever possible, I try to compile the Linux code I write with both compilers, for the simple reason that sometimes one will catch an error or emit a warning that the other one missed. I find that having my code build cleanly with at least two compilers and all warnings enabled is a useful best practice for improving code quality.

As it turns out, Clang on Linux has a very interesting capability: it can use GCC’s version of the standard C++ library (libstdc++), or its own version (libc++). The choice of standard library may be specified using a command-line argument (-stdlib=libstdc++ or -stdlib=libc++, respectively). Furthermore, if you have multiple versions of GCC installed on your Linux system, you can provide an optional command-line argument to Clang that specifies the GCC version whose libstdc++ you want to use (--gcc-toolchain=<path>).

This post is a followup to Building GCC on Linux, and in it I’m going to describe a set of scripts I wrote for building Clang on Linux. I call this collection clang-builder and it is available on GitHub. (continue…)

Building GCC on Linux

I have a confession to make: I’m a bit of a compiler hoarder. As I write this, the CentOS-7 virtual machine on my workstation at home has eleven versions of GCC and ten versions of Clang installed. I like to have multiple versions of GCC and Clang available on my various Linux-based home and work systems so that I can easily compare old and new behavior, check for performance improvements and bug fixes, explore new language features, and retain the stability of previous compiler releases that have proven themselves.

However, there’s often a practical problem when trying to do this. The standard compiler installations blessed and distributed by the major Linux distros typically install into the system directories /usr/bin and /usr/lib. That’s fine if you only need one version of GCC and/or Clang, but it doesn’t work so well when you want multiple versions. Upgrade packages usually replace the existing compiler, which is not the behavior we want. Packages that attempt to install additional new versions can sometimes overwrite the files of an existing installation, resulting in a mis-configuration of one or more versions.

There are also cases where it’s impermissible or undesirable to add or change files in the system directories. Company policy may prohibit you from installing software there (although this seems less and less likely in modern software development shops). Or perhaps you need to develop on a system that is configured as closely as possible to production systems, and so system directory changes are discouraged.

In any event, it would be great if there was a way to install an arbitrary number of compilers on your system independently of each other, and with no changes to the standard system directories. It’s possible, but does require a little work. In short: you must build it yourself! As it turns out, GCC and Clang are remarkably flexible in how they can be configured and built, and we’re going to use that flexibility to our advantage.

In this post I’m going to describe a set of scripts I wrote for building GCC such that each installed version is completely independent of every other installed version, allowing you add or remove them at will without affecting the system directories. (continue…)