LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2004-08-12 05:52:02


On Aug 11, 2004, at 10:39 AM, Jack Howarth wrote:

> I have noticed in building the lam-mpi 7.0.6 package using
> fink unstable 10.3 on MacOS X 10.3.5 with Xcode 1.5's devtools
> that the standard configure seems to produce a mixed set of
> libraries. Some are shared and some are static which prevents
> them from being used to link a shared lib version of gromacs-mpi
> on MacOS X fink.

That's odd -- they should not be *mixed*. The only libraries that are
built from 7.0.x are liblam and libmpi. They should both be static, or
both be both static and shared (nice grammar, eh?).

I have noticed that some 3rd party packages try to explicitly link to
all the LAM libraries (e.g., -lmpi -llam). I never understand why they
do this instead of using "mpicc" (and friends). The fact is that LAM
revamped the set of -L's and -l's in the 7.0.x series -- in the 6.5
series, there were about 5 libraries. In 7.0.x, there's just the two
(liblam and libmpi).

So -- I'm guessing here, but it could well be that gromacs is trying to
explicitly link to some of the old 6.5 libraries which we're not
building anymore, and the "mixed" stuff you're seeing is a result of an
older 6.5 build...?

> Is there any reason why this mixed set of
> shared and static libs are being produced by a simple ./configure
> on lam 7.0.6?

Yes, there actually is a deep, dark reason for this.

We do some funny linker tricks to build the lamd; on OS X we *have* to
build static libraries so that dynlib will resolve things properly.
It's a long gruesome story, and we're not proud of it. ;-)

In fact, if you try to build --enable-shared --disable-static, you'll
find that you'll get an error message from configure and it will abort.

> I have resolved it locally by appending --enable-shared to
> the ./configure options. When the build is done that way the
> resulting libraries produced include both the shared and static
> versions. Such a build allows a shared lib version of gromacs-mpi
> to link properly. Thanks in advance for any information on this.

Well, that pretty much shoots my hypothesis from above. :-)

Can you list exactly what you mean by "mixed" -- which libraries turn
up in what mode?

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/