From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Re: [PATCH 2/5] gnu: Build lua-5.2 with dynamic library support. Date: Mon, 14 Dec 2015 01:23:41 -0500 Message-ID: <20151214062341.GD10634@jasmine> References: <0f36a80beb2f4796dd3c62cf97559743456f79f4.1446485963.git.leo@famulari.name> <87a8qo19o8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8MXq-00086C-W8 for guix-devel@gnu.org; Mon, 14 Dec 2015 01:23:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8MXn-0006ph-Qd for guix-devel@gnu.org; Mon, 14 Dec 2015 01:23:38 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:60510) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8MXn-0006pW-MR for guix-devel@gnu.org; Mon, 14 Dec 2015 01:23:35 -0500 Content-Disposition: inline In-Reply-To: <87a8qo19o8.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: Ludovic =?iso-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org On Sun, Nov 08, 2015 at 10:08:23PM +0100, Ludovic Courtès wrote: > Leo Famulari skribis: > > > * gnu/packages/lua.scm (lua-5.2)[arguments]: Rewrite make-flags so that > > Lua is built with platform-specific instructions for shared library > > loading (dlopen). > > Please move the explanations as a comment in the code. Done. Updated patches forthcoming... > > > #:phases (alist-replace > > 'build > > - (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" "linux"))) > > + (lambda _ (zero? (system* "make" > > + "PLAT=linux" > > + "MYCFLAGS=-fPIC" > > + "MYLDFLAGS=-fPIC"))) > > How can I test whether this works as expected? I tried this, but I’m > unsure whether it’s supposed to load OpenSSL’s libssl.so directly or > not: > > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix environment --ad-hoc lua-5.2 openssl > [env]$ echo $PATH > /gnu/store/zmqhwsl9vvxr4ihdnhwwpc3dpgmpsgsy-openssl-1.0.2d/bin:/gnu/store/9wmsrx7s9ydln5vgddms3cfavaiigwq2-lua-5.2.3/bin:/home/ludo/src/guix/scripts:/home/ludo/src/guix:/home/ludo/soft/bin:/home/ludo/.opam/system/bin:/home/ludo/.guix-profile/bin:/home/ludo/.guix-profile/sbin:/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin > [env]$ export LD_LIBRARY_PATH=/gnu/store/zmqhwsl9vvxr4ihdnhwwpc3dpgmpsgsy-openssl-1.0.2d/lib > [env]$ lua -lssl > lua: module 'ssl' not found: > no field package.preload['ssl'] > no file '/usr/local/share/lua/5.2/ssl.lua' > no file '/usr/local/share/lua/5.2/ssl/init.lua' > no file '/usr/local/lib/lua/5.2/ssl.lua' > no file '/usr/local/lib/lua/5.2/ssl/init.lua' > no file './ssl.lua' > no file '/usr/local/lib/lua/5.2/ssl.so' > no file '/usr/local/lib/lua/5.2/loadall.so' > no file './ssl.so' > stack traceback: > [C]: in function 'require' > [C]: in ? > --8<---------------cut here---------------end--------------->8--- > > Apologies in advance if I’m just asking stupid questions! > > Besides, it would be nice to get rid of these hard-coded /usr/local in a > subsequent patch. > > Ludo’.