Is there a port to math/reduce?

C. P. Ghost cpghost at cordula.ws
Tue Dec 13 14:45:31 UTC 2011


On Tue, Dec 13, 2011 at 1:32 PM, Michel Talon <talon at lpthe.jussieu.fr> wrote:
>> 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

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 != 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.

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  port ....

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.

-- 
Cordula's Web. http://www.cordula.ws/


More information about the freebsd-ports mailing list