all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 1/1] gnu: lua: Build with dynamic library support.
Date: Tue, 27 Oct 2015 13:47:04 +0100	[thread overview]
Message-ID: <87oafkv5pz.fsf@gnu.org> (raw)
In-Reply-To: <45ab1898e5c08ef1f8c7070eae77c58e5dd40296.1445918045.git.leo@famulari.name> (Leo Famulari's message of "Mon, 26 Oct 2015 23:56:09 -0400")

Leo Famulari <leo@famulari.name> skribis:

> Notably, this enables the use of dynamic libraries with Lua.

A better subject line for the commit would be:

  gnu: lua-5.2: Build shared libraries.

AFAICS, the problem is only with Lua 5.2:

--8<---------------cut here---------------start------------->8---
$ ls $(guix build lua-5.1)/lib
liblua.a  liblua.so  liblua.so.5.1  lua
$ ls $(guix build lua-5.2)/lib
liblua.a  lua  pkgconfig
--8<---------------cut here---------------end--------------->8---

Thus I would suggest leaving ‘lua-5.1’ unchanged.

> * gnu/packages/lua.scm (lua, lua-5.1)[arguments]: Set the make flags
>   properly for each version of lua.

[...]

> +++ b/gnu/packages/lua.scm
> @@ -24,6 +24,7 @@
>    #:use-module (guix packages)
>    #:use-module (guix download)
>    #:use-module (guix build-system gnu)
> +  #:use-module (guix utils)

Looks like this line is not needed, is it?

>         #:phases (alist-replace
>                   'build
> -                 (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux")))
> +                 (lambda _ (zero? (system* "make" "MYCFLAGS=-fPIC" "linux")))

I just tried and AFAICS this line has no effect: Lua 5.2 still lacks
liblua.so.  Am I missing something?

> +          `(modify-phases ,lua-phases
> +             (replace
> +               'build
> +               (lambda _
> +                 (and
> +                  (zero? (system* "make" (string-append
> +                                    "MYCFLAGS="
> +                                    (string-join '("-fPIC "
> +                                                   "-DLUA_USE_LINUX "
> +                                                   "MYLIBS=-Wl,-E "
> +                                                   "-ldl -lreadline "
> +                                                   "-lhistory -lncurses")))
> +                                    "linux")))))))))))

This is in ‘lua-5.1’, so it’s unnecessary AFAICS.

> @@ -89,8 +106,8 @@ for configuration, scripting, and rapid prototyping.")
>                                    version ".tar.gz"))
>                (sha256
>                 (base32 "0ydxpqkmsn2c341j4r2v6r5r0ig3kbwv3i9jran3iv81s6r6rgjm"))
> -	      (patches (list (search-patch "luajit-symlinks.patch")
> -			     (search-patch "luajit-no_ldconfig.patch")))))
> +              (patches (list (search-patch "luajit-symlinks.patch")
> +                             (search-patch "luajit-no_ldconfig.patch")))))

Unnecessary too.

Thanks for looking into it!

Ludo’.

  reply	other threads:[~2015-10-27 12:47 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 [this message]
2015-10-27 14:13     ` Leo Famulari
2015-10-27 15:48       ` Ludovic Courtès
2015-10-28  3:32         ` Leo Famulari
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

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

  git send-email \
    --in-reply-to=87oafkv5pz.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.