Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2011 15:45:28 +0100
From:      "C. P. Ghost" <cpghost@cordula.ws>
To:        Michel Talon <talon@lpthe.jussieu.fr>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Is there a port to math/reduce?
Message-ID:  <CADGWnjU_0tOmTjCV_rLJSSeZeD6t3xvdeSjE8R1s0aMC2Q5waA@mail.gmail.com>
In-Reply-To: <20111213123202.GA72371@lpthe.jussieu.fr>
References:  <20111213123202.GA72371@lpthe.jussieu.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 13, 2011 at 1:32 PM, Michel Talon <talon@lpthe.jussieu.fr> 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 <sys/time.h>
> 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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADGWnjU_0tOmTjCV_rLJSSeZeD6t3xvdeSjE8R1s0aMC2Q5waA>