Re: [AMBER-Developers] Problems with AmberTools 15 and netcdf-fortran-4.2 compile

From: Timothy Giese <timothyjgiese.gmail.com>
Date: Tue, 20 Oct 2015 21:59:50 -0400

Try linking to libgfortran.so instead of libgfortran.a

On Tue, Oct 20, 2015 at 5:59 PM, Ross Walker <rosscwalker.gmail.com> wrote:

> Hi All,
>
> I am trying to get an AWS AMI of AMBER up and running. This involves using
> Amazon's hacked up version of Linux which is loosely based on Redhat but
> has then been 'tweaked' in tons of ways. Anyway, long story short
> AmberTools 15 configure is dying:
>
> ./configure gnu
> Checking for updates...
> Checking for available patches online. This may take a few seconds...
>
> Available AmberTools 15 patches:
>
> No patches available
>
> Available Amber 14 patches:
>
> No patches available
> Searching for python2... Found python2.7: /usr/bin/python2.7
>
> Obtaining the gnu compiler suite versions, e.g.:
> gcc -v
> The C version is 4.8.3
> The Fortran version is 4.8.3
>
> Testing the gcc compiler:
> gcc -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c
> OK
>
> Testing the g++ compiler:
> g++ -fPIC -o testp testp.cpp
> OK
>
> Testing the gfortran compiler:
> gfortran -fPIC -O0 -o testp testp.f
> OK
>
> Testing mixed C/Fortran compilation:
> gcc -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c -o testp.c.o
> testp.c
> gfortran -fPIC -O0 -c -o testp.f.o testp.f
> gcc -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp
> testp.c.o testp.f.o -lgfortran -w
> OK
>
> Testing pointer size:
> gcc -fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o
> test_pointer_size test_pointer_size.c
> Detected 64 bit operating system.
>
> Testing flex: OK
>
> Checking NetCDF...
> Using bundled NetCDF library.
> Starting NetCDF build.
> Configuring NetCDF C interface (may be time-consuming)...
> Compiling the NetCDF C interface (may be time-consuming)...
> Configuring NetCDF Fortran interface (may be time-consuming)...
> Compiling the NetCDF Fortran interface (may be time-consuming)...
> Error: NetCDF Fortran compile failed.
> Check
> /usr/local/amber14/AmberTools/src/netcdf-fortran-4.2/netcdf.fortran.compile.log
> for errors.
> Configure failed due to the errors above!
>
>
> tail netcdf.fortran.compile.log
>
> /bin/sh ../libtool --tag=FC --mode=link gfortran -fPIC -O3
> -mtune=native -version-number 5:3:1 -L/usr/local/amber14/lib -o
> libnetcdff.la -rpath /usr/local/amber14/lib fort-attio.lo fort-control.lo
> fort-dim.lo fort-genatt.lo fort-geninq.lo fort-genvar.lo fort-lib.lo
> fort-misc.lo fort-v2compat.lo fort-vario.lo fort-var1io.lo fort-varaio.lo
> fort-varmio.lo fort-varsio.lo ../f90/libnetcdff90.la -lnetcdf
> libtool: link: gfortran -shared .libs/fort-attio.o .libs/fort-control.o
> .libs/fort-dim.o .libs/fort-genatt.o .libs/fort-geninq.o
> .libs/fort-genvar.o .libs/fort-lib.o .libs/fort-misc.o
> .libs/fort-v2compat.o .libs/fort-vario.o .libs/fort-var1io.o
> .libs/fort-varaio.o .libs/fort-varmio.o .libs/fort-varsio.o
> -Wl,--whole-archive ../f90/.libs/libnetcdff90.a -Wl,--no-whole-archive
> -Wl,-rpath -Wl,/usr/local/amber14/lib -Wl,-rpath -Wl,/usr/local/amber14/lib
> -L/usr/local/amber14/lib /usr/local/amber14/lib/libnetcdf.so -lm
> -mtune=native -Wl,-soname -Wl,libnetcdff.so.5 -o .libs/libnetcdff.so.5.3.1
> /usr/bin/ld:
> /usr/lib/gcc/x86_64-amazon-linux/4.8.3/libgfortran.a(reshape_i4.o):
> relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making
> a shared object; recompile with -fPIC
> /usr/lib/gcc/x86_64-amazon-linux/4.8.3/libgfortran.a: could not read
> symbols: Bad value
> collect2: error: ld returned 1 exit status
> make[2]: *** [libnetcdff.la] Error 1
> make[2]: Leaving directory
> `/usr/local/amber14/AmberTools/src/netcdf-fortran-4.2/fortran'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory
> `/usr/local/amber14/AmberTools/src/netcdf-fortran-4.2/fortran'
> make: *** [install-recursive] Error 1
>
>
> Which would be all well and good except that everything is already being
> built with -fPIC.
>
> Anybody else come across this problem / know a simple way to fix it?
>
> All the best
> Ross
>
> /\
> \/
> |\oss Walker
>
> ---------------------------------------------------------
> | Associate Research Professor |
> | San Diego Supercomputer Center |
> | Adjunct Associate Professor |
> | Dept. of Chemistry and Biochemistry |
> | University of California San Diego |
> | NVIDIA Fellow |
> | http://www.rosswalker.co.uk | http://www.wmd-lab.org |
> | Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk |
> ---------------------------------------------------------
>
> Note: Electronic Mail is not secure, has no guarantee of delivery, may not
> be read every day, and should not be used for urgent or sensitive issues.
>
>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers
>
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Tue Oct 20 2015 - 19:00:03 PDT
Custom Search