From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#10519: guile and (mini-)gmp Date: Sat, 11 Aug 2012 21:46:10 +0200 Message-ID: <87zk61qkjh.fsf@gnu.org> References: <874np05fwz.fsf@gnu.org> <874noawh4r.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1344714407 29560 80.91.229.3 (11 Aug 2012 19:46:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2012 19:46:47 +0000 (UTC) Cc: 10519@debbugs.gnu.org, Torbjorn Granlund To: nisse@lysator.liu.se (Niels =?UTF-8?Q?M=C3=B6ller?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Aug 11 21:46:47 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T0He1-000794-U9 for guile-bugs@m.gmane.org; Sat, 11 Aug 2012 21:46:46 +0200 Original-Received: from localhost ([::1]:58676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0He0-0006NG-TB for guile-bugs@m.gmane.org; Sat, 11 Aug 2012 15:46:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:44658) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0Hdx-0006NB-Ll for bug-guile@gnu.org; Sat, 11 Aug 2012 15:46:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0Hdw-0004UA-E9 for bug-guile@gnu.org; Sat, 11 Aug 2012 15:46:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0Hdw-0004Td-AX for bug-guile@gnu.org; Sat, 11 Aug 2012 15:46:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T0Hm2-0001IA-7C for bug-guile@gnu.org; Sat, 11 Aug 2012 15:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 11 Aug 2012 19:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10519 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10519-submit@debbugs.gnu.org id=B10519.13447148794936 (code B ref 10519); Sat, 11 Aug 2012 19:55:02 +0000 Original-Received: (at 10519) by debbugs.gnu.org; 11 Aug 2012 19:54:39 +0000 Original-Received: from localhost ([127.0.0.1]:49890 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Hle-0001HY-QC for submit@debbugs.gnu.org; Sat, 11 Aug 2012 15:54:39 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:51983) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T0Hlc-0001HQ-Ad for 10519@debbugs.gnu.org; Sat, 11 Aug 2012 15:54:37 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 56D938C19; Sat, 11 Aug 2012 21:46:12 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZaEL2p0zaoka; Sat, 11 Aug 2012 21:46:12 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id A289129E9; Sat, 11 Aug 2012 21:46:11 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Thermidor an 220 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: ("Niels \=\?iso-8859-1\?Q\?M\=F6ller\=22's\?\= message of "Sat, 11 Aug 2012 11:37:35 +0200") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.1 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6473 Archived-At: Hi, nisse@lysator.liu.se (Niels M=C3=B6ller) skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> Yes, thanks. I just tried it, and here=E2=80=99s the status: >> >> - numbers.c uses =E2=80=98GMP_NUMB_BITS=E2=80=99, which is lacking; > > If that's really needed, it can be substituted with something like >=20=20=20 > #ifndef GMP_NUMB_BITS > #include > #define GMP_NUMB_BITS (CHAR_BIT*sizeof(mp_limb_t)) > #endif OK. [...] >> - random.c uses =E2=80=98mpz_realloc2=E2=80=99, also lacking. > > That call could be conditional on HAVE_LIBGMP, I think. Right. >> Currently including pulls . When mini-GMP is used >> instead, then would be pulled instead, >> transparently. > > Might work. You'd need to document that a guile application which wants > to work with mini-gmp should never include gmp.h directly. Yes. >>> Users may also need some way of figuring out if they need to link with >>> -lgmp or not. >> >> libguile-2.0.la and guile-2.0.pc would provide that info. > > And on ELF-systems, you should record the dependency (or lack thereof) > directly in libguile.so. Of course. >> I=E2=80=99m slightly concerned about mini-gmp, though. It=E2=80=99s alm= ost 5000 lines, >> mostly copied from GMP AIUI, but with no way to synchronize. How do you >> consider the maintenance cost of this? > > My view is that you should copy mini-gmp from some gmp release or from > the main gmp repo. When you have a version which works for you, you > shouldn't need to modify it or update it very often (maybe once for each > gmp release or so). For me/us, the best workflow would be to have a Gnulib module. That way, whenever GMP developers fix a bug in mini-gmp, we automatically get the fix when running =E2=80=9Cgnulib-tool --update=E2=80=9D. > And if you need to make any modifications, you ought to bug-report the > corresponding problem. Hopefully, problems can be fixed in the gmp repo, > so that guile can simply upgrade to the latest version from the gmp > repo, rather than maintaining your own changes. Sure. What about the maintenance overhead for GMP developers? I mean, of those 5000 lines, most are copied from GMP, right? So, bugs found in GMP may have to be fixed in mini-GMP too, for instance. Thanks, Ludo=E2=80=99.