[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/1] gnu: lua: Build with dynamic library support.
From: |
Leo Famulari |
Subject: |
Re: [PATCH 1/1] gnu: lua: Build with dynamic library support. |
Date: |
Tue, 27 Oct 2015 23:32:15 -0400 |
Calling all Lua experts! Or even somebody that has used Lua before! ;)
I studied the lua-5.1 and lua-5.2 Makefiles more carefully and I will
split this up into separate packages for each version, with some
changes.
On Tue, Oct 27, 2015, at 11:48, Ludovic Courtès wrote:
> By “fixing the flags”, do you mean that the .so that we have for 5.1
> does not actually contain position-independent code? That CFLAGS was
> ignored?
I'm not sure about the state of our lua-5.1's liblua.so. How to test it?
These changes are about building Lua so that it can load Lua libraries
dynamically. Currently, the lua-5.1 we package lacks this feature.
Possibly the lua-5.2 is the same way.
> > I will have to look into it again. I tested the results by starting the
> > Lua interpreter while linking a shared library:
> > $ lua -lssl
>
> I’m not familiar with Lua; what does this command do?
`lua` starts the interactive lua interpreter. Giving it the argument
`-lname` calls "require('name') before executing script. Typically used
to load libraries." (quoted from them Lua man page). Some helpful people
in the Prosody chatroom suggested it as a simple way to test if a Lua
interpreter can load dynamic libraries or not. Our lua-5.1 can't:
$ ll `which lua`
lrwxrwxrwx 7 root guixbuild 61 Dec 31 1969
/var/guix/profiles/per-user/leo/guix-profile/bin/lua ->
/gnu/store/fl27mjm8kxp0rj989cd8mj67qjvl0jr3-lua-5.1.5/bin/lua
$ lua -lssl
lua: error loading module 'ssl.core' from file
'/home/leo/.guix-profile/usr/lib/lua/5.1/ssl.so':
dynamic libraries not enabled; check your Lua installation
stack traceback:
[C]: ?
[C]: in function 'require'
/home/leo/.guix-profile/usr/share/lua/5.1/ssl.lua:7: in main
chunk
[C]: ?
[C]: ?
> I thought the goal was to get liblua.so for 5.2, but this seems to be
> testing something else?
By default, building Lua does not create liblua.so, which is why the
lua51-liblua-so.patch is there. I can look into a similar patch for 5.2.
Also, we need to set up the search paths to help Lua find Lua libraries.
That can be configured at build time. I figured I would try to get a
working Lua interpreter in master before working on those things, but I
am open to guidance.
Revised patches forthcoming.
Leo