From mboxrd@z Thu Jan 1 00:00:00 1970 From: Federico Beffa Subject: Re: For a slimmer GHC Date: Mon, 2 Nov 2015 17:01:28 +0100 Message-ID: References: <87wpu0ij8l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40302) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtHY7-0003Ul-IA for guix-devel@gnu.org; Mon, 02 Nov 2015 11:01:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtHY1-0005D7-FL for guix-devel@gnu.org; Mon, 02 Nov 2015 11:01:35 -0500 In-Reply-To: <87wpu0ij8l.fsf@gnu.org> 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: Guix-devel On Mon, Nov 2, 2015 at 3:11 PM, Ludovic Court=C3=A8s wrote: > Federico Beffa skribis: > >> ludo@gnu.org (Ludovic Court=C3=A8s) writes: > > [...] > >>> What about removing all the .a? Would that be OK? >>> >>> On that topic I found >>> but it=E2=80= =99s not >>> clear to me whether this is relevant here. At worst we can add a phase >>> that removes these files. >> >> I do not know much about this topic, but I think that the discussion at >> the link you provided is relevant, as probably is the one at >> >> https://ghc.haskell.org/trac/ghc/wiki/DynamicLinkingDebate >> >> My interpretation of the above discussions is that it is in principle OK >> to remove statically linked libraries, but: (i) you loose the >> possibility to create statically linked executables (the default; the >> discussion here is about Haskell libraries, not system libraries), (ii) >> dynamically linked executables are slower than statically linked ones >> and (iii) it may create some build systems compatibility problems. > > (i) and (ii) apply to all the packages in Guix, not just Haskell > packages: most of the time we provide only shared libraries, and PIC > code includes a slight =E2=80=9Cperformance penalty=E2=80=9D (and possibl= y large memory > savings if several processes use the library.) > > I=E2=80=99m not sure what (iii) means though? I'm not sure either :-) It's one of the reasons listed in the discussion at the above link. I'm just passing on the information. > >> Personally I would keep them as the above discussions give me the >> impression that dynamic linking is not very mature in GHC. In any case, >> if people feel strongly about removing static libraries, then I would at >> least add an option to the build-system to easily re-enable their >> creation. > > I think we could even simply move them to a different output, for those > who really need them. That would be ideal, but I'm not sure you can simply move them. The location of a library must be listed in the binary library cache. I do not know if you can have more entries for a single library. I guess that would have to be investigated experimentally. Regards, Fede