Reputation: 5467
Background:I have a large project which links dozens of shared libraries, both from external sources and from our own projects. Before delivery of a new software version I usually do make clean all
and roll out all the executables and shared libraries which come with the project.
Now it happens sometimes that a client prefers to have only an executable shipped, e.g. for a hot-fix, because their regulations require to test all affected functionality when changing a library, which means everything.
Question: What is the simplest way to decide if an executable is compatible to a set of shared libraries?
Edit: My current approach is "If the headers of the libs have not changed it will be compatible", but that is an error prone approach and I would rather check the executable and libraries themselves.
Upvotes: 1
Views: 2414
Reputation: 16133
Try abi-compliance-checker. It's a tool to check binary compatibility of library versions. Developed since 2009.
If you have debug info of your libraries available somewhere then you can also try abi-dumper:
# Create ABI dumps from debug info
abi-dumper libSample-1.0.so.debug -o ABI-1.0.dump
abi-dumper libSample-2.0.so.debug -o ABI-2.0.dump
# Compare ABI dumps
abi-compliance-checker -l libSample -old ABI-1.0.dump -new ABI-2.0.dump
Upvotes: 1
Reputation: 171343
The libabigail project contains tools for checking binary compatibility, and Binary compatibility issues with C++ is a good set of rules.
Upvotes: 1