[Coin-discuss] Building all the OSI interfaces

Dean Kassmann deankassmann at gmail.com
Thu May 10 13:00:05 EDT 2007


Well, the first method works when you're compiling things on your own
box and have complete control of things.  However, in production build
systems such as the one I'm using  downstream dependencies generally
don't make their entire source tree available. It breaks component
encapsulation - just their external headers and libraries are
available to all consumers of the library/component.

While the first method works, it's not really an option. The second
method doesn't seem to work and I'm not sure I have the patience to do
autoconf hacking. I did spend a fair amount of time digging through
all the configure.ac files as well as the BuildTools coin.m4 file to
see if I could make some simple modifications.

This affects compiling things like Cbc as well. The Cbc tarball has
the kitchen sink in it.

What I'm looking for is a clean way for an external system to manage
component dependencies and not have that baked into all the autoconf /
Externals / packaging of the COIN software.

Dean

On 5/9/07, Lou Hafer <lou at cs.sfu.ca> wrote:
> Dean,
>
>         Unfortunately, relocating the standard projects is on the `todo' list
> for the BuildTools group.  Assuming you're on some version of unix, you have
> several options.  I'll use my own setup as an example; adjust to suit your
> setup.
>
>         I do VPATH builds, so I have source for Osi in /Pfx/Coin-Osi and SuSE
> binaries in /Pfx/Coin-Osi-SuSE.  (/Pfx is actually /cs/mitacs4; you get the
> picture.)  Similarly, Cbc lives in /Pfx/Coin-Cbc, binaries in
> /Pfx/Coin-Cbc-SuSE.  To get OsiCbc to build properly, you'll need to do the
> following:
>
>   * In Coin-Osi,
>
>     ln -s /Pfx/Coin-Cbc/Cbc Cbc
>     ln -s /Pfx/Coin-Cbc/Cgl Cgl
>
>   * In Coin-Osi-SuSE,
>
>     ln -s /Pfx/Coin-Cbc-SuSE/Cbc Cbc
>     ln -s /Pfx/Coin-Cbc-SuSE/Cgl Cgl
>
> This will allow the Osi configuration and build to find source and binaries in
> the places it expects to find them.
>
>         More generally, when Osi configuration is looking for COIN projects,
> it's executing in the Osi subdirectory, and it's looking for COIN projects in
> the immediate parent (`..') directory.
>
>         If you have the ability to alter configure.ac files and regenerate the
> configure script, try this:
>
>   * In Osi/configure.ac, change the line
>
>     AC_COIN_HAS_PROJECT(Cbc)
>
>     to read
>
>     AC_COIN_HAS_USER_LIBRARY([Cbc],[CBC])
>
> Then use --with-cbc-incdir, --with-cbc-lib, and --disable-cbc-libcheck in your
> command line options for configure (give the appropriate values for incdir and
> lib).  The easy way to run the autotools is with the script
> BuildTools/run_autotools.  But it'll complain and abort if you don't have the
> correct versions. It's certainly possible to run them by hand; we're fussy about
> versions but you don't have to be. (It's a problem when committing back to the
> repository; should be ok otherwise.)
>
> I tested the first workaround, but didn't test this second one. If you try it
> and it blows up, email me and I'll give it a bit more attention.
>
>                                                 Lou
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>



More information about the Coin-discuss mailing list