CAPD DynSys Library  5.2.0
CAPD requirements

Linux

For CAPD users:

  • gcc, g++.
  • make.
  • pkg-config.
  • To enable graphical environment krak :
    • We recommend wxWidgets with gtk library (it works only with libwxgtk2.8-dev package).
    • It is possible to use older X11 library (require libX11-dev package).
    • In both cases you should install packages for developers (usually with postfix dev).
  • To enable multiple precision support in the CAPD the libraries gmp and mpfr are required.
    One should install packages libgmp, libgmp-dev, libgmpxx, libmpfr, libmpfr-dev.
  • To enable advanced logging please install log4cxx (package liblog4cxx10-dev).
  • We recommend to install Boost library (header files and compiled libraries, recomended version: 1.53.0, it is not mandatory, e.g. package libboost1.53-all-dev or libboost-all-dev).

To use CAPD developer version one require also

  • autoreconf (along with autoconf, automake, aclocal)
  • libtool

The CAPD package was tested on Linux distributions: Debian, Ubuntu. Please check Dockerfiles to see our setup.

OSX

1) Install C++ compiler from Command Line Tools (it is also shipped with XCode) by doing one of the following:

  • Install Xcode from App Store (it is quite heavy).
  • It is enough to download and install Command Line Tools from Apple Developers (search for "command line tools").

2) If you have an M1 chip (filib interval library does not support it), then do one of the following

  • Use Rosetta (it is an Intel processor emulation and can slow down performance)

    • in Finder find Terminal (which should be in Applications/Utilities/), right mouse click on it, and choose “Get Info”.
    • Choose the “open using Rosetta” tickbox. Install Rosetta when prompted if you do not have one.
    • Quit Terminal.

    You can choose to have two versions of Terminal. One running with Rosetta and the other to run without it. To do so simply duplicate the Terminal application, and choose one of the terminal application to be under Rosetta and the other without it. Use the Rosetta terminal for the below installation steps.

  • (EXPERIMENTAL) Use –without-filib switch when calling configure script. It will use internal CAPD interval package instead of filib library. It is not yet well tested. It is good for development.

If you have an Intel mac, ignore this step.

3) Install Homebrew

For OSX you can find a few package managers, we recommend Homebrew.

  • In Terminal paste and execute:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
    (see https://brew.sh for details.)
  • Homebrew can check if the installation is correct:
    brew doctor

4) Install GNU tools and libraries, that CAPD depends on.

  • In Terminal execute one by one the following commands:
    brew install boost
    brew install make
    brew install autoconf
    brew install pkg-config
  • To use multiple precision in CAPD
    brew install gmp mpfr
  • For CAPD developers: install also
    brew install automake libtool svn log4cxx python
    to generate documentation
    brew install doxygen
  • Optional step - graphical library X11 support:

    version="2.7.11"
    
    curl  -L -o /tmp/XQuartz-${version}.dmg "https://dl.bintray.com/xquartz/downloads/XQuartz-${version}.dmg"
    hdiutil attach /tmp/XQuartz-${version}.dmg
    sudo installer -verbose -pkg /Volumes/XQuartz-${version}/XQuartz.pkg -target /
    ln -fs /opt/X11/include/X11 /usr/local/include/X11
    ln -fs /opt/X11/lib/libX11.dylib /usr/local/lib/libX11.dylib
    ln -fs /opt/X11/lib/pkgconfig/{x11,xproto,kbproto,xcb,pthread-stubs,xau,xdmcp}.pc /usr/local/lib/pkgconfig/
    

    Verify previous steps with pkg-config:

    pkg-config x11 --libs --cflags

5) Optional/Experimental Recently OSX version of gcc/g++ switched to clang engine. We have not tested it for compatibility with our code. You can compile the code, but we are not sure about compatibility with roundings etc. You can experiment with original version of gcc/g++ which you can install using following commands:

brew install gcc

Windows

The current version of CAPD uses automated compilation tools therefore it needs linux like shell console and selection of other tools. We recommend use of MinGW - Minimalist GNU for Windows.

We do not recommend Windows platform for development: shell scripts execution in MSYS is very slow(!) because of fork() emulation.

Nowadays we use cross-compilation technique to build binaries for Windows. We use MXE with Docker, see our Dockerfiles . However, long time ago we were able to prepare MinGW enviroment on Windows for CAPD compilation using the following:

NOT supported!!!

1) Download and install mingw-get-setup.exe. Set location or use default C:\MinGW. Select 'Basic Setup' on the left panel. Then mark: mingw-32-base, msys-base. You may see a few errors related to dependencies - just ignore them.

2) Click 'Start' and to 'Run' prompt past (change C:\MinGW if you use different settings):

C:\\MinGW\\msys\\1.0\\postinstall\\pi.bat

Answer two times y.

MinGW is installed! To verify: open

C:\\MinGW\\msys\\1.0\\msys.bat

and run

gcc -v

Please make sure that

cat /etc/fstab

returns something like:

c:/MinGW /mingw

if not, then close MSYS shell and execute once again:

C:\MinGW\msys\1.0\postinstall\pi.bat

3) Now we need to install a few packages. In the MSYS shell (msys.bat) execute following commands:

mingw-get install msys-wget
mingw-get install msys-unzip
mingw-get install mingw32-gcc-g++
mingw-get install mingw32-autotools
mingw-get install mingw32-binutils
mingw-get install mingw32-mpfr
mingw-get install mpc
mingw-get install mingw32-w32api
mingw-get install mingw32-mingwrt
wget "http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip" -O /tmp/gtk.zip
unzip -o -d /mingw/ /tmp/gtk.zip

The CAPD compilation should be performed from msys shell.

(Optional)Please download Boost library from here. ATTENTION For Windows download ZIP archive. On the Boost webpage you can find details about the installation process. You need to do it from native windows command line shell (Start -> Run -> cmd.exe). For us enough is to execute:

set PATH=C:\MinGW\bin;%PATH%
bootstrap.bat mingw
b2 --toolset=gcc

You may see a lot of warnings, do not care about them - just keep waiting and be patient. UNLESS you see an error - then let us know.

Next, form the MSys shell (replace [path_to_boost] with MSys path to the Windows folder with boost, in our case /c/boost_1_55_0/ ):

cp -fr [path_to_boost]/boost /mingw/include/
cp -fr [path_to_boost]/stage/lib/libboost* /mingw/lib/