Re: [AMBER-Developers] AT 1.3 config fails for alternate gnu location

From: Jason Swails <jason.swails.gmail.com>
Date: Tue, 24 Nov 2009 21:08:01 -0500

Try adding /usr/local/gcc/x86_64-unknown-linux-gnu/ to your LD_LIBRARY_PATH
so that the gcc libraries are added as well, not just the gfortran ones.

Good luck,
Jason

On Tue, Nov 24, 2009 at 7:31 PM, Lachele Foley <lfoley.ccrc.uga.edu> wrote:

> Need the old gcc because RHEL, and some other low-level programs, won't
> behave well if the gcc libraries don't match those used to compile the
> kernel.
>
> Can't use the gcc/gfortran that came with the kernel because programs like
> AMBER frequently employ bleeding edge compiler features. Even upgrading to
> the absolutely newest kernel typically doesn't get me a sufficiently recent
> gcc version.
>
> All very complex.
>
> Here's what gets set in my shell:
>
> [installer.shaw ~]$ echo $LD_LIBRARY_PATH
> /usr/local/lib
>
> ...which seems reasonable, but the gfortranbegin library isn't in that
> tree. I just tried these varieties:
>
> [installer.shaw ~]$ echo $LD_LIBRARY_PATH
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran:/usr/local/lib
> [installer.shaw src]$ echo $LD_LIBRARY_PATH
>
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/.libs:/usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran:/usr/local/lib
>
> And still, config can't find it.
>
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/libgfortranbegin.la
>
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/.libs/libgfortranbegin.a
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/.libs/
> libgfortranbegin.la
>
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/.libs/libgfortranbegin.lai
>
> Any notions?
>
> :-) Lachele
> --
> B. Lachele Foley, PhD '92,'02
> Assistant Research Scientist
> Complex Carbohydrate Research Center, UGA
> 706-542-0263
> lfoley.ccrc.uga.edu
>
>
> ----- Original Message -----
> From: Jason Swails
> [mailto:jason.swails.gmail.com]
> To: AMBER Developers Mailing List
> [mailto:amber-developers.ambermd.org]
> Sent: Tue, 24 Nov 2009 18:27:28
> -0500
> Subject: Re: [AMBER-Developers] AT 1.3 config fails for alternate gnu
> location
>
>
> > Your LD_LIBRARY_PATH variable also has to be set to correctly find your
> > library files, so you'll want to make sure that the order of GNU
> compilers
> > found in PATH is the same as the GNU compiler libraries found in
> > LD_LIBRARY_PATH. What's likely happening is it's trying to link the
> > compiler libraries from the /usr/bin installation to the /usr/local/bin
> > compilers. If this is a machine that you have root permissions for, you
> may
> > consider moving all of the /usr/bin/ compilers (which I'm assuming are
> older
> > versions?) to .bak files (i.e. sudo mv /usr/bin/gfortran
> > /usr/bin/gfortran.bak, etc.) and creating links in the /usr/bin that
> point
> > to the /usr/local/bin installations (but you have to do the same for the
> > libraries).
> >
> > However, is there any reason to have two sets of gnu compilers? It seems
> a
> > bit strange to me that ld couldn't find gfortranbegin since
> > libgfortranbegin.a is present in both gcc/lib directories. What does
> "echo
> > $LD_LIBRARY_PATH" return?
> >
> > Good luck!
> > Jason
> >
> > On Tue, Nov 24, 2009 at 4:28 PM, Lachele Foley <lfoley.ccrc.uga.edu>
> wrote:
> >
> > > I have an alternate gcc/gfortran installed on a system in
> /usr/local/bin
> > > (etc.). If I rearrange my PATH so that the system sees the original
> > install
> > > (in /usr/bin), AT configures and compiles (testing now). If I leave my
> > path
> > > so it finds the gcc/gfortran in /usr/local/bin first, the configure
> fails
> > > with complaints about gfortran and netcdf.
> > >
> > > If there's a way in the configure script to specify alternate library
> > > paths, I don't see it. I can alter the config.h file, of course, but
> not
> > if
> > > the configure script never makes one.
> > >
> > > On this system:
> > >
> > > Linux shaw.nuigalway.ie 2.6.18-128.1.10.el5xen #1 SMP Wed Apr 29
> 14:24:51
> > > EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
> > >
> > >
> > > ========================================================
> > > [installer.shaw src]$ ./configure gnu
> > > Setting AMBERHOME to /array2/programs/amber11_AT_20091124
> > >
> > >
> > > Obtaining the gnu suite version:
> > > gcc -v
> > > The version is 4.3.1
> > >
> > > Testing the gcc compiler:
> > > gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o testp testp.c
> > > OK
> > >
> > > Obtaining the C++ compiler version:
> > > g++ -v
> > > The version is 4.3.1
> > > OK
> > >
> > > Testing the gfortran compiler:
> > > gfortran -O0 -o testp testp.f
> > > /usr/bin/ld: cannot find -lgfortranbegin
> > > collect2: ld returned 1 exit status
> > > ./configure: line 744: ./testp: No such file or directory
> > > Unable to compile a Fortran program using gfortran -O0
> > > We will be unable to compile sqm
> > >
> > > Testing flex:
> > > OK
> > >
> > > Configuring NetCDF; (may be time-consuming)
> > >
> > > Error: NetCDF configure returned 1
> > > NetCDF configure failed! Check the netcdf_config.log file.
> > > ========================================================
> > >
> > >
> > >
> > > the netcdf log complains:
> > >
> > > checking if Fortran "byte" is C "signed char"... configure: error:
> Could
> > > not link conftestf.o
> > > and conftest.o
> > >
> > > [installer.shaw src]$ which gfortran
> > > /usr/local/bin/gfortran
> > > [installer.shaw src]$ which gcc
> > > /usr/local/bin/gcc
> > > [installer.shaw src]$ locate conftestf.o
> > > [installer.shaw src]$ locate conftest.o
> > > [installer.shaw src]$
> > >
> > > Regarding gfortran:
> > >
> > > [installer.shaw src]$ locate gfortranbegin
> > > /application_downloads/gcc-4.3.1/x86_64-unknown-linux-gnu/libgfortran/
> > > libgfortranbegin.la
> > >
> > >
> >
> /application_downloads/gcc-4.3.1/x86_64-unknown-linux-gnu/libgfortran/.libs/libgfortranbegin.a
> > >
> > >
> >
> /application_downloads/gcc-4.3.1/x86_64-unknown-linux-gnu/libgfortran/.libs/
> > > libgfortranbegin.la
> > >
> > >
> >
> /application_downloads/gcc-4.3.1/x86_64-unknown-linux-gnu/libgfortran/.libs/libgfortranbegin.lai
> > > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgfortranbegin.a
> > > /usr/lib/gcc/x86_64-redhat-linux/4.1.1/32/libgfortranbegin.a
> > > /usr/local/gcc/x86_64-unknown-linux-gnu/32/libgfortran/
> libgfortranbegin.la
> > >
> > >
> >
> /usr/local/gcc/x86_64-unknown-linux-gnu/32/libgfortran/.libs/libgfortranbegin.a
> > > /usr/local/gcc/x86_64-unknown-linux-gnu/32/libgfortran/.libs/
> > > libgfortranbegin.la
> > >
> > >
> >
> /usr/local/gcc/x86_64-unknown-linux-gnu/32/libgfortran/.libs/libgfortranbegin.lai
> > > /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/
> libgfortranbegin.la
> > >
> > >
> >
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/.libs/libgfortranbegin.a
> > > /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/.libs/
> > > libgfortranbegin.la
> > >
> > >
> >
> /usr/local/gcc/x86_64-unknown-linux-gnu/libgfortran/.libs/libgfortranbegin.lai
> > >
> > >
> > >
> > > :-) Lachele
> > > --
> > > B. Lachele Foley, PhD '92,'02
> > > Assistant Research Scientist
> > > Complex Carbohydrate Research Center, UGA
> > > 706-542-0263
> > > lfoley.ccrc.uga.edu
> > >
> > > _______________________________________________
> > > AMBER-Developers mailing list
> > > AMBER-Developers.ambermd.org
> > > http://lists.ambermd.org/mailman/listinfo/amber-developers
> > >
> >
> >
> >
> > --
> > ---------------------------------------
> > Jason M. Swails
> > Quantum Theory Project,
> > University of Florida
> > Ph.D. Graduate Student
> > 352-392-4032
> > _______________________________________________
> > 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
>



-- 
---------------------------------------
Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
352-392-4032
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Tue Nov 24 2009 - 18:30:02 PST
Custom Search