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

Re: [PATCH] Introduce symbol versioning


> Hi Anderson,
> 
> we understand and value your effort, the problem is that we already have been
> there, we had a map file and we broke it. We added functions and forgot to
> update the map file. We even did released without updating the map file. Also
> it didn't work on Windows and we wanted a solution which is platform
> independent.
> 
> That's why we were getting rid of it. The LIBSSH_API macro works since quite
> some years without any issues.
> 
> Reintroducing it the way we already had it is probably not something we want.
> If we want to add it, we need a better solution. We need ABI checks as part
> of
> the build system so that we know something needs to be updated!
> 
> Samba/libtalloc does ABI checks based on a script using nm and gdb. It is the
> only project I know which has working ABI checks. It has a signature file for
> every release making it easy to create the required map file.
> 
> https://git.samba.org/?p=samba.git;a=tree;f=lib/talloc/
> ABI;h=92e35481940c36344569ab71d866f075bd8aef52;hb=refs/heads/master
> 
> 
> It could be possible to achieve that using cmake scripts. If the cmake lang
> is
> too limiting it could be done with python.

It is possible to know problems with ABI compatibility using the abi-compliance-checker:

https://lvc.github.io/abi-compliance-checker/

GnuTLS, for example, uses this tool to keep track of ABI changes and uses a map to control the symbol versioning.
The tool is integrated in the build and detects the changes when making a release (with make dist).
But it is necessary to keep a dump file for the current release.

There is a project which tracks ABI changes in popular libraries which uses the abi-compliance-checker. This is the report for libssh:

https://abi-laboratory.pro/tracker/timeline/libssh/

I agree that it is hard to keep track of changes manually, but maybe it is possible to use the help of these tools to avoid mistakes.

References:
[PATCH] Introduce symbol versioningAnderson Sasaki <ansasaki@xxxxxxxxxx>
Re: [PATCH] Introduce symbol versioningAris Adamantiadis <aris@xxxxxxxxxxxx>
Re: [PATCH] Introduce symbol versioningAnderson Sasaki <ansasaki@xxxxxxxxxx>
Re: [PATCH] Introduce symbol versioningAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org