Re: [AMBER] Problem installing AmverTools 1.5 on Mac

From: Jason Swails <jason.swails.gmail.com>
Date: Fri, 19 Aug 2011 19:05:59 -0400

On Fri, Aug 19, 2011 at 4:49 AM, Alexej Grjasnow <grjasnow.gmx.de> wrote:

> Hi,
> I use Mac OS X 10.6 and I tried to install AmberTools 1.5 . I installed
> gfortran as well as gcc but i keep having the same problem. The mixed
> C/Fortran compiler seems to be not working. I also tried to replace gcc with
> gcc-4 and g++ with g++-4. Does anybody know how to fix this ?
>

This is the solution if you use FINK to manage packages (and install
different GCC versions). I personally use MacPorts, and I've found that it
works great. (I use it to manage far more than just different compiler
versions).

If you use MacPorts, you don't need to change gcc with gcc-4, you just need
to make sure you install a working compiler with MacPorts (gcc43, gcc44,
gcc45, or gcc46; I would suggest one of the first 3. I use gcc44). Then you
need to select that version with port select:

1.) Install MacPorts (See http://www.macports.org/)
2.) Build gcc44: "sudo port install gcc44"
3.) Select gcc44: "sudo port select mp-gcc44"

That should give you a working gcc (Step 2 will take a long time, possibly
an hour or two).


>
>
>
> ./configure -macAccelerate gnu
> Obtaining the gnu suite version:
> gcc -v
> The version is 4.2.1
>

This is the version packaged with Xcode. The Xcode compilers don't come
with a Fortran compiler.


>
> Testing the gcc compiler:
> gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c
> OK
>
> Validating the C++ compiler version:
> g++ -v
> The version is 4.2.1
> OK
>

Same version as the gcc above (Xcode)


>
> Testing the gfortran compiler:
> gfortran -O0 -o testp testp.f
> OK
>

What version is this? (Find out via gfortran --version).


>
> Testing mixed C/Fortran compilation:
> gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c -o testp.c.o
> testp.c
> gfortran -O0 -c -o testp.f.o testp.f
> gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c.o
> testp.f.o -lgfortran -framework Accelerate
> ld: library not found for -lgfortran
>

This library was created after 4.2, I think. You'll have to install a newer
compiler (see my advice above).

HTH,
Jason

--
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Candidate
352-392-4032
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Aug 19 2011 - 16:30:02 PDT
Custom Search