From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/5] gnu: Build lua-5.2 with dynamic library support. Date: Sun, 08 Nov 2015 22:08:23 +0100 Message-ID: <87a8qo19o8.fsf@gnu.org> References: <0f36a80beb2f4796dd3c62cf97559743456f79f4.1446485963.git.leo@famulari.name> 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]:39193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvXCO-00019D-Vu for guix-devel@gnu.org; Sun, 08 Nov 2015 16:08:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvXCL-0000km-QH for guix-devel@gnu.org; Sun, 08 Nov 2015 16:08:28 -0500 In-Reply-To: <0f36a80beb2f4796dd3c62cf97559743456f79f4.1446485963.git.leo@famulari.name> (Leo Famulari's message of "Mon, 2 Nov 2015 12:46:41 -0500") 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: Leo Famulari Cc: guix-devel@gnu.org 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. > #:phases (alist-replace > 'build > - (lambda _ (zero? (system* "make" "CFLAGS=3D-fPIC" "linu= x"))) > + (lambda _ (zero? (system* "make" > + "PLAT=3Dlinux" > + "MYCFLAGS=3D-fPIC" > + "MYLDFLAGS=3D-fPIC"))) How can I test whether this works as expected? I tried this, but I=E2=80= =99m unsure whether it=E2=80=99s supposed to load OpenSSL=E2=80=99s libssl.so di= rectly or not: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix environment --ad-hoc lua-5.2 openssl=20 [env]$ echo $PATH /gnu/store/zmqhwsl9vvxr4ihdnhwwpc3dpgmpsgsy-openssl-1.0.2d/bin:/gnu/store/9= wmsrx7s9ydln5vgddms3cfavaiigwq2-lua-5.2.3/bin:/home/ludo/src/guix/scripts:/= home/ludo/src/guix:/home/ludo/soft/bin:/home/ludo/.opam/system/bin:/home/lu= do/.guix-profile/bin:/home/ludo/.guix-profile/sbin:/run/setuid-programs:/ru= n/current-system/profile/bin:/run/current-system/profile/sbin [env]$ export LD_LIBRARY_PATH=3D/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=E2=80=99m just asking stupid questions! Besides, it would be nice to get rid of these hard-coded /usr/local in a subsequent patch. Ludo=E2=80=99.