From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nisse@lysator.liu.se (Niels =?UTF-8?Q?M=C3=B6ller?=) Newsgroups: gmane.lisp.guile.bugs Subject: bug#10519: guile and (mini-)gmp Date: Sat, 11 Aug 2012 11:37:35 +0200 Message-ID: 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 1344677935 8627 80.91.229.3 (11 Aug 2012 09:38:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Aug 2012 09:38:55 +0000 (UTC) Cc: 10519@debbugs.gnu.org, Torbjorn Granlund To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Aug 11 11:38:55 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 1T089e-0004ot-Mh for guile-bugs@m.gmane.org; Sat, 11 Aug 2012 11:38:46 +0200 Original-Received: from localhost ([::1]:55548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T089d-0008W4-Rk for guile-bugs@m.gmane.org; Sat, 11 Aug 2012 05:38:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57028) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T089b-0008Vt-3n for bug-guile@gnu.org; Sat, 11 Aug 2012 05:38:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T089a-0006G4-4E for bug-guile@gnu.org; Sat, 11 Aug 2012 05:38:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T089a-0006G0-0Y for bug-guile@gnu.org; Sat, 11 Aug 2012 05:38:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T08Hd-0001fy-Td for bug-guile@gnu.org; Sat, 11 Aug 2012 05:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: nisse@lysator.liu.se (Niels =?UTF-8?Q?M=C3=B6ller?=) Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 11 Aug 2012 09:47:01 +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.13446783636372 (code B ref 10519); Sat, 11 Aug 2012 09:47:01 +0000 Original-Received: (at 10519) by debbugs.gnu.org; 11 Aug 2012 09:46:03 +0000 Original-Received: from localhost ([127.0.0.1]:48205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T08Gg-0001ei-P8 for submit@debbugs.gnu.org; Sat, 11 Aug 2012 05:46:03 -0400 Original-Received: from mail.lysator.liu.se ([130.236.254.3]:39302) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T08Gd-0001eJ-TT for 10519@debbugs.gnu.org; Sat, 11 Aug 2012 05:46:01 -0400 Original-Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 6D70D4005C; Sat, 11 Aug 2012 11:37:38 +0200 (CEST) Original-Received: from stalhein.lysator.liu.se (stalhein.lysator.liu.se [IPv6:2001:6b0:17:f0a0::cc]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPS id 5DF6240056; Sat, 11 Aug 2012 11:37:37 +0200 (CEST) Original-Received: from stalhein.lysator.liu.se (localhost [127.0.0.1]) by stalhein.lysator.liu.se (8.14.4+Sun/8.14.4) with ESMTP id q7B9baMh001539; Sat, 11 Aug 2012 11:37:36 +0200 (MEST) Original-Received: (from nisse@localhost) by stalhein.lysator.liu.se (8.14.4+Sun/8.14.4/Submit) id q7B9bZKL001538; Sat, 11 Aug 2012 11:37:35 +0200 (MEST) X-Authentication-Warning: stalhein.lysator.liu.se: nisse set sender to nisse@lysator.liu.se using -f In-Reply-To: <874noawh4r.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 10 Aug 2012 23:51:00 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (usg-unix-v) X-Virus-Scanned: ClamAV using ClamSMTP 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:6472 Archived-At: 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 #ifndef GMP_NUMB_BITS #include #define GMP_NUMB_BITS (CHAR_BIT*sizeof(mp_limb_t)) #endif I hesitate to add it to mini-gmp.h, unless I can find a way to define it without relying on limits.h or autoconf. > - it also still uses mpq=E2=80=99s, as Mark noted; This is being addressed, I hope. > - random.c uses =E2=80=98mpz_realloc2=E2=80=99, also lacking. That call could be conditional on HAVE_LIBGMP, I think. > 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. >> 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. > I=E2=80=99m slightly concerned about mini-gmp, though. It=E2=80=99s almo= st 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). 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. The GMP developers have also considered adding #ifdef:ery in mini-gmp.c, to let the application specify precisely which features are wanted. (And I'm not sure what you mean with "GMP AIUI"). Regards, /Niels --=20 Niels M=C3=B6ller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance.