This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: error while loading shared libraries: libgfortran.so.0
- From: Kamaraju Kusumanchi <kamaraju at gmail dot com>
- To: gfortran <fortran at gcc dot gnu dot org>
- Cc: mpich2-maint at mcs dot anl dot gov
- Date: Mon, 7 Mar 2005 22:20:32 -0500
- Subject: Re: error while loading shared libraries: libgfortran.so.0
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=fYD08tx8/N5rqIDFCzDJoh5GQ8sSNXgYVaN1/IOYz0VTjheL/zb6v7WO6TYImBwtDUxeuixwKrZiAbscsUq9tCGSGjB/7cuqb6+9TCerJU/HFGoI6VAj3dFoJDJ1zJ4sraPi+spLMh5isrLLCL5WEWVugucHxLHGMmhIiieQMWQ=
- References: <ba4975150503071833450da968@mail.gmail.com> <6.1.2.0.0.20050307185050.01fe1ec0@imap.myrealbox.com>
- Reply-to: Kamaraju Kusumanchi <kamaraju at gmail dot com>
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.