Carlos R. Mafra <[email protected]> wrote: > On Sun, 29 Aug 2010 at 16:13:38 +0200, Andreas Metzler wrote:
>> this is a first shot at improving wmaker's libraries, starting with >> libwraster. libwraster currently exports private symbols (e.g. >> RLoadGIF). It also does not yet use symbol versioning, which is not a big >> thing for a rarely used library but is nice to have anyway. >> Comments welcome. > Caveat: I am not familiar with library management stuff. >> Andreas Metzler (3): >> Set library version in configure.ac >> Import ld-version-script.m4 from gnulib > [...] >> configure.ac | 44 ++++++++++++++++++++ >> m4/ld-version-script.m4 | 44 ++++++++++++++++++++ > Why is it important to have this version control? > We already have an enough nightmare-inducing and > bad-for-your-mental-health configure.ac, and the first impression > with reading the rules of version control for those libraries in the > comments added to configure.ac is that nobody will probably ever > care about changing those numbers. > What I am missing? Hello, Patch 1 does not change any code or how stuff works. You are already supposed to "change those numbers" (if you make a release). It is just a small reorganisation of data. (If you ever make release, you just need to edit configure.ac instead of a bunch of files.) Keeping this stuff centralized is basically a matter of personal preference, I think it is convenient to keep these numbers in configure.ac. I also like to have a short documentation on what the numbers mean nearby since I always forget. ;-) Afaiui there is nothing to do while wmaker-crm stays hidden in GIT and does not release stuff. (It would also not be very smart for a third party project to rely on unreleased libraries. ;-) If my personal preference in this respect differs from yours there is not much lost in *not* commiting this part. >> Add version script versioning for libwraster >> wrlib/Makefile.am | 6 ++- >> wrlib/libwraster.map | 102 >> +++++++++++++++++++++++++++++++++++++++++++++++ [...] > This one is OK, AFAICT. Exporting unneeded stuff is, well, unneeded. Patch 2 and patch 3 depend on each other. I am using a version script to a) add symbol version b) stop exporting private stuff. --version-script is not supported by all linkers, which is why I need to check for this capability in autoconf. I am not a library expert either but I do not know how to easily get (b) without a version script. (If public symbols were named differently than private ones -export-symbols-regex could be used, but this is not the case for libwraster). Given that a version script is already necessary we get symbol versioning for free. The only additional work is to remember to bump the symbol version whenever the soname changes. The benefits of symbol versioning are tiny for a library like libwraster which is not very widely but I think it is worth the tiny additional work. Please not that the commented lines (list of local symbols) in libwraster.map can and probably should be deleted for readabilty. cu andreas -- `What a good friend you are to him, Dr. Maturin. His other friends are so grateful to you.' `I sew his ears on from time to time, sure' -- To unsubscribe, send mail to [email protected].
