From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: luajit: install symlinks for libluajit library Date: Tue, 03 Feb 2015 22:03:22 +0100 Message-ID: <87h9v2ogh1.fsf@gnu.org> References: <1422922135-2788-1-git-send-email-sleep_walker@suse.cz> 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]:37021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIkd9-0006dj-1e for guix-devel@gnu.org; Tue, 03 Feb 2015 16:03:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIkd4-0003Dq-Ib for guix-devel@gnu.org; Tue, 03 Feb 2015 16:03:30 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIkd4-0003Dl-FF for guix-devel@gnu.org; Tue, 03 Feb 2015 16:03:26 -0500 In-Reply-To: <1422922135-2788-1-git-send-email-sleep_walker@suse.cz> (=?utf-8?B?IlRvbcOhxaEJxIxlY2giJ3M=?= message of "Tue, 3 Feb 2015 01:08:55 +0100") 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: =?utf-8?B?VG9tw6HFoSDEjGVjaA==?= Cc: guix-devel@gnu.org Tom=C3=A1=C5=A1 =C4=8Cech skribis: > * gnu/packages/lua.scm (luajit): don't require ldconfig - add "LDCONFIG= =3Dtrue" > to make command line, add luajit-2.0.3-symlink.patch so both symlinks a= re 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/=E2=80=A6-luajit-2.0.3/lib && \ > ln -sf libluajit-5.1.so.2.0.3 /gnu/store/=E2=80=A6-luajit-2.0.3/lib/liblu= ajit-5.1.so && \ > ln -sf libluajit-5.1.so.2.0.3 /gnu/store/=E2=80=A6-luajit-2.0.3/lib/liblu= ajit-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. W= ith > 'LDCONFIG=3Dtrue' 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 t= ests > #:phases (alist-delete 'configure %standard-phases) > - #:make-flags (list (string-append "PREFIX=3D" (assoc-ref %outputs= "out"))))) > + ; poorly formulated expression doesn't create symlinks for dynami= c library on ldconfig failure > + ; ldconfig is useless anyway so success always with `true' > + #:make-flags (list "LDCONFIG=3Dtrue" (string-append "PREFIX=3D" (= 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: =E2=80=9CSet LDCONFIG=3Dtrue to work around= it.=E2=80=9D, 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/packag= es/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=3D luajit.pc > + INSTALL_STATIC=3D $(INSTALL_LIB)/$(INSTALL_ANAME) > + INSTALL_DYN=3D $(INSTALL_LIB)/$(INSTALL_SONAME) > + INSTALL_SHORT1=3D $(INSTALL_LIB)/$(INSTALL_SOSHORT) > +-INSTALL_SHORT2=3D $(INSTALL_LIB)/$(INSTALL_SOSHORT) > ++INSTALL_SHORT2=3D $(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=E2=80=99.