lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Mon, Jan 19, 2009 at 5:48 PM, Wesley Smith <> wrote:
>> Probably your package.cpath doesn't include /usr/local/lib.
> So let me get this straight because there's potential for confusion:

Indeed. You didn't mention two .so files in your original post. A
better description of your problem might get more specific advice.

> I have the following:
> (lua module)
> (generic dylib)
> When I require("muro"), loads fine, but depends on

What do you mean by "loads fine"? It can't be that fine, if it ain't working!

What happens? How about some lua code, and some console output? gdb
stack trace? Something?

>  The trouble I'm having is loading, which is in
> /usr/local/lib as it should be since it's a lib I made and isn't a Lua
> module.  Does adding /usr/local/lib to the cpath really allow dlopen
> to find the dependencies that binary lua modules might have?

package.cpath helps lua find in order to dlopen it.

Is lua finding If not, your package.cpath needs work.

dlopen uses ld to resolve references in

Is ld resolving refs? When you run ldd on, what does it say?
It should say depends on, and print the full path
to If it doesn't, your ld configuration or cache needs

Or maybe the name of the entry point is wrong? So many possibilities.


Ars longa, vita brevis, occasio praeceps, experimentum periculosum,
iudicium difficile.