Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] format not recognized

Date2007-08-23 00:03
FromFelipe Sateler
SubjectRe: [Cs-dev] format not recognized
Michael Gogins wrote:

> I am quite aware that dlopen happens at run time, linking at compile time.
> When I said "linker name" I was thinking of both. Also aware that
> "interface" in this context is binary interface.

Great. I specified that just in case.

> 
> What I didn't is how this scheme of versioned names works with the Lua
> interface. However, I ran into this at:
> 
> http://memebeam.org/john/debian/lua5.1/examples/binary_module/README:
> 
> Library naming
> --------------
> Given a Lua module "foo_bar", the base name for the library files should
> be "liblua-foo_bar".  The "lib" prefix is a requirement of libtool, and
> allows you to use the -l option of the linker as in "-llua-foo_bar".  The
> "lua-" part, besides letting us know that the library is related to Lua,
> by way of the dash charcter affects the module open function which require
> will try to use when it dynamically loads the module.  Since everything
> before the dash is ignored, the open function will simply be
> "luaopen_foo_bar".  An added benefit of the "lua-" prefix is that it
> discourages use of "Lua" in the module name itself.  Note that in order
> for require to locate the library files, "liblua-?.so" patterns have been
> added to the default CPATH.
> 
> So, SONAME should be
> 
> liblua5.1-csnd.so.5.1
> 
> But, perhaps I'm still missing something, but when installed, there would
> still need to be a symlink:
> 
> liblua5.1-csnd.so
> 
> in order for Lua's "require" loader to dlopen the interface.
> 

According to some Debian developers, a symlink (csnd.so) should live
in /usr/lib/lua/5.1 (although that may just be Debian).

> Perhaps the confusion arises because Csound's Lua interface shared library
> is both (a) a plugin to be dlopened by Lua, and (b) linked with the Lua
> library itself.

I've been made aware that the versioned SONAME might be indeed necessary,
since lua is usually embedded into applications, compiled and linked. As
such, it should be accessible from standard locations by the final
application.

So apparently a SONAME of liblua5.1-csnd.so.5.1 is the way to go.

-- 

  Felipe Sateler


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net