lua-users home
lua-l archive

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


On 7 August 2015 at 19:02, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Acting on Daurnimator's suggestion in another thread, I patched the
> Makefile to make liblua.so, as follows:
>
> V= 5.3
> R= $V.1
>
> $(LUA_SO): $(CORE_O) $(LIB_O)
>         $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $?
> -lm $(MYLDFLAGS)
>         ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
>         ln -sf $(LUA_SO).$(R) $(LUA_SO)
>
> As often happens when copying code blindly without understanding
> it, I ran into problems. The file liblua.so.5.3.1 and symbolic links
> liblua.so.5.3 and liblua.so were made. I copied all three (the links as
> links) to /usr/local.
>
> I told the application to load liblua.so via opendl etc. It would only
> do so when a further symbolic link to /usr/lib/liblua.so.5.3 was made.
> This obviously has something to do with that -soname parameter,
> but why does it not accept the file that is in /usr/local/lib?
>

Did you run `ldconfig`to regenerate the linker cache?
Is /usr/local in your ld.so.conf?

To learn about the 'soname' option, see this wikipedia article:
https://en.wikipedia.org/wiki/Soname