[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Do symbols make sense for C++



Hi,

On Wed, 25 Jan 2012, Russ Allbery wrote:
> 4. 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 main benefit of the symbols file is that new symbols (API extension)
are listed with the version where they have been introduced. So that
seriously reduces the number of packages which would be affected by the
equivalent shlibs bump.

Otherwise I agree with you, maintainers of C++ libs are unlikely to be
able to (preemptively) detect when a given symbol should have had its
version bumped... so you should really trust upstream and hope to catch
API extension that preserve ABI in the upstream changelog.

> 5. 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.

It's also very mysterious to me. :) But Modestas Vainius has still managed
to maintain symbols files for many KDE libraries. He might be able to tell
you more.

(He's also the one who implemented all the required support in
dpkg-gensymbols)

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/


Reply to: