[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua distros again
- From: Sean Conner <sean@...>
- Date: Fri, 9 Feb 2018 03:08:14 -0500
It was thus said that the Great Dibyendu Majumdar once stated:
>
> My knowledge is not perfect of course but I also did not explain the
> problem fully.
>
> In order for Ravi to find the libraries on Mac OSX I need to set something like:
>
> export LUA_CPATH="$RAVI_HOME/lib/?.dylib;$RAVI_HOME/lib/lib?.dylib"
>
> Now in my CMake build by default the library gets created as:
>
> $HOME/ravi/lib/ravi/libffi.dylib
>
> It appears that Lua searches for:
>
> $HOME/ravi/lib/ravi/ffi.dylib as it substitutes 'ravi/ffi' in place of
> '?'. So it cannot handle the 'lib' prefix.
>
> I have amended the CMake script to omit the 'lib' prefix and now it
> works fine, but this is not standard naming on Mac OSX I think.
At work we develop on Mac OS-X, and while normally I package everything
into a single executable, I do have the ability to install individual
modules [1] and they all have a .so extension (just like they do on Linux
and Solaris) and Mac OS-X can load them (the Lua modules written in C) just
fine. I did check other, standard shared libraries on the Mac, and yes,
they have the .dylib extension [2]. So for Lua modules I don't think it
matters all that much what the extension is.
-spc
[1] Just because.
[2] Learn something new every day. Our build products are for the most
part complete and any dynamic linking is against standard libraries
that come with the OS like the C standard library, etc. Since our
production systems are Linux or Solaris, I never really bothered to
look that deep into Mac development.