Changes between Version 9 and Version 10 of BuildingFromSource


Ignore:
Timestamp:
10/16/12 15:10:36 (22 months ago)
Author:
marko
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • BuildingFromSource

    v9 v10  
    1  
    2 == Building From Source == 
    3  
    4 === Prerequisites === 
    5  
    6 To build orange from source you first have to make sure you have a C++ tool-chain installed 
    7 on your system. Supported compilers are gcc (g++) for Linux and Mac OS X and Microsoft Visual 
    8 C++ on Windows (MinGW is not supported at this time). 
    9 [[BR]] 
    10  
    11 * On Windows install the free [http://www.microsoft.com/express Visual Studio Express] 
    12 * On Linux use the distribution package management tools  
    13 * On Mac OSX install the [http://developer.apple.com/xcode XCode developer tools] 
    14  
    15 Additionally you will need python and numpy development header files. This comes included with python 
    16 and numpy installation on Windows and Mac OSX, but is usually separated into separate packages on Linux, 
    17 for instance 'python-dev' and python-numpy-dev' on Debian derived distributions. 
    18  
    19 === Downloading the latest source snapshot === 
    20  
    21 Go to [/download/ nightly builds] and download the latest nightly packed 
    22 sources zip archive and unpack it somewhere (for instance in your home directory). 
    23 [[BR]] 
    24  
    25 Alternatively you can checkout the sources from the Mercurial repository. 
    26  
    27 {{{ 
    28 hg clone https://bitbucket.org/biolab/orange 
    29 }}} 
    30  
    31 == Build and Install== 
    32  
    33 === Using setup.py === 
    34  
    35 The easiest way to build the orange library from source is to use the standard setup.py script in the root 
    36 orange directory. Just run  
    37 {{{ 
    38 python setup.py build 
    39 }}} 
    40 to build and  
    41 {{{ 
    42 python setup.py install  
    43 }}} 
    44  
    45 to install the library in the system site-packages. This may require administrative privileges. If you don't have 
    46 them you can install Orange into the user specific site-packages. See [http://docs.python.org/install/index.html#how-installation-works] 
    47 for more information on other installation schemes. Note that if you install orange in a non-system/user site-packages 
    48 (for instance by using the the 'home' scheme) you will need to add the install dir to PYTHONSITEPACKAGES (that is 
    49 because orange needs Python to process its .pth file to add the appropriate directories to the sys.path). 
    50  
    51 Note that if distutils chooses clang as the default compiler it is necessary to add the `-Wno-address-of-temporary` 
    52 flag to the CPPFLAGS env. variable before running setup.py 
    53  
    54 {{{ 
    55 export CPPFLAGS=-Wno-address-of-temporary 
    56 python setup.py build 
    57 }}} 
    58  
    59 === Using make === 
    60  
    61 This is mostly only useful to developers intending to modify/develop orange C++ code (this can only build the extensions 
    62 in-place, i.e. it does not support an install command) 
    63 [[BR]] 
    64  
    65 First change the working directory to the 'source' sub-directory then run make 
    66 {{{ 
    67 cd source 
    68 make 
    69 }}} 
    70 this will build the orange core extensions in the root directory (i.e. the one you started in). 
    71 Useful environment variables: 
    72  
    73  * PYTHON - names the python executable for which Orange is being build. 
    74  * CXXFLAGS - flags to pass to C++ compiler 
    75  * CFLAGS - flags to pass to C compiler 
    76  * LDFLAGS - flags to pass to the linker 
    77  * EXCLUDE_ORANGEQT - if set to any value will cause orangeqt to not be build  
    78  
    79 (See [source:source/orangeqt/README.txt source/orangeqt/README.txt] for instructions on how to build orangeqt alone). 
    80  
    81 [[BR]]  
    82  
    83 == Linking to external libraries == 
    84  
    85 The Orange sources come bundled with some third party libraries that are build and linked (statically) into Orange. 
    86 These are: 
    87  
    88  * BLAS (a subset) 
    89  * LIBSVM (v3.2 - v3.* is required) 
    90  * LIBLINEAR (v1.8) 
    91  * QHull 
    92  
    93 You can customize the build process to instead link to the corresponding external library if you already have them 
    94 installed.  
    95  
    96 ==== setup.py ==== 
    97  
    98 For the setup.py method this is done by modifying the  
    99 [source:orange/setup-site.cfg setup-site.cfg] file in the Orange root directory. 
    100 See the comments in that file for instructions and examples on how to customize the process. 
    101  
    102 ==== make ==== 
    103  
    104 Pass the library names to make on the command line or through env. variables (you can also just edit the Makefile).  
    105 Example: 
    106 {{{ 
    107 make BLAS_LIB=atlas 
    108 }}} 
    109 All the variable names are listed in the 
    110 [source:source/Makefile source/Makefile]. 
    111  
    112 == Some old documentation == 
    113  
    114  * [/installation_suse.html SUSE installation] 
    115  * [source:orange/orange/doc/INSTALL.linux.txt Linux installation guide in code repository] 
     1See [https://bitbucket.org/biolab/orange/src/tip/INSTALL.txt]