From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 1/1] gnu: lua: Build with dynamic library support. Date: Tue, 27 Oct 2015 23:32:15 -0400 Message-ID: <1446003135.1901797.421991889.3664784B@webmail.messagingengine.com> References: <45ab1898e5c08ef1f8c7070eae77c58e5dd40296.1445918045.git.leo@famulari.name> <87oafkv5pz.fsf@gnu.org> <1445955233.2825572.421511113.088B9586@webmail.messagingengine.com> <87pp00tir8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50996) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrHTI-0007Ot-TN for guix-devel@gnu.org; Tue, 27 Oct 2015 23:32:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZrHTF-0001Dn-NO for guix-devel@gnu.org; Tue, 27 Oct 2015 23:32:20 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:39665) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZrHTF-0001DG-JL for guix-devel@gnu.org; Tue, 27 Oct 2015 23:32:17 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2058720930 for ; Tue, 27 Oct 2015 23:32:16 -0400 (EDT) In-Reply-To: <87pp00tir8.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org 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=C3=A8s wrote: > By =E2=80=9Cfixing the flags=E2=80=9D, do you mean that the .so that we h= ave 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 >=20 > I=E2=80=99m 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.=20 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