Changes between Version 33 and Version 34 of user-configure


Ignore:
Timestamp:
Feb 13, 2011 10:26:18 AM (9 years ago)
Author:
stefan
Comment:

small updates

Legend:

Unmodified
Added
Removed
Modified
  • user-configure

    v33 v34  
    11= Preparing the Compilation =
    22
    3 This page describes the configuration procedure on UNIX-like systems (including Linux, Solaris, Cygwin, or MSys), where the user can run the {{{configure}}} shell script.  If you are using the MS Developer Studio, you are referred to the [http://projects.coin-or.org/MSDevStudio MSDevStudio project page].  Some more [wiki:user-windows Windows specific notes] can be found [wiki:user-windows here].
     3This page describes the configuration procedure on UNIX-like systems (including Linux, Solaris, Cygwin, or MSys), where the user can run the {{{configure}}} shell script.  If you are using the MS Developer Studio, you are referred to the [http://projects.coin-or.org/MSVisualStudio MSVisualStudio project page].  Some more [wiki:user-windows Windows specific notes] can be found [wiki:user-windows here].
    44
    55If you have problems, have a look at the [wiki:user-troubleshooting troubleshooting page.]
     
    3232There are '''two types of arguments''' that can be given to the {{{configure}}} script.  The first type have the form of '''regular command line options''', such as {{{--enable-debug}}} or {{{-C}}}.  The second type work through '''variables''', and those can be provided either on the command line or can be set as environment variables.
    3333
    34 An alternative to providing configuration options through the command line is the ([wiki:user-configure#ConfigDotSiteFile config.site file]).
     34An alternative to providing configuration options through the command line is the [wiki:user-configure#ConfigDotSiteFile config.site file].
    3535
    36 For most COIN packages, several configuration scripts are run recursively by the base directory {{{configure}}} script.  You need to '''specify the options for all included projects''' (e.g., {{{Clp}}}, or {{{CoinUtils}}}) when you run the base {{{configure}}} script so that it can pass them to the {{{configure}}} scripts for the included projects.
     36For most COIN-OR packages, several configuration scripts are run recursively by the base directory {{{configure}}} script.  You need to '''specify the options for all included projects''' (e.g., {{{Clp}}}, or {{{CoinUtils}}}) when you run the base {{{configure}}} script so that it can pass them to the {{{configure}}} scripts for the included projects.
    3737
    3838You can see a '''list of all available options''' by running
     
    4242}}}
    4343
    44 Also, the file [https://projects.coin-or.org/BuildTools/browser/stable/0.5/share/config.site?format=raw BuildTools/share/config.site] in each COIN package has a list of most of the available options.
     44Also, the file [https://projects.coin-or.org/BuildTools/browser/stable/0.7/share/config.site?format=raw BuildTools/share/config.site] in each COIN-OR package has a list of some available options.
    4545
    4646=== Command Line Arguments for {{{configure}}} ===
    4747
    48 Command line arguments are given to {{{configure}}} in the usual manner for command line arguments.  Some common arguments are described here, but '''there might be additional options that you can find on the home pages for the individual COIN projects'''.
     48Command line arguments are given to {{{configure}}} in the usual manner for command line arguments.  Some common arguments are described here, but '''there might be additional options that you can find on the home pages for the individual COIN-OR projects'''.
    4949
    5050 * '''-C''': Instructs {{{configure}}} to '''use a cache file, {{{config.cache}}}''', to speed up configuration by remembering and reusing the results of tests already performed. The contents of {{{config.cache}}} will be consulted by the project scripts when they are called from the base {{{configure}}} script. '''The contents of config.cache will also be consulted each time {{{configure}}} is run again with the {{{-C}}} option.'''  If you are running {{{configure}}} with options that differ from previous runs, it is a good idea to '''delete the config.cache file''', so that changes in your local setup are correctly considered.
     
    5454 * '''--enable-debug''': This causes {{{configure}}} to select the '''debug compiler options'''.  It also defines the preprocessor macro {{{COIN_DEBUG}}}, which in some source code is use to '''activate additional (time-consuming) consistency tests'''.
    5555
    56  * '''--enable-static''': By default, the COIN libraries are compiled as shared libraries or DLLs on platforms that support this.  If you want '''static libraries to be generated as well''', you need to specify this option.
     56 * '''--enable-static''': By default, the COIN-OR libraries are compiled as shared libraries or DLLs on platforms that support this.  If you want '''static libraries to be generated as well''', you need to specify this option.
    5757
    5858 * '''--disable-shared''': If you want '''only static libraries''' to be compiled and no shared objects or DLLs, you should specify this option.
    5959
    60  * '''--enable-gnu-packages''': Some of the COIN projects can make use of GNU packages (such as zlib, bzlib, or readline).  Since they are usually provided under the GPL license, which has rather strong conditions, the configuration scripts do not check for the availability of those packages by default.  If you want to '''check for the availability of GNU packages to that they are linked into your code if available''', you need to specify this option. (Depending on your system configuration, it may be necessary to add to CPPFLAGS the path to the relevant include files, and to LDFLAGS the path to the relevant libraries, so that the packages' header and library files can be found).
     60 * '''--enable-gnu-packages''': Some of the COIN-OR projects can make use of GNU packages (such as zlib, bzlib, or readline).  Since they are usually provided under the GPL license, which has rather strong conditions, the configuration scripts do not check for the availability of those packages by default.  If you want to '''check for the availability of GNU packages so that they are linked into your code if available''', you need to specify this option. (Depending on your system configuration, it may be necessary to add to CPPFLAGS the path to the relevant include files, and to LDFLAGS the path to the relevant libraries, so that the packages' header and library files can be found).
    6161
    62  * Further options of the form '''--enable-...''' and '''--with-...''' might be understood by the configuration scripts '''for specific COIN projects'''.  For example, if you want to tell the Open Solver Interface (OSI) that you want to compile the Cplex solver interface, you need to specify the {{{--with-cplex-lib}}} and {{{--with-cplex-incdir}}} options, with the appropriate values.  If such a value consists of more than one word, you need to enclose it in quotation marks, for example:
     62 * Further options of the form '''--enable-...''' and '''--with-...''' might be understood by the configuration scripts '''for specific COIN-OR projects'''.  For example, if you want to tell the Open Solver Interface (OSI) that you want to compile the CPLEX solver interface, you need to specify the {{{--with-cplex-lib}}} and {{{--with-cplex-incdir}}} options, with the appropriate values.  If such a value consists of more than one word, you need to enclose it in quotation marks, for example:
    6363
    64     {{{--with-cplex-lib="-L/usr/ilog/cplex90/lib/static_pic -lcplex"}}}
     64    {{{--with-cplex-lib="-L/usr/share/cplex122/lib/x86-64_sles10_4.1/static_pic -lcplex"}}}
    6565
    66  assuming that the cplex library (usually named libcplex.a) is located in    {{{/usr/ilog/cplex90/lib/static_pic}}}. Note that on some systems the threading library must be added for cplex to work. In this case, the string is:
     66 assuming that the cplex library (usually named libcplex.a) is located in {{{/usr/share/cplex122/lib/x86-64_sles10_4.1/static_pic}}}. Note that on some systems the threading library must be added for cplex to work. In this case, the string is:
    6767
    68     {{{--with-cplex-lib="-L/usr/ilog/cplex90/lib/static_pic -lcplex -lpthread"}}}
     68    {{{--with-cplex-lib="-L/usr/share/cplex122/lib/x86-64_sles10_4.1/static_pic -lcplex -lpthread"}}}
    6969
    7070 For the include string:
    7171
    72     {{{--with-cplex-incdir="/usr/ilog/cplex90/include/ilcplex"}}}
     72    {{{--with-cplex-incdir="/usr/share/cplex122/include/ilcplex"}}}
    7373
    74  assuming that the header file cplex.h is located in the directory {{{/usr/ilog/cplex90/include/ilcplex}}}.
     74 assuming that the header file cplex.h is located in the directory {{{/usr/share/cplex122/include/ilcplex}}}.
    7575
    7676
    77  A typical call for the configuration script would then look like
     77 A typical call for the configuration script would then looks like
    7878
    7979    {{{
    80 ./configure --with-cplex-lib="-L/usr/ilog/cplex90/lib/static_pic -lcplex" \
    81             --with-cplex-incdir="/usr/ilog/cplex90/include/ilcplex" \
     80./configure --with-cplex-lib="-L/usr/share/cplex122/lib/x86-64_sles10_4.1/static_pic -lcplex" \
     81            --with-cplex-incdir="/usr/share/cplex122/include/ilcplex" \
    8282            --enable-static -C
    8383}}}
     
    107107 * '''ADD_FFLAGS''': '''Additional Fortran compiler flags'''.  If you only want to add flags to the compiler flags automatically determined by the {{{configure}}} script (as {{{FFLAGS}}}), you can set those additional flags with this variable.
    108108
    109  * '''CDEFS''' and '''CXXDEFS''':  If you want to have the C or C++ compiler use '''additional -D preprocessor macro defintions''', you should list them in these variable (''e.g.'', {{{CDEFS="-DPARANOIA"}}}).
     109 * '''CDEFS''' and '''CXXDEFS''':  If you want to have the C or C++ compiler use '''additional -D preprocessor macro defintions''', you should list them in these variables (''e.g.'', {{{CDEFS="-DPARANOIA"}}}).
     110
     111 * '''MAKE''': Program for handling makefiles. The default selection usually works fine. Only on some systems it may be necessary to specify a different {{{make}}} program (''e.g.'', {{{MAKE="gmake"}}}).
    110112
    111113 * '''AR''':  '''Program for handling archives'''.  The default selection usually works fine.  Only on some systems (such as AIX), it is necessary to specify additional flags when compiling in 64-bit mode (''e.g.'', {{{AR="ar -X64"}}}).
     
    113115 * '''NM''':  '''Program for listing symbols''' in object files.  The default selection usually works fine.  On some systems (such as AIX), it is necessary to specify additional flags when compiling in 64-bit mode (''e.g.'', {{{NM="nm -X64"}}}).
    114116
    115  * '''COIN_SKIP_PROJECTS''':  This variable is used to '''specify a list of included projects that should not be compiled'''.  For example, if you obtained the Osi package, but do not want to compile the included {{{DyLP}}} and {{{Vol}}} projects, you would specify '''COIN_SKIP_PROJECTS="DyLP Vol"'''.  This will skip the compilation of the DyLP and Vol projects and consequently will not create the !OsiDylp and !OsiVol libraries.
     117 * '''COIN_SKIP_PROJECTS''':  This variable is used to '''specify a list of included projects that should not be compiled'''.  For example, if you obtained the Clp package, but do not want to compile the included {{{Osi}}} project, you would specify '''COIN_SKIP_PROJECTS="Osi"'''.  This will skip the compilation of the Osi project and consequently will not create the !OsiClp library.
    116118
    117119A complete invocation of the configure script could look like:
     
    136138The {{{config.site}}} file is a '''shell script''' for {{{bin/sh}}} and needs to conform to {{{sh}}} syntax.  It is used to set values of shell variables that are used by the {{{configure}}} script.  In the case of '''variable arguments''' (such as {{{CC}}}), the name that should be used in {{{config.site}}} is identical to the name that is used on the command line.  For arguments of the form {{{--enable-...}}}, the corresponding {{{config.site}}} variable name is '''enable_...''' (''i.e.'', replace all dashes with underscores). To enable the feature, set the variable to {{{yes}}}; to disable it, set the variable to {{{no}}}.  For arguments of the form {{{--with-...}}}, use the variable name '''with_...''' (again with all dashes replaced by underscores) and set the variable to the appropriate value.  If no value is required, set it to {{{yes}}} to mimic {{{--with-...}}}, {{{no}}} to mimic {{{--without...}}}.
    137139
    138 '''Note: Since the {{{config.site}}} file is a shell script, you must not have any whitespace before or after the "{{{=}}}" symbol in a variable assignment!'''
     140'''Note: Since the {{{config.site}}} file is a shell script, you must not have any whitespace before or after the "{{{=}}}" symbol in a variable assignment! '''
    139141
    140 An '''example [https://projects.coin-or.org/BuildTools/browser/stable/0.5/share/config.site?format=raw config.site] file''' can be found in the {{{BuildTools/share}}} directory.
     142An '''example [https://projects.coin-or.org/BuildTools/browser/stable/0.7/share/config.site?format=raw config.site] file''' can be found in the {{{BuildTools/share}}} directory.
    141143
    142144== Performing a VPATH Compilation ==#VpathCompilation
     
    144146It is possible to '''compile the code in a different place than where the source code is''' using the VPATH feature of {{{make}}}.  This can, for example, be handy if you want to have several compiled versions around (''e.g.'', for different operating systems when you are working on a shared files system, or a production and a debug version).
    145147
    146 To do a VPATH compilation, you simply run the {{{configure}}} script in the directory where you want to place the compiled files.  ''E.g.'', if the base directory of the COIN package is {{{$HOME/Coin-Pkg}}} and you want to place the compiled the code in {{{$HOME/Obj/debug/Coin-Pkg}}}, you type
     148To do a VPATH compilation, you simply run the {{{configure}}} script in the directory where you want to place the compiled files.  ''E.g.'', if the base directory of the COIN-OR package is {{{$HOME/Coin-Pkg}}} and you want to place the compiled the code in {{{$HOME/Obj/debug/Coin-Pkg}}}, you type
    147149
    148150{{{