- Make sure to have some
pdflatexdistribution installed (works flawlessly with MiKTeX installed on the host machine, not through CygWin) - Install these CygWin packages (newest one should always work fine):
cddlib-devellibgmp-devellibgsl-devellibntl-devellibreadline-devellibboost-develgcc-coregcc-g++cmakemakeautoconfautomakelibtoolpython27-piplibGL-devellibQt5Core-devellibQt5WebKit-devel
- Go to
/usr/includeand create a folder symlinkcddwhich refers to./cddlibAlso create symlinks for all the files from within the folder./cddlibin/usr/includeitself (Also needed for GFanLib) The last two steps are possible via the following commands (execute them in the working directory<CygWinInstallDir>/usr/include):mklink /D cdd cddlibmklink cdd.h cddlib\cdd.hmklink cdd_f.h cddlib\cdd_f.hmklink cddmp.h cddlib\cddmp.hmklink cddmp_f.h cddlib\cddmp_f.hmklink cddtypes.h cddlib\cddtypes.hmklink cddtypes_f.h cddlib\cddtypes_f.hmklink setoper.h cddlib\setoper.hmklink splitmix64.h cddlib\splitmix64.h
- Install
txt2tagsby downloading https://raw.githubusercontent.com/txt2tags/txt2tags/v2/txt2tags to/usr/local/bin - Download GFanLib (not the normal one, just Gfanlib, e.g. https://math.au.dk/~jensen/software/gfan/gfanlib0.6.2.tar.gz)
- Extract the archive
- This should result in a folder
gfanlib, runcd gfanlib && cp $(ls /usr/share/automake*/mkinstalldirs | head -1) .. - Install it via
./configure && make && make install - Fix the include paths via
mkdir /usr/local/include/gfanlib && cp /usr/local/include/gfanlib*.h /usr/local/include/gfanlib/ - Download Normaliz (e.g. https://github.com/Normaliz/Normaliz/releases/download/v3.10.2/normaliz-3.10.2.zip)
- Install it via
autoreconf -i && ./configure --disable-shared --disable-openmp && make && make install - Download Frobby (e.g. https://github.com/Macaulay2/frobby/archive/ae88a0bd93af2d7819db719e51b74eae713d7739.zip)
- Install it via
cmake . && make && make install - Download MathSAT (optionally, since it does not work for me; does not need to be compiled since it already ships the required binaries, e.g. https://mathsat.fbk.eu/download.php?file=mathsat-5.6.10-win64-msvc.zip)
- If you want to include MathSAT, copy all the files from the
mathsat-xxx-win64-msvc/binfolder to/usr/local/bin - Now, all libraries should be properly set up and they can be included in CoCoA using the following command (or similar, e.g., without the
mathsatpart):./configure --with-libcddgmp=/usr/lib/libcddgmp.dll.a --with-libgsl=/usr/lib/libgsl.dll.a --with-libfrobby=/usr/local/lib/libfrobby.a --with-libgfan=/usr/local/lib/libgfan.a --with-libnormaliz=/usr/local/lib/libnormaliz.a --with-libntl --with-libmathsat="/path/to/mathsat-x.x.x-win64-msvc/lib/mathsat.lib"
- If you don't need the Qt-GUI (different from the CoCoAInterpreter.exe CLI!), you don't need to install
libGL-devel,libQt5Core-devel, andlibQt5WebKit-develand you can disable building it by adding--no-qt-guito the parameters of the./configurecommand of CoCoA - If you intend to start the Qt-GUI, you need software capable of hosting a XServer, such as VcXsrv. An easy way to make it start properly then is by using the
startxcommand and then launchingC5.exewhile your XServer is running on the host machine. For all of that to work, make sure you have CygWin/X properly set up - When compiling the Qt-GUI, an additional
cygqcodeedit-1.dllis built withinsrc/CoCoA-5/QCodeEdit, which you need in order to start the GUI - If you only need CoCoALib as a library, take a look at ECC, which has a few starting points in
make_cocoalib.shandCMakeLists.txtin order to show you how to properly depend on it in CMake - ReadLine does not work correctly in the default Windows terminal, only in CygWin. In order for it to work also in other terminals, you need to install the
terminfoand possibly theterminfo-extrapackage within CygWin and add an environment variable which points to theterminfofolder like so:TERMINFO=/cygdrive/x/path/to/terminfo(it is usually within your CygWin installation under/usr/share/terminfo). In this case,xis the drive letter. The path needs to be formatted as a cygpath. Alternatively, you can also download the following archive and unzip it somewhere: terminfo.zip. After that, again add an environment variable which points to theterminfofolder - For some reason, when compiling I need to start the CygWin Terminal as an Administrator, because I get "Permission denied" errors otherwise. Maybe, that's just a problem on my system, but still, FYI
- You can build CoCoA 5 with MATHSAT on Windows successfully, but any commands that include MATHSAT (e.g.
MSatLinSolve) do not work correctly (they crash spectacularly). Also, when compiling with MATHSAT, CoCoA depends on Visual C++ Runtime 2013, as reported in #1675 - The
stripcommand works correctly on the final executable for me and considerably sizes it down - To speed up
make, a parameter like-j4speeds up the build significantly by enabling multi-threading - In order to run CoCoA in "Vanilla" installations (which don't have the CygWin libraries and binaries), my CoCoA installation looks like this (most DLL files were just copied from
/bin):. ├── CoCoAInterpreter.exe ├── CoCoAManual │ └── <ManyFilesOmittedHere> ├── cygblas-0.dll ├── cygboost_filesystem-1_66.dll ├── cygboost_system-1_66.dll ├── cygcddgmp-0.dll ├── cyggcc_s-seh-1.dll ├── cyggmp-10.dll ├── cyggmpxx-4.dll ├── cyggomp-1.dll ├── cyggsl-19.dll ├── cygncursesw-10.dll ├── cygntl-44.dll ├── cygreadline7.dll ├── cygstdc++-6.dll ├── cygwin1.dll ├── emacs │ ├── cocoa5.el │ └── cocoa5.emacs ├── MATHSAT.dll (only when you compile with MATHSAT enabled) ├── mpir.dll (only when you compile with MATHSAT enabled) └── packages └── <ManyFilesOmittedHere>