Skip to content

Commit

Permalink
Doc update and removal of a useless previous fix in Newton
Browse files Browse the repository at this point in the history
  • Loading branch information
gchabert committed Sep 8, 2020
1 parent 4288495 commit 0a247b2
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 86 deletions.
58 changes: 29 additions & 29 deletions doc/install-cmake.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ If you are on MacOS and use the `MacPorts`_ package manager, you can install Ibe
Otherwise, you can install Ibex from source with the following instructions.
The installation assumes your system meets some `requirements`_.

Save the archive ``ibex-2.8.7.tar.gz`` in some ``Ibex`` folder and::

~/Ibex$ tar xvfz ibex-2.8.7.tar.gz
~/Ibex$ cd ibex-2.8.7
~/Ibex/ibex-2.8.7$ mkdir build
~/Ibex/ibex-2.8.7/build$ cd build
~/Ibex/ibex-2.8.7/build$ cmake ..
~/Ibex/ibex-2.8.7/build$ make
~/Ibex/ibex-2.8.7/build$ sudo make install
Save the archive ``ibex-2.8.8.tar.gz`` in some ``Ibex`` folder and::

~/Ibex$ tar xvfz ibex-2.8.8.tar.gz
~/Ibex$ cd ibex-2.8.8
~/Ibex/ibex-2.8.8$ mkdir build
~/Ibex/ibex-2.8.8/build$ cd build
~/Ibex/ibex-2.8.8/build$ cmake ..
~/Ibex/ibex-2.8.8/build$ make
~/Ibex/ibex-2.8.8/build$ sudo make install
If you want to install Ibex in a local folder, use ``-DCMAKE_INSTALL_PREFIX``, ex::

~/Ibex/ibex-2.8.7/build$ cmake -DCMAKE_INSTALL_PREFIX=$HOME ..
~/Ibex/ibex-2.8.8/build$ cmake -DCMAKE_INSTALL_PREFIX=$HOME ..

See the :ref:`options <install-cmake-options>`. The folder full path must not contain any **white space** or wierd characters like ``'"\()`*[]``.

Expand Down Expand Up @@ -133,7 +133,7 @@ LP_LIB Ex: ``-DLP_LIB=soplex``

.. note::

- The current release of Ibex (>=2.8.7) is compatible with Soplex 4.
- The current release of Ibex (>=2.8.8) is compatible with Soplex 4.
- The link with cplex is **experimental**, i.e., support for installation issues
may not be guaranteed.

Expand Down Expand Up @@ -172,12 +172,12 @@ SOPLEX_DIR Ex: ``-DLP_LIB=soplex -DSOPLEX_DIR=$HOME/soplex``
If Ibex is compiled as a shared library, you must also add the libpath of Soplex
in ``LD_LIBRARY_PATH``::
~/Ibex/ibex-2.8.7/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/
~/Ibex/ibex-2.8.8/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/

Under Windows, if you run a program from a command window, the ``PATH`` variable must
also be updated::
> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7
> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8
> set SOPLEX_PATH=...
> set PATH=%PATH%;%IBEX_PATH%\lib;%SOPLEX_PATH%\lib;C:\MinGW\bin

Expand Down Expand Up @@ -228,11 +228,11 @@ BUILD_SHARED_LIBS Ex: ``-DBUILD_SHARED_LIBS=1``.

Under MinGW::
$ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.7/lib
$ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8/lib

Under a Windows command window::
> set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7\lib;C:\MinGW\bin
> set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8\lib;C:\MinGW\bin
====================== ======================================================================================


Expand Down Expand Up @@ -266,22 +266,22 @@ To install ``pkg-config`` under MinGW, follow the steps given `here <http://stac

So, place the file ``foo.cpp`` in the ``examples/`` folder and::

~/Ibex/ibex-2.8.7/$ cd examples
~/Ibex/ibex-2.8.7/examples$ make foo
~/Ibex/ibex-2.8.7/examples$ ./foo
~/Ibex/ibex-2.8.8/$ cd examples
~/Ibex/ibex-2.8.8/examples$ make foo
~/Ibex/ibex-2.8.8/examples$ ./foo
.. note::

1. It may be necessary to set the ``PKG_CONFIG_PATH`` to *[prefix]*\ ``/share/pkgconfig`` where *[prefix]* is
``/usr/local`` by default or whatever path specified via ``-DCMAKE_INSTALL_PREFIX``::

~/Ibex/ibex-2.8.7/$ export PKG_CONFIG_PATH=/usr/local/share/pkgconfig/
~/Ibex/ibex-2.8.8/$ export PKG_CONFIG_PATH=/usr/local/share/pkgconfig/


Under Windows, if you have compiled Ibex with ``-DBUILD_SHARED_LIBS=1`` you can run the program from a command window.
Just update the path to dynamically link against Ibex::

> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7
> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8
> set PATH=%PATH%;%IBEX_PATH%\lib;C:\MinGW\bin
> cd %IBEX_PATH%\examples
> foo.exe
Expand All @@ -294,7 +294,7 @@ Plugins/Packages

There are many developments based on ibex which offer additional functionalities, typically algorithms tailored to some class of problems (e.g., parameter estimation, semi-infinite programming, etc.).

Up to release 2.8.6, there were disributed under the form of *plugins* as they were installed and compiled with the core library. Now, with Cmake, they are compiled separately and generate their own libraries. So we call them here *packages*.
If Ibex is compiled with waf, they are rather *plugins* as they are installed and compiled with the core library. With Cmake, they are compiled separately and generate their own libraries. So we call them here *packages*.

The same steps must be done to compile a package as for the core library. See the current list of available plugins/packages in the `download page of Ibex <http://www.ibex-lib.org/download>`_.

