unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: guix-devel@gnu.org
Subject: Re: [PATCH 1/1] gnu: lua: Build with dynamic library support.
Date: Tue, 27 Oct 2015 23:32:15 -0400	[thread overview]
Message-ID: <1446003135.1901797.421991889.3664784B@webmail.messagingengine.com> (raw)
In-Reply-To: <87pp00tir8.fsf@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è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

  reply	other threads:[~2015-10-28  3:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27  3:56 [PATCH 0/1] lua: Build with dynamic library support Leo Famulari
2015-10-27  3:56 ` [PATCH 1/1] gnu: " Leo Famulari
2015-10-27 12:47   ` Ludovic Courtès
2015-10-27 14:13     ` Leo Famulari
2015-10-27 15:48       ` Ludovic Courtès
2015-10-28  3:32         ` Leo Famulari [this message]
2015-10-28 22:47           ` Leo Famulari
2015-10-29 20:49             ` Ludovic Courtès
2015-10-29 20:46           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446003135.1901797.421991889.3664784B@webmail.messagingengine.com \
    --to=leo@famulari.name \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).