gno <gno...@gmail.com> writes: > On Mon, 22 Aug 2016 21:39:12 +0200 > Ricardo Wurmus <rek...@elephly.net> wrote: > >> * gnu/packages/lua.scm (lua)[arguments]: Use regular build phase and >> add make-flags. >> --- >> gnu/packages/lua.scm | 10 ++++++---- >> 1 file changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm >> index b4b5dee..52606f4 100644 >> --- a/gnu/packages/lua.scm >> +++ b/gnu/packages/lua.scm >> @@ -4,6 +4,7 @@ >> ;;; Copyright © 2014 Mark H Weaver <m...@netris.org> >> ;;; Copyright © 2014 Andreas Enge <andr...@enge.fr> >> ;;; Copyright © 2016 Efraim Flashner <efr...@flashner.co.il> >> +;;; Copyright © 2016 Ricardo Wurmus <rek...@elephly.net> >> ;;; >> ;;; This file is part of GNU Guix. >> ;;; >> @@ -44,14 +45,15 @@ >> (inputs `(("readline" ,readline))) >> (arguments >> '(#:modules ((guix build gnu-build-system) >> - (guix build utils) >> - (srfi srfi-1)) >> + (guix build utils) >> + (srfi srfi-1)) >> #:test-target "test" >> + #:make-flags >> + '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX" >> + "linux") >> #:phases >> (modify-phases %standard-phases >> (delete 'configure) >> - (replace 'build >> - (lambda _ (zero? (system* "make" "CFLAGS=-fPIC" >> "linux")))) (replace 'install >> (lambda* (#:key outputs #:allow-other-keys) >> (let ((out (assoc-ref outputs "out"))) > > > This doesn't work for me - lua-lgi still complains about lua not being > able to dynamically load. But this does work: > > (replace 'build > (lambda _ (zero? (system* "make" > "LDFLAGS=-ldl" "CFLAGS=-fPIC -DLUA_USE_DLOPEN" "linux")))) > > I tried adding LDFLAGS in #make-flags to no avail.
I don’t have a package for “lua-lgi” so I cannot reproduce this. All I can say is that it appears to work in the case of prosody. Without LUA_DL_DLOPEN defined Lua will not even attempt to load dynamic libraries. ~~ Ricardo