Expand All @@ -312,14 +312,14 @@ The ``CMAKE_INSTALL_PREFIX`` option allows to install the package locally, ex::

In this case the ``sudo`` before ``make install`` is unecessary.

If Ibex has been installed in a local folder, say ``~/Ibex/ibex-2.8.7`` you need to indicate this
If Ibex has been installed in a local folder, say ``~/Ibex/ibex-2.8.8`` you need to indicate this
path using the ``CMAKE_PREFIX_PATH`` option::

~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.7 ..
~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.8 ..
Of course, you can combine both::

~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.7 -DCMAKE_INSTALL_PREFIX=~/Ibex/ibex-ampl ..
~/Ibex/ibex-ampl$ cmake -DCMAKE_PREFIX_PATH=~/Ibex/ibex-2.8.8 -DCMAKE_INSTALL_PREFIX=~/Ibex/ibex-ampl ..

As said above, packages result in separate libraries. To link you own code with a package, you will
have to add the following line in the ``CMakeLists.txt`` file of your project::
Expand All @@ -333,8 +333,8 @@ You can also run the whole unit tests suite with the installed version of Ibex.

To this end, you must install first the `cppunit library <https://sourceforge.net/projects/cppunit/>`_. Then run::

~/Ibex$ cd ibex-2.8.7/build
~/Ibex/ibex-2.8.7/build$ make check
~/Ibex$ cd ibex-2.8.8/build
~/Ibex/ibex-2.8.8/build$ make check

=============
Uninstall
Expand All @@ -348,13 +348,13 @@ Linux/Macos

After running ``make install`` you can uninstall by running::

~/Ibex$ cd ibex-2.8.7/build
~/Ibex/ibex-2.8.7/build$ make uninstall
~/Ibex$ cd ibex-2.8.8/build
~/Ibex/ibex-2.8.8/build$ make uninstall


Then, you can remove the build directory::

~/Ibex$ cd ~/Ibex/ibex-2.8.7
~/Ibex$ cd ~/Ibex/ibex-2.8.8
~/Ibex/ibex-2-8-7$ rm -Rf build
---------------
Expand Down
73 changes: 48 additions & 25 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,25 @@ If you are on MacOS and use the `MacPorts`_ package manager, you can install Ibe
Otherwise, you can install Ibex from source with the following instructions.
The installation assumes your system meets some `requirements`_.

Save the archive ``ibex-2.8.7.tar.gz`` in some ``Ibex`` folder and::
Save the archive ``ibex-2.8.8.tar.gz`` in some ``Ibex`` folder and::

~/Ibex/$ tar xvfz ibex-2.8.7.tar.gz
~/Ibex/$ cd ibex-2.8.7
~/Ibex/ibex-2.8.7/$ ./waf configure
~/Ibex/ibex-2.8.7/$ sudo ./waf install
~/Ibex/$ tar xvfz ibex-2.8.8.tar.gz
~/Ibex/$ cd ibex-2.8.8
~/Ibex/ibex-2.8.8/$ ./waf configure --lp-lib=soplex
~/Ibex/ibex-2.8.8/$ sudo ./waf install

.. warning::

Soplex is a tierce library under `ZIB`_ licence, not LGPL. By configuring
Ibex with Soplex, you implicitely accept the terms of this licence.

If you don't accept these terms, you can configure Ibex without Soplex::

~/Ibex/ibex-2.8.8/$ ./waf configure
**however** the performances will be strongly degraded, especially for the global optimizer.

-----------------
Windows
-----------------
Expand Down Expand Up @@ -72,19 +83,31 @@ Windows

We will assume now that this folder is the root folder of ibex.

- Save the archive ``ibex-2.8.7.tar.gz`` in ``C:\MinGW\msys\1.0\home\[user]\Ibex``
- Save the archive ``ibex-2.8.8.tar.gz`` in ``C:\MinGW\msys\1.0\home\[user]\Ibex``
- Configure Ibex (still in the shell of MinGW)::

