[MITgcm-support] teething.. genmake2 with gfortran

Ed Hill ed at eh3.com
Fri Jun 30 00:06:23 EDT 2006


On Fri, 2006-06-30 at 15:47 +1200, jschwarz at awi-bremerhaven.de wrote:
> 
> Anyway, now it compiles, yay!  But it doesn't run. The error concerns a link 
> which is patently visible to me from an ls in the shell and to Konqueror, 
> and has rwx permissions, as does the file to which it links, and the full 
> path to them is in PATH - any ideas?  Here is the screen output (the piped 
> output is an empty file) and the details of the file that shouldn't exist:
> 
> tasman:/usr/MITgcm/verification/exp2/build # ./mitgcmuv > jillsoutput1.txt
> ./mitgcmuv: error while loading shared libraries: libgfortran.so.1: cannot 
> open shared object file: No such file or directory
> tasman:/usr/MITgcm/verification/exp2/build # ls -l /usr/irun/lib
> total 7220
> drwxr-xr-x 3 10168 10168    4096 Jun 26 16:05 gcc
> lrwxrwxrwx 1 10168 10168      13 Jun 29 16:52 libgcc_s.so -> libgcc_s.so.1
> -rw-r--r-- 1 10168 10168  235953 Jun 26 16:05 libgcc_s.so.1
> -rw-r--r-- 1 10168 10168 3034948 Jun 26 16:05 libgfortran.a
> -rwxr-xr-x 1 10168 10168     784 Jun 26 16:05 libgfortran.la
> lrwxrwxrwx 1 10168 10168      20 Jun 29 16:52 libgfortran.so -> libgfortran.so.1.0.0
> lrwxrwxrwx 1 10168 10168      20 Jun 29 16:52 libgfortran.so.1 -> libgfortran.so.1.0.0
> -rwxr-xr-x 1 10168 10168 1744608 Jun 26 16:05 libgfortran.so.1.0.0
> 
> tasman:/usr/MITgcm/verification/exp2/build # which libgfortran.so.1
> /usr/irun/lib/libgfortran.so.1
> 
> tasman:/usr/MITgcm/verification/exp2/build # echo $PATH
> /usr/irun/lib/:/usr/irun/bin/:/sbin:/usr/sbin:/usr/local/sbin:/opt/kde3/sbin:/opt/gnome/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin

Hi Jill,

The above error indicates that /usr/irun/lib is not a standard location
for libraries.  There are a number of ways you can fix or work around it
but the easiest is probably:

  # bash/sh:
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/irun/lib
  # tcsh/csh:
  setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/irun/lib


So, out of curiosity, which version of gfortran are you using?  If at
all possible, please avoid 4.0.x which is known to be quite buggy.  The
more recent versions (4.1.x and later) are actually pretty nice,
although only the very latest (versions *after* 4.1.1) are able to
easily handle the namelist syntax used by our diagnostics package.  So,
until 4.1.2 or 4.2.x is released, you might want to stick with g77 as
shipped with GCC 3.4.x when using MITgcm.

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464





More information about the MITgcm-support mailing list