From mboxrd@z Thu Jan 1 00:00:00 1970 From: gno Subject: Re: [PATCH 1/7] gnu: lua: Build with support for dynamic libraries. Date: Tue, 30 Aug 2016 10:44:24 +0200 Message-ID: <2cc8b8ca-b0a2-2f2b-9700-023d6b517d31@gmail.com> References: <9cf2a138-d37a-b88e-57f6-c053b0dbb670@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beeel-00014b-JO for guix-devel@gnu.org; Tue, 30 Aug 2016 04:44:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1beeeh-000814-Bl for guix-devel@gnu.org; Tue, 30 Aug 2016 04:44:30 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:34329) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1beeeh-000810-4j for guix-devel@gnu.org; Tue, 30 Aug 2016 04:44:27 -0400 Received: by mail-wm0-x242.google.com with SMTP id q128so2121387wma.1 for ; Tue, 30 Aug 2016 01:44:26 -0700 (PDT) Received: from [192.168.178.28] (pD9EACE86.dip0.t-ipconnect.de. [217.234.206.134]) by smtp.gmail.com with ESMTPSA id ya1sm38425241wjb.23.2016.08.30.01.44.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Aug 2016 01:44:25 -0700 (PDT) In-Reply-To: <9cf2a138-d37a-b88e-57f6-c053b0dbb670@gmail.com> 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" To: guix-devel@gnu.org 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 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)