Description
In this page, I've put some notes about using Yorick under MS-Windows.
Building and installing Yorick
In this section I explain how I've built relocatable Yorick versions for
MS-Windows and which can be downloaded
here. Building Yorick following my instructions require to have Cygwin installed, but the executable is
compiled with option --nocygwin and can be used without
Cygwin at all. Possible alternatives would be to compile Yorick with MinGW (a free set of Unix-like tools
and files for compilation with GCC under MS-Windows) or with some other
compiler for MS-Windows, but I've never tried.
Launch a Cygwin terminal and type the following commands (I assume that you use a Bourne shell like bash).
Download Yorick CVS code:
cvs -z3 -d:pserver:anonymous@yorick.cvs.sourceforge.net:/cvsroot/yorick \ co -P yorickGo to the Yorick source directory:
cd yorick
Configure Yorick for installation as a relocatable application:
export CC=gcc export CFLAGS='-pipe -Wall -O2 -fomit-frame-pointer -ffast-math -mtune=i686' make Y_HOME=relocate ysite make config
By default the level of optimization is rather low (only
-O) this is why I recommend to set your optimization level (and other compiler flags) by exporting the definition of environment variableCFLAGSprior themake configcommand. Of course, you can choose other options. You can check/fix the optimization settings by editing fileMake.cfgand look at the definition ofCOPT_DEFAULT.Build Yorick and install in local
./relocatedirectory:make make install
Then fix/complete contents of
./relocatedirectory:cp -p install.rel relocate/README cp -p play/libplay.a relocate/lib/. cp -p gist/libgist.a relocate/lib/. chmod 644 relocate/include/*.h mkdir -p relocate/contrib mv relocate/doc/README relocate/doc/CONTENTS cp -p LICENSE ONEWS README TODO VERSION relocate/doc/. cp -p gist/README relocate/doc/README.gist cp -p play/README relocate/doc/README.play
If you have Emacs (Cygwin version):
mkdir -p relocate/emacs cp -p emacs/README emacs/*.el relocate/emacs/. emacs --batch relocate/emacs/yorick.el -f emacs-lisp-byte-compile
You can now move the directory
./relocateto where you want (you may also change its name) and directly use the executableyorickinto the subdirectorybin.You can also pack the contents of
./relocateinto an archive for further installation. The following commands will rename and pack./relocatedirectory (warning: change the values of thePACKAGEvariable according to your taste and to Yorick version):PACKAGE=yorick-2.1.02-cvs2007.03.04-win-i686 mv relocate ../${PACKAGE} cd .. tar cvf - ${PACKAGE} | bzip2 -9 > ${PACKAGE}.tar.bz2 rm -rf yorick-${VERSION}
Problems
set_path in file stdx.i keeps the Windows-style directory separator (backslash) which causes my $HOME/yorick directory to be ignored. The fix consists in replacing file stdx.i by the following version stdx.i. The pre-compiled MS-Windows versions of Yorick (+ Yeti) available here have already been patched.
Without the fix:
> get_path(); "./:C:\\Documents and Settings\\eric\\yorick/:c:/Cygwin/home/eric/src/yorick\ /i/:c:/Cygwin/home/eric/src/yorick/contrib/:c:/Cygwin/home/eric/src/yorick/i\ 0/:c:/Cygwin/home/eric/src/yorick/lib/"
With the fix:
> get_path(); "./:C:/Documents and Settings/eric//yorick/:c:/Cygwin/home/eric/src/yorick/i\ /:c:/Cygwin/home/eric/src/yorick/contrib/:c:/Cygwin/home/eric/src/yorick/i0/\ :c:/Cygwin/home/eric/src/yorick/lib/"
-
Any error causes Yorick to exit, even in interactive (non-batch mode). Apparently, this is caused by excessive optimization with GCC (why?).
For that reason, I'd kept the optimization level to something not too aggressive like:
COPT_DEFAULT=-O2 -ffast-math
Under Emacs compiled for Windows (not Cygwin Emacs), Yorick output is very slow. This is not the case if I start Emacs under Zsh (provided by UnxTools).
Yorick is not insensitive to the end-of-line style. At this time only Unix style (newline
\n) and DOS style (carriage-return newline\r\n) are recognized, a carriage return (\r) followed by anything (but a newline) cause a syntax-error.
My Home Page
GNU Scientific Library
FFTW
libTiff
Tcl/Tk