On Sat, 26 Aug 2006, Matthew Navarre wrote:
The FreeBSD ports system builds the c-client library separately from things like imap-uw and pine. It's bitten me on the ass more than once.

I don't do anything to support the use of the c-client library as a shared library. The application to c-client interface can, and does, change between versions. What this means is that a Pine, imapd, or ipop3d built for one version of c-client will not necessary work with a different version of c-client without rebuilding.

With static linking, this is not a problem; you always get the version of c-client that was built with your application. Shared libraries, on the other hand, permit version skews.

I don't particularly see much point to making c-client be a shared library. At best, it saves a modest amount of memory on a system which runs more than one c-client based application. But these days, most shell access systems (which would run Pine) do not run servers; and most server systems (which would run imapd and/or ipop3d) do not allow shell access. So, in the normal case, you save the memory footprint of one copy of c-client on a server which has both imapd and ipop3d.

What many people do not realize is that applications share their code pages in any case. Thus, all Pine processes share their code (including c-client) with all other Pine processes. If Pine is your only c-client based application, you don't save anything by splitting c-client to a shared library, and you run the risk of a version skew that will break things in unpredictable ways.

The remaining argument is that by having c-client as a shared library, it is possible to fix a c-client bug and have all c-clients applications get fixed without having to rebuild (often just relink) them. But this is a double edged sword. A change to a c-client shared library can also break applications that previously worked, with no obvious change to the application. This has happened, many times.

I don't deliberately break the use of c-client as a shared library; however, I don't do the extensive work that would be necessary to make arbitrary versions of application (such as Pine, imapd, ipop3d) binaries work with arbitrary versions of c-client shared library binaries.

In my opinion, the benefits/savings of making c-client be a shared library pale in comparison to the costs.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to