Server version‎ > ‎Documents‎ > ‎

    Compiling

    From the source code available at the Github repository, what needs to be compiled is the C++ module located inside the src/imgSeekLib directory (called from now on imgdb). Here are some instructions.

    Requirements

    • Linux: imgdb compiles agains ImageMagick and Python, so these are the packages you should have installed on the test machine:
    • python 2.5
    • pytho-dev 2.5
    • libmagick
    • libmagick++
    • libmagic-dev
    • gcc
    • g++
    • Windows: The following must be installed:


    Build instructions for the imgdb module

    Linux: Compile running the command “python setup.py build” (from inside the src/imgSeekLib directory)

    Windows: Open the imgdb solution under the imgdb-msvc and compile it. You may need to adjust the include and libraries dir for the solution to point to the correct locations of Python, Java (if you want the Java bindings) and ImageMagick.

    The output of this compilation process are the files _imgdb.pyd (Windows) or imgdb.so (Unix) which are dynamic libraries that after compilation is finished, must be placed on the imgSeekLib directory of both isk-daemon and imgSeek.

    Requirements

    • Subversion client (for getting the latest source code)
    • Python and its development package.
    • A C++ compiler and development libraries: on Unix systems g++ and for Windows systems MSVC++ Express or cygwin.
    • ImageMagick libraries and development headers for C++.
      • On a Linux system that means the following packages:
        • imagemagick
        • libmagick++9-dev
        • libmagick9-dev
        • libmagick++9c2a
        • libmagick9
      • On a Windows system the binary release for ImageMagick provides both the dynamic link libraries and development headers.

    First, get the source code for the Subversion repository:

    $ svn checkout https://imgseek.svn.sourceforge.net/svnroot/imgseek/trunk/net.imgseek.imgdb

    Building under Linux or Cygwin

    Inside the checked out module there is a src/net/imgseek/imgdb/core directory. From inside it, invoke the build script:

    $ python build-python.py build

    If all goes well you should find the newly compiled _imgdb.so library somewhere deep under the build directory. The resulting dynamic libraries (imgdb.so/pyd) should then replace the original version from the official isk-daemon distribution (located inside the imgSeekLib dir).

    Sometimes the .so library is created without a leading underscore. If starting isk-daemon doesn’t work, try renaming the .so file and prefix it with an underscore so it looks like “_imgdb.so”. The error message in this case looks like this:

     File “/isk-daemon-0.6.2/imgSeekLib/ImageDB.py”, line 38, in ?
    import imgdb
    ImportError: dynamic module does not define init function (initimgdb)

    Building under Windows

    Inside the checked out module there is a imgdb-msvc directory. Inside this directory you can find a Microsoft Visual C++ Express (free download from MS) solution file.

    Open and build it. You may need to setup linking options (additional library dirs) to tell MSVC where to find the ImageMagick and Pythons libraries and development headers.

    Please use one of the mailing lists if you run into any trouble.


    Comments


    Comments