Mark Brethen
2011-12-18
I'm using psl reduce, and I can run it in the terminal but cannot load any packages. I found the unix-install.pdf in /psl which mentioned setting a $reduce variable but this doesn't work. Is there an env variable that needs to be set?
Mark Brethen
2011-12-18
BTW, this is on Mac OS X.
Thomas Sturm
2011-12-18
Could please go
on verboseload;
Then try loading a package, and post your commands and the outputs/errors here.
Please also post the value of
lisp loaddirectories!*;
Thomas
Mark Brethen
2011-12-18
Loading image file: /opt/local/libexec/reduce-algebra/scripts/../pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/red/reduce.img
***** `tmprint' load module not found
Break loop
1 lisp break (1) > Exiting lisp break
***** Continuing with parsing only …
end$
***** Error processing resource file /Users/marbre/.reducerc
Reduce (Free PSL version), 18-Dec-2011 …
1: plot sin x;
***** error in loading package gnuplot or package not found
2: on verboseload;
3: load tmprint;
***** error in loading package tmprint or package not found
4: plot sin x;
***** error in loading package gnuplot or package not found
5: lisp loaddirectories!*;
(""
"/opt/local/var/macports/build/_Users_marbre_ports_math_reduce-algebra/reduce-algebra/work/trunk/pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/red/"
"/opt/local/var/macports/build/_Users_marbre_ports_math_reduce-algebra/reduce-algebra/work/trunk/pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/psl/"
)
6:
Thomas Sturm
2011-12-18
There is a bug in your .reducerc. In the Terminal:
mv /Users/marbre/.reducerc /Users/marbre/.reducerc_hide
and try again.
Thomas
Thomas Sturm
2011-12-18
More precisely it appears that you have got some support for Texmacs in there, which does not work anymore.
Thomas
Mark Brethen
2011-12-18
I see a problem right away: the build was staged in the directory '/opt/local/var/macports/build/_Users_marbre_ports_math_reduce-algebra/reduce-algebra/work/trunk..' but then moved to ''/opt/local/libexec/reduce-algebra/.."
Same applies for /psl/
Is there a variable that can be set, or a file that can patched to show the correct lisp load directory?
Thomas Sturm
2011-12-18
The load path is in the Lisp variable loaddirectories!*, you can set this in your ~/.reducerc like:
lisp(loaddirectories!* := '("" "/opt/local/libexec/reduce-algebra/work/trunk/pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/red/"
"/opt/local/libexec/reduce-algebra/work/trunk/pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/psl/"));
Check the paths!
Thomas
Mark Brethen
2011-12-18
Thanks.
I was writing a portfile (tcl script) for the MacPorts package manager. MacPorts has a staged process in which builds everything in a temp directory and if it succeeds, then it moves (stages) the final build into a permanent location. The load directories that were reported are the temporary ones (which no longer exist).
Thomas Sturm
2011-12-18
sturm@lennier[~/Cloud/Dropbox/reduce-algebra/trunk/psl] grep loaddi * bootstrap.sh:(setq loaddirectories!* '("" "$here/red/" "$here/psl/")) build.sh:(setq loaddirectories!* '("" "$here/red/" "$here/psl/")) build.sh:(setq loaddirectories!* (quote ("" "$here/red/" "$here/psl/"))) mkredpsl.dat.for.vista:(setq loaddirectories* '("" "$reduce\lisp\psl\win32\red\" noncoremodule.sh: loaddirectories!* := "red/" . "psl/" . loaddirectories!*; reduce.img.dat.bat:(setq loaddirectories!* (list "" (bldmsg "%w\..\red/" (getenv "here")) reduce.img.sh:(setq loaddirectories!* (quote ("" "$here/red/" "$here/psl/")))
If you want a smart solution for the future, you can probably hack into the variable $here …
Thomas Sturm
2011-12-18
In line 285 of trunk/psl/build.sh there is
(setq loaddirectories!* (quote ("" "$here/red/" "$here/psl/")))
I think this is the value of loaddirectories!* that finally gets dumped into the image in line 345:
(savesystem "REDUCE" "$fasl/reduce" (quote ((read-init-file "reduce"))))
Thomas Sturm
2011-12-18
… but afterwards the noncore modules are compiled using that image. So you you probably want to rebuild the image with the new loaddirectories!* at the very end.
I like the idea of having reduce in MacPorts. I will be happy to support you (but for today, I have to go to bed now).
Thomas
Mark Brethen
2011-12-18
Great! If I need answers, I know where to ask : )
BTW, the reduce plugin does work in TeXmacs with psl version. According Andrey Grozin, csl reduce does not change its prompt after loading tmprint, and TeXmacs cannot recognize it as a prompt.
Rainer Schöpf
2011-12-19
I think it would be best to create a second image after all the modules have been built, with the final value of loaddirectories!*. Otherwise loading a module your will always search the build directories first (if they exist).
Basically, you take from psl/build.sh all the lines from
echo ++++++ Now create the reduce image file ++++++
to
XXX
and modify the pathsnames to your liking.
The same needs to be done for Linux .rpm and .deb packages as well. I'll look at this later when I have a bit more time.
Thomas Sturm
2011-12-19
Maybe we could use the configure option "-prefix" to optionally trigger this?
Thomas
Rainer Schöpf
2011-12-19
I've just checked in a new script psl/saveimage.sh .
Rainer
Mark Brethen
2011-12-19
Thanks, I'll take a look at it.
Mark Brethen
2011-12-20
I'm getting a shell command failure on saveimage.sh, line 81:
"./bpsl -td $STORE <<XXX > $chere/log/reduce.blg"
I've looked everywhere but cannot locate /logreduce.blg
I found:
/opt/local/var/macports/build/_Users_marbre_ports_math_reduce-algebra/reduce-algebra/work/trunk/pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/buildlogs/reduce.img.blg
/opt/local/var/macports/build/_Users_marbre_ports_math_reduce-algebra/reduce-algebra/work/trunk/pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/buildlogs/reduce4.blg
Thomas Sturm
2011-12-20
Has the directory
/opt/local/var/macports/build/_Users_marbre_ports_math_reduce-algebra/reduce-algebra/work/trunk/pslbuild/x86_64-mac_10.7_lion-darwin11.2.0/log
been created?
Was is the error message?
Thomas
Mark Brethen
2011-12-20
Thomas,
The saveimage.sh script isn't behaving. I've been communicating with Rainer on the mailing list.
I run the script after macports moves (activates) the build into the install directory, but get an error:
:info:activate /opt/local/libexec/reduce-algebra/psl/saveimage.sh: line 93: ./bpsl: No such file or directory
Mark Brethen
2011-12-25
I've posted an updated Portfile to MacPorts for psl version of Reduce, using r1534 saveimage. sh. I'll let you know when the changes are committed. When I get the time, I'd like to incorporate csl version.
Thanks for all your help!