Why should I recompile an entire program just for a library update?

后端 未结 3 1884
无人及你
无人及你 2020-12-28 23:13

With respect to the following link: http://www.archlinux.org/news/libpnglibtiff-rebuilds-move-from-testing/

Could someone explain to me why a program should be rebui

3条回答
  •  感动是毒
    2020-12-28 23:40

    There are two kinds of compatibility: API and ABI.

    API compatibility is about functions and data structures which other programs may rely on. For instance if version 0.1 of libfoo defines an API function called "hello_world()", and version 0.2 removes it, any programs relying on "hello_world()" need updating to work with the new version of libfoo.

    ABI compatibility is about the assumptions of how functions and, in particular, data structures are represented in the binaries. If for example libfoo 0.1 also defined a data structure recipe with two fields: "instructions" and "ingredients" and libfoo 0.2 introduces "measurements" before the "ingredients" field then programs based on libfoo 0.1 recipes must be recompiled because the "instructions" and "ingredients" fields will likely be at different positions in the 0.2 version of the libfoo.so binary.

提交回复
热议问题