Building Fityk and the Fityk SWIG wrapper

Sadly, the debian package currently available does not install the libraries, which are needed by the SWIG wrapper. So one has to download and build fitxyk from source. This is not too hard as long as you can use your package manager to install a bunch of build dependencies.

  1. Get Fityk and Xylib from their repositories:

     svn co https://fityk.svn.sourceforge.net/svnroot/fityk/trunk/ fityk
     svn co https://xylib.svn.sourceforge.net/svnroot/xylib/trunk/ xylib
  2. I used the ubuntu package manager to install various things needed to build Fityk.
    • autoconf
    • libtool
    • g++
    • libbz-dev
    • libboost-math-dev
    • libreadline6-dev
  3. In the xylib directory:

     ./autogen.sh
     make
     sudo make install
  4. In the fityk directory:

     ./autogen.sh
     ./configure --disable-xyconvert --without-doc
     make
     sudo make install
    I was never able to get the sphinx tool used to generate the document to run correctly. The simplest solution was to disable building the document. And I never figured out the deal with xyconvert, so I skipped that also. (Any hints on how to deal with those two issues are quite welcome!)
  5. Now the fityk .so library is in the /usr/local/lib directory. I had to do sudo ldconfig to get the newly installed libraries recognized by the linker.

  6. To build the SWIG wrapper from its source in the fityk/swig/ directory, do:

    swig -perl -c++ -I../src fityk.i

    This produces the Fityk.pm and fityk_wrap.cxx files which are needed to make the perl wrapper. Copy these two files to the location where the perl wrapper is built. Also, copy ../src/fityk.h to the perl wrapper location. The fityk.h needs to be up to date with respect to the Fityk shared object.

  7. cd to the location of the Fityk perl package and do

     perl Makefile.PL
     make
     make test
     sudo make install

Demeter/BuildingFityk (last edited 2011-06-06 12:47:47 by BruceRavel)