Re: [AMBER-Developers] Amber on Mac (Snow Leopard)

From: Tom Joseph <ttjoseph.gmail.com>
Date: Wed, 16 Sep 2009 21:53:22 -0400

2009/9/16 Jason Swails <jason.swails.gmail.com>:
> tools?  A very annoying feature built into snow leopard I've found is the
> insistence that it is still a 32-bit kernel (uname -m returns i386), but it
> appears to try and build, or it comes included with, 64-bit libraries and
> binaries.  It seems as though whenever I try and install something that

Actually, the 32-bit kernel in Snow Leopard runs 64-bit binaries.
Indeed most of the binaries Apple provides are 64-bit.

I just now built AMBER CVS serial on Snow Leopard for x86_64. I used
the gfortran 4.2.3 binaries from http://r.research.att.com/tools/ and
Apple's gcc. It passes the testsuite except for 1) a few minor
precision deviations and 2) dhfr.lmodxmin, in which I guess it finds a
different minimum for some reason.

For it to compile, I had to make some changes so that the -m64 flag is
propagated to all the invocations of the Fortran compiler via FFLAGS
and LDFLAGS. This avoids the mismatched object types problem. (At
present, when the Fortran compiler is used as a linker, LDFLAGS is not
always used, and the makedepend scripts discard FFLAGS in favor of
FOPTFLAGS.)

I also used "-undefined dynamic_lookup" in LDFLAGS because otherwise
the linker complains, and added "-framework Accelerate" because I
think that includes LAPACK.

My changes are attached as a diff. Note that $x86_64 is hardcoded to
"yes", and the Apple-specific linker flags are included by default,
because I don't have a good method for the configure script to check
whether it's running on a 32/64-bit hybrid OSX system. I guess it
could check whether to use -m64 on Darwin by checking if the output of
something like "echo 'main(){}' > foo.c; $CC foo.c; file a.out"
reports "x86_64" but there's got to be a better way...

--Tom


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers

Received on Wed Sep 16 2009 - 19:00:02 PDT
Custom Search