Russ Allbery: Do symbols files make sense for C++?
I also posted this to debian-devel, which is where the discussion will be,
but I wanted to post it on my journal as well so that others who may be
interested will see it on Planet Debian. For those not familiar with
Debian, this concerns the implications of a new feature for how Debian
tracks shared library dependencies.
I'm currently working on the Policy modification to document (and
recommend) use of symbols instead of shlibs, but I'd only personally used
symbols with C libraries. Today I decided that I should try adding a
symbols file to a C++ library, particularly if I'm going to recommend
everyone do it. I tried this exercise with xml-security-c, which is, I
think, a reasonably typical C++ library. Not the sort of core C++ library
that would sit at the center of the distribution, but a random software
package that's in Debian because other things use it.
The experience was rather interesting, and I ended up uploading the new
version without a symbols file and continuing to just use shlibs. That's
for the following reasons:
- The generated symbols file was HUGE. Hundreds of lines. This is a marked difference from the typical C symbols file, which is of quite manageable size. Some of that is that the library provides a lot of different classes, but some of it is that C++ just generates a lot of exported symbols. There's no way that I could do what I would do with a C library and understand those symbols, why they're there, and whether they are likely to have changed between revisions.
- Generating a reasonable symbols file was a pain. Generating an unreasonable symbols file that just contains all of the mangled symbols is largely mechanical and uninteresting, but that symbols file doesn't seem to me to convey useful information. So I did some scripting to translate the symbols back with c++filt, and add (c++) tags, and then try to understand what I was looking at and figure out whether I should sort the symbols list because the default sort is by mangled name, which is meaningless. This is a rather unappealing process. It's not particularly difficult, but it's very awkward and feels like it's missing vital tools.
- The resulting symbols file is incomprehensible to someone without strong knowledge of C++. It's full of opaque entries that don't make sense to the non-C++ programmer, which I suspect is a substantial number of people who package C++ libraries for Debian. I know enough C++ from school that I can evaluate security fixes, make simple patches, and review upstream changes, and I think that's all that should be needed to package things for Debian. But I'm deeply uncomfortable producing a symbols file on my own that contains entries for things that I know nothing about and cannot evaluate when they've last changed, like "non-virtual thunk to FooClass::~FooClass@Base".
- Once I had a symbols file that resulted in a successful build and that I could have uploaded, I started thinking about how I was going to maintain it. With a C program, I would change the symbols file versions when the underlying function implementation changes in a way that may not offer eqiuvalence, similar to bumping shlibs. I realized that I was going to have no idea when that happened, and the only way that I would maintain the symbols file would be to either trust upstream to maintain ABI equivalence and therefore only change the symbols file when upstream changes the SONAME, or not trust upstream to maintain ABI equivalence and therefore change all the versions with each new upstream release. That gives me exactly the same semantics as a shlibs file, so what's the point in having a symbols file?
- The exported symbols of the library contained many symbols that obviously weren't really from that library, but instead were artifacts of the C++ compilation process, things like instantiations of std::vector. Do those go into the symbols file? Do they change from architecture to architecture? If they disappear again, is that actually an ABI break? How do I know? It's all very mysterious, and while shlibs provides the same semantics as just ignoring this, at least I'm not then including in the package data, generated by me, things that I'm just blindly ignoring.
... a week ago, in the shape of Alexandra Daphne Scholz, my enchanting daughter.

)
and because I cannot resist the urge, here are a few more snaps of her:



It is since two days that all my emails,
You are scaring away much more than that.
I just came across an
I really should write these a
The
Hi folks!



As sort of new year's resolution I started picking up the habit to work on release critical bugreports for squeeze again. The number is way to high to be healthy, but at least it is (still) below the amount of release critical bugreports for unstable.
It will be an uneven fight because it seems that there are quite some people working on weeding out release critical bugreports in unstable, but those who are interested in weeding out releasing critical bugreports in stable seems to be limited, even though it is one of our supported releases and thus should receive quite some attention, at least by the corresponding package maintainers themself.
So here is the list that I managed so far:
Those lovely people over at Flickr have finally bitten the bullet and are
Finally I've also find time to test
Update: I managed to make sound work. For some weird reason, a mute switch option of some the many (and who knows how useful) switches of my sound card was enabled. Now the damn thing works. Did I mention that since I did the upgrade all my sound cards (I have a USB sound card, too) have listed as available inputs all the inputs of my internal sound card (mic, front mic, line in, CD, etc.) in Audacity? That makes for a very confusing and loooong sound input sources list! The upside is that I can finally record clips from televisions that do not provide such a feature and FastVideoDownload doesn't handle.
Last year I shared my
(This is not quite a Dear lazyweb post. If anything, it's Dear
lazyweb, I've done my homework, now what? )
I'm looking for the ultimate distributed filesystem. Something that's
simple to use, redundant, fault-tolerant, and still smart enough to
avoid the more obvious performance chokepoints. Ideally, it should
work for all of the following sets of files: