To install XASP under Windows, you must use Version 3.0 of XSB or later and Version 2.31 or later of Smodels 12.4. You should also have a recent version of Cygwin (e.g. 1.5.20 or later) with all the relevant development packages installed, such as devel, make, automake, patchtools, and possibly x11 (for makedepend) Without an appropriate Cygwin build environment many of these steps will simply fail, sometimes with quite cryptic error messages.
c:\smodels-2.31). After that, you must apply the patch
provided with this package. This patch enables the creation of a DLL
from Smodels. Below is a sample session (system output omitted) with
the required commands:
$ cd /cygdrive/c/smodels-2.31 $ cat $XSB/packages/xasp/patch-smodels-2.31 | patch -p1 $ make libAfter that, you should have a file called smodels.dll in the current directory, as well as a file called smodels.a. You should make the former "visible" to Windows. Two alternatives are either (a) change the PATH environment variable to contain
c:\smodels-2.31, or (b) copy smodels.dll to some other
directory in your PATH (such as c:\windows, for instance). One
simple way to do this is to copy smodels.dll to $XSB/config/i686-pc-cygwin/bin, after the configure XSB step
(step 2), since that directory has to be in your path in order to make
XSB fully functional.
$ cd $XSB/build $ ./configure --enable-no-cygwin -with-smodels="/cygdrive/c/smodels-2.31''You can optionally include the extended Cygwin w32 API using the configuration option
--with-includes=<PATH_TO_API>, (this
allows XSB's build procedure to find makedepend for instance),
but you'll probably do fine with just the standard Cygwin apps.
There are some compiler variables which may not be automatically set by the configure script in xsb_config.h, namely the configuration names and some activation flags. To correct this, do the following:
#define CONFIGURATION "i686-pc-cygwin" #define FULL_CONFIG_NAME "i686-pc-cygwin" #define SLG_GC
(Still more flags may be needed depending on Cygwin configuration)
After applying these changes, cd back to the $XSB/build directory and compile XSB:
$ ./makexsbNow you should have in $XSB/config/i686-pc-cygwin/bin directory both a xsb.exe and a xsb.dll.
$ cd $XSB/packages/xasp $ sh makelinks.sh /cygdrive/c/smodels-2.31Now you must copy the smoMakefile from the config directory to the xasp directory and run both its directives:
$ cp $XSB/config/i686-pc-cygwin/smoMakefile . $ make -f smoMakefile module $ make -f smoMakefile allAt this point, you can consult xnmr as you can with any other package, or xsb with the xnmr command line parameter, like this: (don't forget to add XSB bin directory to the $PATH environment variable)
$ xsb xnmrLots of error messages will probably appear because of some runtime load compiler, but if everything goes well you can ignore all of them since your xasppkg will be correctly loaded and everything will be functioning smoothly from there on out.