After a few off-list e-mails...
Ok, I figured out what's going on here. This is not really a problem
with LAM but a problem with the autoconf-generated configure script in
the lamtests.
Some background: part of autoconf's rigamarole in figuring out f77
things is trying to figure out what libraries should be used to link
things. Unfortunately, it sometimes gets it wrong (happens with the
Portland compiles on Linux x86 as well). The test is actually fairly
useless because we only use it to figure out minor compilation details
-- we don't use the list of fortran libraries that are generated. But
it's part of the automatic stuff that Autoconf does, so we can't get
rid of it. :-\
Back on topic. So check out the output from the lamtests configure:
> checking for Fortran libraries of mpif77... -lcrt2.o -L/sw/lib
> -L/sw/lib/gcc/powerpc-apple-darwin7.4.0/3.4.1
> -L/sw/lib/gcc/powerpc-apple-darwin7.4.0/3.4.1/../../.. -llammpio
> -llamf77mpi -lmpi -llam -lfrtbegin -lg2c -lSystem
If you look in config.log, you can see that it's complaining about
duplicate symbols from crt2.o. So the solution here is to eliminate
-lcrt2.o from the list of libraries that autoconf figured out.
Fortunately, you can override the test by setting the FLIBS environment
variable before running configure. For example (I'm a csh kind of
guy):
-----
shell% setenv FLIBS "-L/sw/lib
-L/sw/lib/gcc/powerpc-apple-darwin7.4.0/3.4.1
-L/sw/lib/gcc/powerpc-apple-darwin7.4.0/3.4.1/../../.. -llammpio
-llamf77mpi -lmpi -llam -lfrtbegin -lg2c -lSystem"
-----
Pardon word wrap in e-mail -- that's one big line. Notice that I left
out the initial "-lcrt2.o".
If you do this, the lamtests configure will complete normally and you
should be able to compile and run the lamtests.
On Aug 11, 2004, at 12:35 PM, Jack Howarth wrote:
> Has anyone tried building lam 7.0.6 from fink unstable on
> MacOS X? I have noticed that the lamtests 7.0.6 fails its
> configure when built against such a lam 7.0.6 installation.
> I don't believe the lam 7.0.6 built is broken itself because
> I can build a shared lib version of gromacs-mpi against it.
> The resulting lam and gromacs-mpi runs fine.
> The exact error I see when running ./configure in
> lamtests-7.0.6 with a fink built lam-mpi 7.0.6-10 package
> installed is...
>
> checking how to get verbose linking output from mpif77... -v
> checking for Fortran libraries of mpif77... -lcrt2.o -L/sw/lib
> -L/sw/lib/gcc/powerpc-apple-darwin7.4.0/3.4.1
> -L/sw/lib/gcc/powerpc-apple-darwin7.4.0/3.4.1/../../.. -llammpio
> -llamf77mpi -lmpi -llam -lfrtbegin -lg2c -lSystem
> checking for dummy main to link with Fortran libraries... unknown
> configure: error: linking to Fortran libraries from C fails
> See `config.log' for more details.
>
> If you have a MacOS X 10.3.5 machine handy with fink 10.3 installed
> this can be easily reproduced by...
>
> cd /sw/fink/local/main/finkinfo
> cp /sw/fink/10.3/unstable/main/finkinfo/devel/lammpi.info .
> vi lammpi.info (and append '--enable-shared' to the ConfigureParams:
> field)
> fink index
> fink install lammpi
>
> Now after lammpi 7.0.6 is installed download the lamtests-7.0.6 tarball
> and try to run configure in its directory. You should see the above
> failure.
> If anyone has any ideas on a workaround I would be very interested
> as I would like to be able to verify that the lamtests testsuite really
> passes with this lammpi fink build. It seems to run gromacs-mpi well
> enough in any case.
> Jack
> ps The fink build environment uses a g77 3.4 package with Apple's gcc
> 3.3
> devtools.
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>
--
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/
|