Alex Rivera | Logout

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

Asked 2012-04-22T14:37:14.920
11

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 rebuilt after one of its libraries has been updated?

How does that make any sense since the "main" file is not changed at all?

Edit
Report

1 Answer

2

What is a "library"?

If a "library" is only a binary (e.g. a dynamically linked library aka ".dll", ".dylib" or ".so"; or a statically linked library aka ".lib" or ".a") then there is no need to recompile, re-linking should be enough (and even that can be avoided in some special cases)

On the other hand, libraries often consist of more than just the binary object - e.g. the header-files might include some in-line (or macro) logic. if so, re-linking is not enough, and you might to have to re-compile in order to make use of the newest version of the lib.

answered 2012-04-22T14:53:25.333

Your Answer