[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] gnu: Build lua-5.2 with dynamic library support.
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 2/5] gnu: Build lua-5.2 with dynamic library support. |
Date: |
Sun, 08 Nov 2015 22:08:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Leo Famulari <address@hidden> 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=-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’.
- [PATCH 0/5] Lua: enable shared library loading, build liblua.so, Leo Famulari, 2015/11/02
- [PATCH 4/5] gnu: Use make-flags and modify-phases for lua-5.2., Leo Famulari, 2015/11/02
- [PATCH 2/5] gnu: Build lua-5.2 with dynamic library support., Leo Famulari, 2015/11/02
- Re: [PATCH 2/5] gnu: Build lua-5.2 with dynamic library support.,
Ludovic Courtès <=
- [PATCH 3/5] gnu: Build lua-5.2 with a dynamic library, Leo Famulari, 2015/11/02
- [PATCH 5/5] gnu: Build lua-5.1 with dynamic library support and a dynamic library., Leo Famulari, 2015/11/02
- [PATCH 1/5] gnu: Remove tabulation from luajit., Leo Famulari, 2015/11/02