CAPD DynSys Library 5.2.0
CAPD requirements

Linux

For CAPD users:

  • gcc, g++.
  • make.
  • pkg-config.
  • To enable graphical enviroment 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 recomend 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) - version 2.61 (recommended), 2.65 (tested)
  • libtool version 2.2.6b (recommended)

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

OSX

First of all we need C++ compiler from Command Line Tools. Go to Apple Developers, search for "command line tools". Download and install it.

Now we need to install GNU tools. For OSX you can find a few package managers, we recommend Homebrew.

1) Run Terminal application.

2) Execute:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile
# export PATH="/usr/local/bin:$PATH"

../utils/osx_install_homebrew.sh

3) Homebrew can check if the installation is correct:

brew doctor

4) Now install a few packages:

for pkg in "coreutils" "autoconf" "automake" "libtool" "pkg-config" "svn" "mpfr" "boost" "boost-python" "log4cxx" "homebrew/x11/pari" "python"; do
    brew install $pkg
done

pip install --user nose

5) Optional step - 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

6) 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 tap homebrew/versions
brew install gcc47

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 techique 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/