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

From: Jason Swails <jason.swails.gmail.com>
Date: Wed, 16 Sep 2009 18:57:20 -0400

Hello,

Has anyone had a chance to try and get AMBER compiled on a Mac running the
new Snow Leopard using the standard GNU compilers that come with xcode
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
links to some sort of library or other binary file, it complains of some
sort of architecture incompatibility. The messages I get from amber, almost
as soon as I try to compile ambertools (./configure gnu) is:

Jason-Swailss-MacBook-Air:src swails$ make -f Makefile_at serial
Starting installation of AmberTools, version 1.3 at Wed Sep 16 18:34:56 EDT
2009.
(cd ucpp-1.3 && make install )
gcc -c -m32 -DBINTRAJ -DSTAND_ALONE mem.c
gcc -c -m32 -DBINTRAJ -DSTAND_ALONE nhash.c
gcc -c -m32 -DBINTRAJ -DSTAND_ALONE cpp.c
gcc -c -m32 -DBINTRAJ -DSTAND_ALONE lexer.c
gcc -c -m32 -DBINTRAJ -DSTAND_ALONE assert.c
gcc -c -m32 -DBINTRAJ -DSTAND_ALONE macro.c
gcc -c -m32 -DBINTRAJ -DSTAND_ALONE eval.c
gcc -o ucpp mem.o nhash.o cpp.o lexer.o assert.o macro.o eval.o
ld: warning: in mem.o, file is not of required architecture
ld: warning: in nhash.o, file is not of required architecture
ld: warning: in cpp.o, file is not of required architecture
ld: warning: in lexer.o, file is not of required architecture
ld: warning: in assert.o, file is not of required architecture
ld: warning: in macro.o, file is not of required architecture
ld: warning: in eval.o, file is not of required architecture
Undefined symbols:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [ucpp] Error 1
make: *** [serial] Error 2

I had to add $(CFLAGS) to the compile command in the ucpp-1.3/Makefile
(since gcc -o ucpp... did not have a -m32 or any other flag) on line 35 I
believe (or maybe 45). I also had to add the $CFLAGS to the
clapack/Makefile line 47. I finally had a problem when the compilation
reached f2c:

(cd f2c && make install )
gcc -c -O3 -m32 -DBINTRAJ -o abort_.o abort_.c
In file included from abort_.c:2:
f2c.h:21: warning: unnamed struct/union that defines no instances
f2c.h:21: warning: data definition has no type or storage class
f2c.h:22: warning: unnamed struct/union that defines no instances
f2c.h:22: warning: data definition has no type or storage class
f2c.h:140: error: expected specifier-qualifier-list before ‘complex’
make[1]: *** [abort_.o] Error 1
make: *** [serial] Error 2

Does this look like a problem with the code or possibly the compiler?

I'm going to try and obtain a copy of the intel compilers for Mac, and see
if perhaps those fare better, but since those cost money I'll probably
dawdle in actually obtaining those.

I also don't know if these problems are unique to snow leopard since leopard
also returns i386 for uname -m. I no longer have a leopard running Mac, and
it was only an earlier version of amber11 that I installed on my computer
when it ran leopard. From various forums, though, I've heard a good deal of
grumbling about 32-bit vs. 64-bit compatibility issues with snow leopard.

Thanks,
Jason Swails

P.S. Compiling amber itself, not ambertools, worked just fine in serial on
my mac. And if it'll help, I'm running a macbook air, OS X 10.6.1 with the
xcode tools 3.2 (gcc, g++) and a downloaded gfortran.dmg binary, intel core
2 duo 1.8 GHz.
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Sep 16 2009 - 16:00:02 PDT
Custom Search