From: baf on
Having exhausted all leads via google and the gfortran wiki, does anyone
here have any clue what environment variable setting might fix the
following loader error when compiling a Fortran program with the latest
version of gfortran available at the gfortran wiki.

/usr/bin/ld: can't locate file for: -lSystemStubs

the compile line was: gfortran atest.f90

Thanks for any ideas
From: Dr Ivan D. Reid on
On Tue, 05 Dec 2006 06:06:42 GMT, baf <baf(a)nowhere.com>
wrote in <S%7dh.2528$Ga1.156(a)newssvr12.news.prodigy.net>:
> Having exhausted all leads via google and the gfortran wiki, does anyone
> here have any clue what environment variable setting might fix the
> following loader error when compiling a Fortran program with the latest
> version of gfortran available at the gfortran wiki.

> /usr/bin/ld: can't locate file for: -lSystemStubs

> the compile line was: gfortran atest.f90

> Thanks for any ideas

You probably need to include a link-library directory, possibly
with a -L flag, or possibly with a LD_LIBRARY_PATH environment variable.

I found these in an example at http://jlinx.de/blog/?p=52, though
this seems like the syntax for cmake:

LINK_LIBRARIES ( gfortranbegin gfortran SystemStubs System)
LINK_DIRECTORIES(/usr/local/lib/gcc/powerpc-apple-darwin8.4.0/4.1.0 \
/usr/local/lib/gcc/powerpc-apple-darwin8.4.0/4.1.0/../../..)

(Note I've wrapped the last line with a \ character).

Also see/follow the thread

http://lists.apple.com/archives/xcode-users/2005/Aug/msg00386.html

--
Ivan Reid, Electronic & Computer Engineering, ___ CMS Collaboration,
Brunel University. Ivan.Reid@[brunel.ac.uk|cern.ch] Room 40-1-B12, CERN
KotPT -- "for stupidity above and beyond the call of duty".
From: Tobias Burnus on
Hi,

baf wrote:
> /usr/bin/ld: can't locate file for: -lSystemStubs
> the compile line was: gfortran atest.f90

You have told neither the version number of gfortran nor whether the
version was supplied by the vendor or whether you used another version.

If you didn't use a version provided by the vendor of the operating
system (i.e. Apple in this case), you need make sure that the libraries
of the compilers can be found.

For example: If you unpacked gfortran into
/opt/gcc-trunk/
then you should set the environment variable
export LD_LIBRARY_PATH=/opt/gcc-trunk/lib

Compare bottom of http://gcc.gnu.org/wiki/GFortranBinaries64Linux

Tobias

From: FX on
> /usr/bin/ld: can't locate file for: -lSystemStubs

You didn't even tell us what OS you use! (but we can guess it's MacOS)
Now, would you please report back the OS version you run?

--
FX
From: Richard Maine on
FX <coudert(a)alussinan.org> wrote:

> > /usr/bin/ld: can't locate file for: -lSystemStubs
>
> You didn't even tell us what OS you use! (but we can guess it's MacOS)
> Now, would you please report back the OS version you run?

Yes. It has been a longish time, but I recall once getting that error
and concluding that it probably came from a version mismatch between
what the binary of gfortran was built on and what I was running. I'm not
at all sure of that, but I think that was my tentative conclusion at the
time.

--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain