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?
BTW, this is on Mac OS X.
Could please go
Then try loading a package, and post your commands and the outputs/errors here.
Please also post the value of
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
1 lisp break (1) > Exiting lisp break
***** Continuing with parsing only …
***** 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;
5: lisp loaddirectories!*;
There is a bug in your .reducerc. In the Terminal:
mv /Users/marbre/.reducerc /Users/marbre/.reducerc_hide
and try again.
More precisely it appears that you have got some support for Texmacs in there, which does not work anymore.
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?
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/"
Check the paths!
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).
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 …
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"))))
… 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).
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.
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 ++++++
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.
Maybe we could use the configure option "-prefix" to optionally trigger this?
I've just checked in a new script psl/saveimage.sh .
Thanks, I'll take a look at it.
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
Has the directory
Was is the error message?
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
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!