This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error while loading shared libraries: libgfortran.so.0


On Mon, 07 Mar 2005 18:57:27 -0800, Tim Prince <tprince@computer.org> wrote:
> At 06:33 PM 3/7/2005, Kamaraju Kusumanchi wrote:
> 
> >I am trying to run an mpi program with mpich2. The program is a
> >helloworld2.f90 program (attached in the end) compiles fine but when
> >it is run, gives the following errors.
> >
> >
> >$mpiexec -n 2 ./a.out
> >../a.out: error while loading shared libraries: libgfortran.so.0:
> >cannot open shared object file: No such file or directory
> >../a.out: error while loading shared libraries: libgfortran.so.0:
> >cannot open shared object file: No such file or directory
> 
> It looks like you haven't engaged any of the methods provided by your OS to
> help you application find it.  

That is what I think am missing. I am not able to tell mpiexec where
to find libgfortran.so.0 file. But as you can see in my first email, I
am using Debian sid as my operating system. I just used the
gcc-snapshot package provided by this distribution. When I apt-get and
install it, the gfortran binary is placed in

/usr/lib/gcc-snapshot/bin/

and the libgfortran.so.0 is placed in 

/usr/lib/gcc-snapshot/lib/

I have already included the bin directory in the PATH variable and the
corresponding lib directory in LD_LIBRARY_PATH variable (see my first
post).

What additional actions do I need to perform so that linux knows where
the libgfortran.so.0 is located?

> For example, if you install gfortran
> somewhere other than under /usr, and you want to keep your library search
> path installation down to /lib:/usr/lib, you might put in a symlink between
> your libgfortran and the one which will be found.

I do not have root access on this machine. So I cannot put symlinks to
/lib or /usr/lib. Any other work arounds?

> If you build gcc/gfortran and take the default installation path (assuming
> you actually performed 'make install'), your libgfortran.so will land in
> /usr/local/lib/, but that may not be in your run-time search path.
> 

How do I set up the run-time library search path? Is there something
else other than LD_LIBRARY_PATH?

raju

-- 
friends don't  let friends use windows.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]