[AMBER] How to modify config.h if I cannot get g77 running? Pls kindly help.

From: Catein Catherine <askamber23.hotmail.com>
Date: Tue, 8 Jun 2010 15:35:20 +0800

Dear Sir/madam,

I have type the followings lines in ubuntu 9.1.

> sudo apt-get install bison csh flex gfortran g++ xorg-dev

> sudo apt-get install build-essential byacc

> g++ -v, it is what I got.

======================================================================================================
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)
=======================================================================================================
 
Then I type ./configure_at gcc to create the config.h file, here is the error message that I saw for g77 compiler and the config.h file created. I found g77 is not working (see error message below), but I think we can use gfortran instead to install ambertools 1.2 and amber10. Do I need to modifiy the config.h file below? Could you mind to teach me how? I also found I don't have the X11R6 folder in the location indicated in config.h. Where should I find the X11R6? Should I modify the path instead to get it run?

========================================================================================================
./configure_at gcc
Setting AMBERHOME to /home/annie/Amber10/amber10
 

Testing the C compiler:
      gcc -m32 -o testp testp.c
OK

Obtaining the C++ compiler version:
      g++ -v
The version is ../src/configure
4.4.1
[: 520: -lt: unexpected operator
OK

Testing the g77 compiler:
     g77 -O2 -fno-automatic -finit-local-zero -o testp testp.f
./configure_at: 538: g77: not found
./configure_at: 539: ./testp: not found
Unable to compile a Fortran program using g77 -O2 -fno-automatic -finit-local-zero

Testing the gfortran compiler:
     gfortran -O1 -fno-automatic -o testp testp.f
OK

Testing flex:
OK

Configuring netcdf; (may be time-consuming)

NETCDF configure succeeded.
 
The configuration file, config.h, was successfully created.
 
The next step is to type 'make -f Makefile_at'

========================================================================================================

# AmberTools configuration file, created with: ./configure_at gcc

###############################################################################

# (1) Location of the installation

BINDIR=/home/annie/Amber10/amber10/bin
LIBDIR=/home/annie/Amber10/amber10/lib
INCDIR=/home/annie/Amber10/amber10/include
DATDIR=/home/annie/Amber10/amber10/dat
NABHOME=/home/annie/Amber10/amber10/dat

###############################################################################


# (2) If you want to search additional libraries by default, add them
# to the FLIBS variable here. (External libraries can also be linked into
# NAB programs simply by including them on the command line; libraries
# included in FLIBS are always searched.)

FLIBS= $(LIBDIR)/libsym.a $(LIBDIR)/arpack.a $(LIBDIR)/lapack.a $(LIBDIR)/blas.a $(LIBDIR)/f2c.a

###############################################################################

# (3) Modify any of the following if you need to change, e.g. to use gcc
# rather than cc, etc.

SHELL=/bin/sh

# Set the C compiler, etc.

# For GNU: CC-->gcc; LEX-->flex; YACC-->bison -y -t;
# Note: If your lexer is "really" flex, you need to set
# LEX=flex below. For example, on many linux distributions,
# /usr/bin/lex is really just a pointer to /usr/bin/flex,
# so LEX=flex is necessary. In general, gcc seems to need
# flex.

CC=gcc
CXX=g++
CPLUSPLUS=g++
CFLAGS= -m32 -DBINTRAJ $(AMBERBUILDFLAGS)
OCFLAGS=-O3 -m32 -DBINTRAJ $(AMBERBUILDFLAGS)
NABFLAGS=
LDFLAGS=

LEX= flex
YACC= $(BINDIR)/yacc
AR= ar rv
M4= m4
RANLIB=ranlib

# Set the C-preprocessor. Code for a small preprocessor is in
# uccp-1.3; it gets installed as $(BINDIR)/ucpp;
# this can generally be used (maybe not on 64-bit machines like altix).

CPP= $(BINDIR)/ucpp -l

# These variables control whether we will use compiled versions of BLAS
# and LAPACK (which are generally slower), or whether those libraries are
# already available (presumably in an optimized form).

LAPACK=install
BLAS=install
F2C=install

# These variables determine whether builtin versions of certain components
# can be used, or whether we need to compile our own versions.

UCPP=install
C9XCOMPLEX=skip

# For Windows/cygwin, set SFX to ".exe"; for Unix/Linux leave it empty:

SFX=

# Information about Fortran compilation:

FC= gfortran
FFLAGS= -O1 -fno-automatic $(LOCALFLAGS) $(AMBERBUILDFLAGS)
FREEFORMAT_FLAG= -ffree-form
LM=-lm

BUILD_SLEAP=install_sleap
XHOME= /usr/X11R6
XLIBS= -L/usr/X11R6/lib
MAKE_XLEAP=install_xleap

NETCDF=netcdf.mod
NETCDFLIB=../netcdf/lib/libnetcdf.a
G77=hasG77

# default rules for Fortran and C compilation:

.f.o:
        $(FC) -c $(FFLAGS) -o $. $<

.c.o:
        $(CC) -c $(CFLAGS) -o $. $<

~
~
===============================================================================================================

                                               
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
https://signup.live.com/signup.aspx?id=60969
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Jun 08 2010 - 01:00:03 PDT
Custom Search