Boost logo

Boost-Build :

From: Philipp Frauenfelder (pfrauenf_at_[hidden])
Date: 2004-07-06 07:41:25


Dear Volodya

On Tue, Jul 06, 2004 at 03:22:04PM +0400, Vladimir Prus wrote:
> > I am using the stuff ripped from boost_1_31_0.tar.gz, the v2 stuff.
>
> Yes, this explains things.

OK, I have been able to check out Boost from CVS. The problem
simply went away when I tried again. I am using the .jam files
from CVS and also bjam is compiled from CVS.

> There's also mirror at boost-consulting.com:
>
> cvs -d:pserver:anonymous_at_[hidden]:/boost co boost

Thanks, I will use this one when sf.net is having problems
again.

> > I am not scared at all. Your 'new' solution even looks elegant to me.
> > However, my version of Boost.Build v2 does not recognise the <source>.
> > Is this only in CVS?
>
> 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 {
lib pardiso : : <name>pardiso32 <search>/scratch/pfrauenf/pardiso_example :
: <include>/scratch/pfrauenf/pardiso_example <define>HAS_PARDISO ;
} else {
alias pardiso ;
}
----8<----8<----8<----8<----8<----8<----8<----

The first problem: Somehow, the else clause of the if statement
is never evaluated. This is true for both variants of
feature.set-default 'yes' and 'no'---there is no difference.

In the Jamfile of a project directory, I have
----8<----8<----8<----8<----8<----8<----8<----
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).

It would be nice if you could again give some hints. The
previous ones were very helpful!

Thanks

-- 
Philipp | work: pfrauenf_at_[hidden] +41 44 632 60 38
Frauenfelder | home: pfrauenf_at_[hidden] +41 44 862 73 14
[PGP] | http://www.math.ethz.ch/~pfrauenf/
Proudly running Debian GNU/Linux. See http://www.debian.org/
 

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