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

next in thread | raw e-mail | index | archive | help
> 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;

 4      3        2  2        3    4
x  + 4*x *y + 6*x *y  + 4*x*y  + y


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 != 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; \
	then cp reduce.app/Contents/reduce.img
/home/michel/pub/reduce-algebra/trunk/csl/cslbase/../../cslbuild/generated-c;
\
	elif test -f reduce.img; then cp reduce.img
/home/michel/pub/reduce-algebra/trunk/csl/cslbase/../../cslbuild/generated-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.


Now gmake install doesn't work and produces an infinite number of
submakes. I don't know how to make a proper install.


Hope this may help you to do a  port ....






-- 

Michel TALON




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