~/Ibex/$ export PATH="$PATH:/c/Python27"
~/Ibex/$ tar xvfz ibex-2.8.7.tar.gz
~/Ibex/$ cd ibex-2.8.7
~/Ibex/ibex-2.8.7/$ ./waf configure --prefix=/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.7
~/Ibex/$ tar xvfz ibex-2.8.8.tar.gz
~/Ibex/$ cd ibex-2.8.8
~/Ibex/ibex-2.8.8/$ ./waf configure --prefix=/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8 --lp-lib=soplex
**Note:** the paths must be entered in Linux-style (don't use backslash ("\\") as separator).


.. warning::

Soplex is a tierce library under `ZIB`_ licence, not LGPL. By configuring
Ibex with Soplex, you implicitely accept the terms of this licence.
If you don't accept these terms, you can configure Ibex without Soplex::

~/Ibex/ibex-2.8.8/$ ./waf configure --prefix=/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8
**however** the performances will be strongly degraded, especially for the global optimizer.
- Install Ibex::

~/Ibex/ibex-2.8.7/$ ./waf install
~/Ibex/ibex-2.8.8/$ ./waf install

.. note::

Expand Down Expand Up @@ -120,7 +143,7 @@ Configuration options

The full list of options supported by ``waf configure`` can be obtained with::

~/Ibex/ibex-2.8.7/$ ./waf --help
~/Ibex/ibex-2.8.8/$ ./waf --help
This will display the full list of installed interval/LP libraries and plugins with their specific options,
as well as benchmarking features.
Expand All @@ -140,11 +163,11 @@ In particular, ``waf`` ``configure`` supports the following options:

Under MinGW::
$ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.7/lib
$ export PATH=$PATH:/c/MinGW/msys/1.0/home/[user]/Ibex/ibex-2.8.8/lib

Under a Windows command window::
> set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7\lib;C:\MinGW\bin
> set PATH=%PATH%;C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8\lib;C:\MinGW\bin



Expand Down Expand Up @@ -205,11 +228,11 @@ In particular, ``waf`` ``configure`` supports the following options:

If Ibex is compiled as a shared library, you must also add the libpath of Soplex in ``LD_LIBRARY_PATH``::
~/Ibex/ibex-2.8.7/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/
~/Ibex/ibex-2.8.8/$ export LD_LIBRARY_PATH=[prefix]/lib/:[soplex-path]/lib/

Under Windows, if you run a program from a command window, the ``PATH`` variable must also be updated::
> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7
> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8
> set SOPLEX_PATH=...
> set PATH=%PATH%;%IBEX_PATH%\lib;%SOPLEX_PATH%\lib;C:\MinGW\bin

Expand Down Expand Up @@ -266,22 +289,22 @@ To install ``pkg-config`` under MinGW, follow the steps given `here <http://stac

So, place the file ``foo.cpp`` in the ``examples/`` folder and::

~/Ibex/ibex-2.8.7/$ cd examples
~/Ibex/ibex-2.8.7/examples$ make foo
~/Ibex/ibex-2.8.7/examples$ ./foo
~/Ibex/ibex-2.8.8/$ cd examples
~/Ibex/ibex-2.8.8/examples$ make foo
~/Ibex/ibex-2.8.8/examples$ ./foo
.. note::

1. It may be necessary to set the ``PKG_CONFIG_PATH`` to *[prefix]*\ ``/share/pkgconfig`` where *[prefix]* is
``/usr/local`` by default or whatever path specified via ``--prefix``::

~/Ibex/ibex-2.8.7/$ export PKG_CONFIG_PATH=/usr/local/share/pkgconfig/
~/Ibex/ibex-2.8.8/$ export PKG_CONFIG_PATH=/usr/local/share/pkgconfig/


Under Windows, if you have compiled Ibex with ``--enable--shared`` you can run the program from a command window.
Just update the path to dynamically link against Ibex::

> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.7
> set IBEX_PATH=C:\MinGW\msys\1.0\home\[user]\Ibex\ibex-2.8.8
> set PATH=%PATH%;%IBEX_PATH%\lib;C:\MinGW\bin
> cd %IBEX_PATH%\examples
> foo.exe
Expand All @@ -293,15 +316,15 @@ You can also run the whole unit tests suite with the **installed** version of Ib

To this end, you must install first the `cppunit library <https://sourceforge.net/projects/cppunit/>`_. Then run::

~/Ibex/ibex-2.8.7/$ ./waf utest
~/Ibex/ibex-2.8.8/$ ./waf utest
Note also the following command::

~/Ibex/ibex-2.8.7/$ ./waf check
~/Ibex/ibex-2.8.8/$ ./waf check
as a handy shortcut for::

~/Ibex/ibex-2.8.7/$ ./waf build install clean utest
~/Ibex/ibex-2.8.8/$ ./waf build install clean utest


=============
Expand All @@ -310,8 +333,8 @@ Uninstall

Simply type in the path of IBEX (under the shell of MinGW for Windows)::

~/Ibex/ibex-2.8.7$ sudo ./waf uninstall
~/Ibex/ibex-2.8.7$ ./waf distclean
~/Ibex/ibex-2.8.8$ sudo ./waf uninstall
~/Ibex/ibex-2.8.8$ ./waf distclean

**Note:** sudo is useless under MinGW or if Ibex is installed in a local folder.

Expand Down
Loading

0 comments on commit 0a247b2

Please sign in to comment.