wiki:pm-switch

Version 1 (modified by tkr, 9 years ago) (diff)

--

Brief Tutorial on Switching to the New Buildtools

This tutorial attempts to explain how to make the switch to the new stable version of the build tools. It is necessarily incomplete and

What Needs to be Edited

For the purposes of illustration, we shall assume that the project to be switched is Xxx. The project has been checked out with externals in the directory Root/ with project source code residing in the directory Root/Xxx. To make the switch, the following files need to be edited:

  • Root/configure.ac
  • Root/Xxx/configure.ac
  • Root/Xxx/Makefile.am
  • Root/Xxx/src/Makefile.am
  • Root/Externals

and the following files need to be created:

  • Root/Xxx/xxx.pc.in
  • Root/Xxx/xxx-uninstalled.pc.in
  • Root/Dependencies

There may also be changes needed in any examples that use installed versions of the COIN libraries, but these are a little less standardized, so it's difficult to say exactly what files would be affected.

Externals

At the moment, one must use only "trunk" versions for externals, since only the trunk version are using the new build tools. Here is the current set of externals for CoinAll:

BuildTools        https://projects.coin-or.org/svn/BuildTools/trunk
ThirdParty/ASL    https://projects.coin-or.org/svn/BuildTools/ThirdParty/ASL/trunk
ThirdParty/Blas   https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/trunk
ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/trunk
ThirdParty/Glpk   https://projects.coin-or.org/svn/BuildTools/ThirdParty/Glpk/trunk
ThirdParty/FilterSQP https://projects.coin-or.org/svn/BuildTools/ThirdParty/FilterSQP/trunk
ThirdParty/HSL    https://projects.coin-or.org/svn/BuildTools/ThirdParty/HSL/trunk
ThirdParty/Mumps  https://projects.coin-or.org/svn/BuildTools/ThirdParty/Mumps/trunk
ThirdParty/Metis  https://projects.coin-or.org/svn/BuildTools/ThirdParty/Metis/trunk
Data/Sample       https://projects.coin-or.org/svn/Data/trunk/Sample
CoinUtils         https://projects.coin-or.org/svn/CoinUtils/trunk/CoinUtils
Osi               https://projects.coin-or.org/svn/Osi/trunk/Osi
Clp               https://projects.coin-or.org/svn/Clp/trunk/Clp
DyLP              https://projects.coin-or.org/svn/DyLP/trunk/DyLP
Vol               https://projects.coin-or.org/svn/Vol/trunk/Vol
Cgl               https://projects.coin-or.org/svn/Cgl/trunk/Cgl
SYMPHONY          https://projects.coin-or.org/svn/SYMPHONY/trunk/SYMPHONY
Cbc               https://projects.coin-or.org/svn/Cbc/trunk/Cbc
Ipopt             https://projects.coin-or.org/svn/Ipopt/trunk/Ipopt
Alps              https://projects.coin-or.org/svn/CHiPPS/Alps/trunk/Alps
Dip               https://projects.coin-or.org/svn/Dip/trunk/Dip

Another change with the new setup is that it is now highly recommended to use release versions in your externals. To make this easy, there is a script called set_externals that is part of the build tools that will automatically set your externals. To use it, you maintain a "dependencies" file (usually called Root/Dependencies) as opposed to an "externals" file. The dependencies files will usually contain the stable versions on which a project depends in the same format as the current Externals file. When you run the command set_externals Dependencies, the dependencies files will be parsed and externals set to latest release versions automatically. Note that if your dependencies files contains trunk or specific release versions, these will be used instead, overriding the mechanism for using the latest release version. For example, here is the current Dependencies file for the trunk of Blis, which depends on the trunks of Alps and BiCePS.

BuildTools    https://projects.coin-or.org/svn/BuildTools/stable/0.5
ThirdParty/Blas https://projects.coin-or.org/svn/BuildTools/ThirdParty/Blas/stable/1.0
ThirdParty/Lapack https://projects.coin-or.org/svn/BuildTools/ThirdParty/Lapack/stable/1.0
CoinUtils     https://projects.coin-or.org/svn/CoinUtils/stable/2.6/CoinUtils
Clp           https://projects.coin-or.org/svn/Clp/stable/1.11/Clp
Osi           https://projects.coin-or.org/svn/Osi/stable/0.102/Osi
Cgl           https://projects.coin-or.org/svn/Cgl/stable/0.55/Cgl
Alps          https://projects.coin-or.org/svn/CHiPPS/Alps/trunk/Alps
Bcps          https://projects.coin-or.org/svn/CHiPPS/Bcps/trunk/Bcps
Data/Sample   https://projects.coin-or.org/svn/Data/stable/1.0/Sample

Root/configure.ac