unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Tomáš Čech" <sleep_walker@suse.cz>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: luajit: install symlinks for libluajit library
Date: Tue, 03 Feb 2015 22:03:22 +0100	[thread overview]
Message-ID: <87h9v2ogh1.fsf@gnu.org> (raw)
In-Reply-To: <1422922135-2788-1-git-send-email-sleep_walker@suse.cz> ("Tomáš	Čech"'s message of "Tue, 3 Feb 2015 01:08:55 +0100")

Tomáš Čech <sleep_walker@suse.cz> skribis:

> * gnu/packages/lua.scm (luajit): don't require ldconfig - add "LDCONFIG=true"
>   to make command line, add luajit-2.0.3-symlink.patch so both symlinks are created
> * gnu/packages/patches/luajit-2.0.3-symlink.patch: New file
> * gnu-system.am (dist_patch_DATA): Adjust accordingly.
>
> Install phase of luajit contained:
>
> ldconfig /gnu/store/…-luajit-2.0.3/lib && \
> ln -sf libluajit-5.1.so.2.0.3 /gnu/store/…-luajit-2.0.3/lib/libluajit-5.1.so && \
> ln -sf libluajit-5.1.so.2.0.3 /gnu/store/…-luajit-2.0.3/lib/libluajit-5.1.so || :
>
> 1) When ldconfig is missing, symlinks are not created but whole expression
>    returns no error. This cause linker not to find proper library when
>    building package against luajit and libluajit-5.1.a is used instead. With
>    'LDCONFIG=true' it ommits the problem.
>
> 2) same symlink is created twice, luajit-2.0.3-symlink.patch fixes that.

Good catch, thanks for investigating!

>      (arguments
>       '(#:tests? #f                      ;luajit is distributed without tests
>         #:phases (alist-delete 'configure %standard-phases)
> -       #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))))
> +       ; poorly formulated expression doesn't create symlinks for dynamic library on ldconfig failure
> +       ; ldconfig is useless anyway so success always with `true'
> +       #:make-flags (list "LDCONFIG=true" (string-append "PREFIX=" (assoc-ref %outputs "out")))))

Some nitpicking: please use double-colon for block comments, capitalize
sentences, add periods at the end of sentences, and wrap lines to 80
chars.

s/poorly formulated expression/The Makefile/

And perhaps add something like: “Set LDCONFIG=true to work around it.”,
to make it clear what the solution is and how it relates to the problem.

> diff --git a/gnu/packages/patches/luajit-2.0.3-symlink.patch b/gnu/packages/patches/luajit-2.0.3-symlink.patch
> new file mode 100644
> index 0000000..c6b4eec
> --- /dev/null
> +++ b/gnu/packages/patches/luajit-2.0.3-symlink.patch
> @@ -0,0 +1,12 @@
> +diff -up LuaJIT-2.0.3/Makefile.orig LuaJIT-2.0.3/Makefile
> +--- LuaJIT-2.0.3/Makefile.orig	2014-03-12 13:10:00.000000000 +0100
> ++++ LuaJIT-2.0.3/Makefile	2015-02-02 23:52:30.774723789 +0100
> +@@ -56,7 +56,7 @@ INSTALL_PCNAME= luajit.pc
> + INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME)
> + INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME)
> + INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT)
> +-INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT)
> ++INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT).$(MAJVER)

Please add a comment above the hunk explaining what the patch does, why,
and what its upstream status is.

Could you send an updated patch?

Thanks!

Ludo’.

      reply	other threads:[~2015-02-03 21:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03  0:08 [PATCH] gnu: luajit: install symlinks for libluajit library Tomáš Čech
2015-02-03 21:03 ` Ludovic Courtès [this message]

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=87h9v2ogh1.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=sleep_walker@suse.cz \
    /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).