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: Leo Famulari
Subject: Re: [PATCH 1/7] gnu: lua: Build with support for dynamic libraries.
Date: Tue, 30 Aug 2016 02:37:13 -0400
User-agent: Mutt/1.7.0 (2016-08-17)

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.



reply via email to

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