Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-07-06 08:43:58


Hi Philipp,

> > Yes. We used to have <library>, which could add source but worked only
> > worked for library targets. So <source> was introduced, which works
> > everywhere (and <library> is just a synonym for <source> now).
>
> Now, this tricks starts to work somehow. Also, the problem with
> the multiple libraries in the very simple case of a self built
> library went away.
>
> However, the external library (pardiso) is still linked twice.
> Let's see how far I got.
>
> My site-config.jam looks like
> ----8<----8<----8<----8<----8<----8<----8<----
> [ ... ]
> import feature ;
>
> feature.feature have-pardiso : yes no ;
> feature.set-default <have-pardiso> : no ;
>
> if <have-pardiso>yes {

I think you've a problem here. This "if" will compare the *string*
<have-pardiso>yes with empty string, and it always gives you true value.

You can either do:

if [ feature.defaults <have-pardiso> ] = <have-pardiso>yes {
}

or maybe just something like

if ! [ GLOB /path/to_pardiso : pardiso.a ]
{
feature.set-default <have-pardiso> : no ;
alias pardiso ;
}
else
{
}

In other word, it's necessary to somehow detect if the library is installed --
by asking user, searching for some file, and so on. And if you detected
library presence you can use that in "if". No need to first set
<have-pardiso> to "no" and then check the value.

> project concepts-2/operator
>
> : requirements <library>/concepts-2/sparseqr//libconceptssparseqr
>
> <library>/concepts-2/function//libconceptsfunction
> <have-pardiso>yes:<library>/site-config//pardiso
> <library>/site-config//lapack ;
>
> SOURCES = [ ... ]
>
> if <have-pardiso>yes {
> obj pardiso : pardiso.cc : : <use>/site-config//pardiso ;
> }
>
> lib libconceptsoperator : $(SOURCES) : <have-pardiso>yes:<source>pardiso ;
> ----8<----8<----8<----8<----8<----8<----8<----
>
> Pardiso and LAPACK are linked twice to the generated library
> libconceptsoperator.so. In the case of LAPACK this is harmless
> as no double symbols are reported. In the case of Pardiso,
> double symbols are reported (and the linking stops).

I'm sure I've added some code to prevent duplicate sources. Would you mind
sending me the complete Jamfiles and site-config.jam, so that I can reproduce
the problem?

- Volodya

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk