LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: Brian Barrett (brbarret_at_[hidden])
Date: 2003-08-19 00:58:10


On Thursday, August 14, 2003, at 01:14 PM, jeremy archuleta wrote:

> I am trying to compile and run an MPI fortran code and I get the
> following
> error:
>
> ld: warning dynamic shared library: /usr/local/lib/liblam.dylib not
> made a
> weak library in output with MACOSX_DEPLOYMENT_TARGET environment
> variable
> set to: 10.1

There isn't much you can do about this error - it's a bug in the
December 2002 Developer Tools:
http://developer.apple.com/qa/qa2001/qa1233.html

I'm 99.9% sure that liblam ending up weak is ok, and it seems to work
just fine for C/C++ (where this error pops up during link, but doesn't
cause issues). Of course, setting MACOSX_DEPLOYMENT_TARGET to 10.2
caused something funny to happen to the g77 compiler provided by
khanna, so who knows...

> an executable is created anyway, and when running I get:
>
> /usr/local/lib/libmpi.0.dylib(mpietc.o) definition of _lam_pt2coll
> /usr/local/lib/liblam.0.dylib(mpietc.o) definition of _lam_pt2coll
> Trace trap

This one is obviously a problem. LAM does some things that work
perfectly fine with most shared linkers but seem to annoy OS X's
linker. One of them being multiply defined symbols. For the most
part, liblam doesn't use anything in mpietc.c, so we didn't catch this
one in testing (up until you reported this bug, I happily was running
without a Fortran compiler...). Basically, the F77 bindings are
sucking in something that causes liblam's version of mpietc.o to be
pulled in and we end up with duplicate symbol badness.

So, the bad news - if you want to use LAM and Fortran on Mac OS X, you
have to use static libraries. The good news is that I think this is
fairly easy to fix and plan on doing so Real Soon Now :).

Brian

-- 
   Brian Barrett
   LAM/MPI developer and all around nice guy
   Have a LAM/MPI day: http://www.lam-mpi.org/