[Coin-discuss] Finding libs at run time and Cbc/Dylp

Francois Margot fmargot at andrew.cmu.edu
Wed Mar 29 09:24:59 EST 2006



Lou:

Thank you for the explanation, but there is still something mysterious
to me. Forget about the BAC build and just focus on building Cgl by typing
'make' in COIN/Cgl.

First, add junk in the "else" statement of the ifeq at the bottom of
Makefile.Linux and comment out LibType ?= SHARED at the top.

Type 'make' in COIN/Cgl. You get an error. This means that one command
of the build process is using Makefile.Linux with LibType not set to SHARED.
Which one? I don't know and 'make -n' does not help here.

The build installs Osi, which installs Coin and the solvers. As far as
I can tell, all these modules have LibType := SHARED defined.

What bothers me with the fix

LibType ?= SHARED

in Makefile.Linux is what happens if I want to build everything
static. If LibType := STATIC is missing somewhere, then I will 
process Makefile.Linux at least once with LibType set to SHARED.
Could not that be a problem?

Francois



On Tue, 28 Mar 2006, Lou Hafer wrote:

>
> 	In response to my previous attempt to explain a makefile problem,
> Francois writes (paraphrased)
>
>  ``That explanation doesn't hold water.''
>
> 	Huh.  So much for the easy explanation.  So I pulled down Examples/BAC
> and Bcp and tried the build.  I think I can do a better job of explaining the
> failure mode.
>
> In Examples/BAC/Makefile, you have the lines
>
> default: bc
>
> bc : libdepend
>        ${MAKE} -f Makefile.bc bcps
>
> libdepend:
>        (cd $(CoinDir)/Osi/OsiClp && ${MAKE} install)
>        (cd $(CoinDir)/Cgl && ${MAKE} install)
>
> The result of typing `make' is that control goes from default to bc to
> libdepend.  The first line at libdepend heads off to build OsiClp.  At the top
> of OsiClp/Makefile there's a line that sets LibType.  All of Clp, Vol, and Osi
> are build as dependent builds to OsiClp, hence they see the value of LibType
> established in OsiClp.  That value is lost when control returns here.  When the
> second line attempts to build Cgl, it fails, because Cgl/Makefile does not
> define LibType --- that won't happen until Makefile.Cgl.
>
> 	This is the immediate cause of failure.
>
> 	Francois, as you point out, there's no structural difference between,
> say, Clp/Makefile and Cgl/Makefile, or Clp/Makefile.Clp and Cgl/Makefile.Cgl.
> It's just the way they are called in this build.
>
> 	Laci's fix to Makefile.Linux, which gives a default value to LibType,
> neatly solves the problem.
>
> 	We should probably be asking some global questions, though. The current
> usage of Makefile.coin and Makefile.location needs to be looked at with a
> critical eye.
>
> 						Lou
>
>
>



More information about the Coin-discuss mailing list