Friday, November 28, 2008

abi checkers

Do you know of a tool that runs on Linux, preferably is FOSS, and can compare the ABI of two C++ libraries? If so, leave a link for me in the comments! =)

7 comments:

khtmltest said...

While it's not entirely what's desired, the old KDE3 build system had a "make bcheck" target that did a good chunk of this.
Basically, you could build a database of all the object sizes and vtable layouts for one version, and then check the other one against it. Doesn't cover stuff like broken inlines, but IIRC I've caught BC mistakes with it. It may be worth reviving with CMake if possible, though I don't know if it is --- I am build system illiterate myself.

The old stuff is in admin/am_edit
and admin/bcheck.pl (make_bcheck_target); but basically the key is to run gcc with --dump-class-hierarchy
on a header file, and pass output
to bcheck.pl (this also requires header files to be mostly standalone compileable)

Hope this is of some use, and good luck with BC in libplasma,
-Maks

(No anon comments, huh? Can't say I blame you)

Kartik Mistry said...

abicheck?

wWPMa847jfIPgCN6g.3Cvbif_kdc said...

Debian had something, it come out when MySQL broke abi between two minore releases. But I could not remember the name.

Partha said...

Sorry to post something completely off topic, but will there be a videocast this weekend?

Maxim said...

revdep-rebuild (it is shell script) from gentoo does similar thing. You could try to extract needed code from that place.

Benjamin Meyer said...

You could write a small app to do it using Roberto's c++ parser

http://github.com/icefox/rpp/tree/master

andrey-ponomarenko said...

To compare the ABI of two C++ libraries you may use ABI compliance checker from Institute for System Programing of Russian Academy of Sciences. Wiki-page is http://ispras.linux-foundation.org/index.php/ABI_compliance_checker