On Mon, 2009-12-14 at 21:32 +0100, Enrico Tassi wrote: > On Mon, Dec 14, 2009 at 05:03:01PM -0300, Felipe Sateler wrote: > > You mean installing it as /usr/lib/liblua5.1-luaCsnd.so and symlinking > > it to /usr/lib/lua/...? The problem I have is that the lua module does > > not have a SONAME, since it is not really meant to be linked by C > > programs. C/C++ programs can use the proper libcsound64.so and > > libcsnd.so (which this module is wrapping). Is there any real benefit > > for this change? > > I see few advantages > > 1) you may want to write a C++ application that embeds Lua and wants to > provide a standard set of Lua modules. In that case you really want > your application to be linked against the .so, so that dh_shlibdeps > adds proper dependencies for you, and the linker complains if the > required .so is not there. Moreover, lua provides an appropriate > table for preloading modules that are linked (dinamically/statically) > with the main application. This application may or may not be direcly > linked with libcsound64. Libraries used by regular applications > should be in /usr/lib, so that no extra -L flag is needed (and yes, I > usually provide a .pc file to ease compilation). > > 2) you may want to provide also .a files (usually discouraged for system > wide applications, but a nice addition for people using Debian to > compile an all-in-one boundle for their softwares. The .a does not > really fit the /usr/lib/lua/5.1/ path. > > 3) the lua module does not have a soname, it essentially exports a > single C function, so ABI is unlikely to change. What may change is > the API exported, that would reflect changes in the cnsd APIs. I thus > suggest to use the same .so.X.Y.Z you use for csnd. > > 4) the naming schema for .so and the module name are unrelated. I prefer > having all Lua libraries with a coherent name, liblua5.1-FOO.X.Y.Z and > be free to use a different name for the lua module, like csnd. Note > that also allows you to do aliasing (2 names for the same modules) to > eventually ease a transition; that is, an indirection layer with all > its benefits
OK. So this means: 1. Adding the same SOVERSION to the lua module as present in the csound library. 2. Install the library as lublua5.1-csnd.X.Y under /usr/lib 3. Symlink it to luaCsnd.so in /usr/lib/lua/5.1 However: - How are transitions eased by this? AFAIK, lua looks for $modulename.so when a module is required, so as long as I don't provide 2 versions I don't get any help. - doing -llua5.1-csnd doesn't work because there is no public .so symlink. The 2 options I see to fix this are not completely satisfactory: 1. Ship it in the binary package. This breaks when X.Y changes to X.Z and Breaks: need to be added for all previous versions. 2. Create a new package for just one symlink. Any ideas on solving these two points? -- Saludos, Felipe Sateler
signature.asc
Description: This is a digitally signed message part