From owner-freebsd-ports@FreeBSD.ORG Tue Dec 13 14:45:31 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A191D1065675 for ; Tue, 13 Dec 2011 14:45:31 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 68BF38FC0A for ; Tue, 13 Dec 2011 14:45:31 +0000 (UTC) Received: by ggnp1 with SMTP id p1so9384818ggn.13 for ; Tue, 13 Dec 2011 06:45:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.182.54.80 with SMTP id h16mr4161474obp.59.1323787530614; Tue, 13 Dec 2011 06:45:30 -0800 (PST) Received: by 10.182.220.33 with HTTP; Tue, 13 Dec 2011 06:45:28 -0800 (PST) X-Originating-IP: [93.221.189.142] In-Reply-To: <20111213123202.GA72371@lpthe.jussieu.fr> References: <20111213123202.GA72371@lpthe.jussieu.fr> Date: Tue, 13 Dec 2011 15:45:28 +0100 Message-ID: From: "C. P. Ghost" To: Michel Talon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-ports@freebsd.org Subject: Re: Is there a port to math/reduce? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2011 14:45:31 -0000 On Tue, Dec 13, 2011 at 1:32 PM, Michel Talon wrot= e: >> the computer algebra system (CAS) REDUCE has been >> released as open source software [*], but AFAICS, it has not >> yet been ported to FreeBSD. Anyone with porting skills >> interested to have a look? > > I have tried and apparently succeeded in building reduce on FreeBSD. > > Here is what i get: > > niobe% bin/redcsl > Reduce (Free CSL version), 13-Dec-11 ... > > 1: (x+y)^4; > > =A04 =A0 =A0 =A03 =A0 =A0 =A0 =A02 =A02 =A0 =A0 =A0 =A03 =A0 =A04 > x =A0+ 4*x *y + 6*x *y =A0+ 4*x*y =A0+ y That's fantastic! > What i have done: downloaded reduce from subversion, > then you have the choice of two lisps to build reduce > psl and csl. Since i don't know how to get psl for FreeBSD > i have done > > configure --with-csl > gmake > > (note Gnu make). > > This does a lot of configuration, then builds the fox toolkit and then > builds csl. Here i got two errors. > One is in > reduce-algebra/trunk/csl/cslbase/fns1.c > One needs to add > #include > for example after "headers.h", otherwise timeval is unknown later on. > > The second is about RLIM_SAVED_MAX and RLIM_SAVED_CUR undefined in > reduce-algebra/trunk/csl/cslbase/csl.c > These are resource limits related to getrlimit(), which don't exist as > such in FreeBSD. I have replaced the test at lines 1417 1418 by > if (stackLimit !=3D RLIMIT_VMEM) > which i hope is correct. > > Then csl builds to the end and then reduce builds. At the end you get: > > Info: Recompilation complete > if test -f reduce.app/Contents/reduce.img; \ > =A0 =A0 =A0 =A0then cp reduce.app/Contents/reduce.img > /home/michel/pub/reduce-algebra/trunk/csl/cslbase/../../cslbuild/generate= d-c; > \ > =A0 =A0 =A0 =A0elif test -f reduce.img; then cp reduce.img > /home/michel/pub/reduce-algebra/trunk/csl/cslbase/../../cslbuild/generate= d-c; > fi > scripts/make.sh: arith: syntax error: "0>0 ? 0 : 0" > > I was puzzled by that, but in fact it means the build of reduce is > completed. At this point you can run reduce as above. That's great! I only tried the released versions, and none of them compiled. With the version from SVN and the modifications you've suggested, I can confirm that it compiles and runs on my FreeBSD/amd64 8.2-STABLE r226789 system. > Now gmake install doesn't work and produces an infinite number of > submakes. I don't know how to make a proper install. Quickly grepping through the Makefiles, it looks like we need to replace all calls to "make" with calls to "$(MAKE)" so that gmake gets called instead of our make. I don't know if that's the cause of the recursion, but it could be. > Hope this may help you to do a =A0port .... I have no porting skills, esp. not when it comes to building against a SVN checkout instead of a distfile, but I hope some brave soul on ports@ would. ;-) > Michel TALON Thanks, -cpghost. --=20 Cordula's Web. http://www.cordula.ws/