guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/7] gnu: lua: Build with support for dynamic libraries.


From: gno
Subject: Re: [PATCH 1/7] gnu: lua: Build with support for dynamic libraries.
Date: Tue, 30 Aug 2016 10:44:24 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 8/30/2016 8:37 AM, Leo Famulari wrote:

On Tue, Aug 23, 2016 at 02:02:40AM +0200, gno wrote:
On Mon, 22 Aug 2016 21:39:12 +0200
Ricardo Wurmus <address@hidden> wrote:
+       #:make-flags
+       '("CFLAGS=-fPIC -DLUA_DL_DLOPEN -DLUA_USE_POSIX"
+         "linux")
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.
Based on my reading of the Makefile (and the 'src/Makefile'), I think we
should be using MYCFLAGS and MYLDFLAGS.

CFLAGS and LDFLAGS include MYCFLAGS and MYLDFLAGS, respectively, but
they also include some default flags and platform-dependent flags. By
setting CFLAGS and LDFLAGS directly, we lose those default and
platform-dependent values.

By the way, '-ldl' does get passed to GCC in 'src/Makefile', but I don't
think it gets passed to the linker, although my knowledge here is not
strong.

Interesting. I didn't dig that deep either, I just noticed that without
-ldl lua-lgi wont load. I'll investigate a bit further when there is
time and also try to sanitize the flags. I suppose we can discard my
patch (add awesome 3.5).

(damn, i keep forgetting adding guix devel to CC)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]