From: Katherine Holcomb <kah3f@eservices.virginia.edu>
To: "Sewell, Granville" <sewell@utep.edu>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: libm.a, libc.a
Date: Thu, 05 Nov 2015 18:23:00 -0000 [thread overview]
Message-ID: <563B9E9F.4070004@eservices.virginia.edu> (raw)
In-Reply-To: <2477FD50BABED145A42B81A4A33D0B8C3AF79743@ITDSRVMAIL011.utep.edu>
You really should post questions like this to comp.lang.fortran since
this is a list for developers of the compiler and is not a general user
support list. There may be SUSE users in the more general Google group,
and this question isn't related to gfortran, but to the packaging system
of a particular distribution of the operating system. I personally do
not know anything about SUSE but on Fedora the additional rpm required
is glibc-static (the particular static libraries you need are C
libraries, not Fortran libraries).
Static binaries are pretty common for Windows but in the Linux community
it's more typical to share source than binaries, which is probably why
glibc-static or equivalent isn't installed by default. Ultimately it
comes down to the choices made by the distributor of the OS.
On 11/05/2015 01:06 PM, Sewell, Granville wrote:
> I'm trying to compile a program using GFortran (on SUSE Linux) so that it will run on systems that do not have GFortran installed, when I try
> gfortran -static program.f
>
> I get that ld can't find -lm and -lc, apparently I need libc.a and libm.a (I have only the dynamic libraries libc.so and libm.so). I was told that the usual distributions of GFortran do not includes these static libraries. So
> 1) where can I find them (I tried Googling several things, can't actually find downloadable libraries)
> 2) is there another way to compile using gfortran to produce an execuable that will run anywhere? Seems like this would be a common need, why would that not be possible using usual distributions of GFortran. I had no trouble with the old g77 -static, apparently that did include libm.a and libc.a
>
> Thanks,
>
> Granville Sewell
--
Katherine Holcomb
ARCS kholcomb@virginia.edu
112 Albert Small Building (434) 982-5948
University of Virginia Charlottesville, VA 22904
next prev parent reply other threads:[~2015-11-05 18:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 18:06 Sewell, Granville
2015-11-05 18:23 ` Katherine Holcomb [this message]
2015-11-05 19:24 ` Steve Kargl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563B9E9F.4070004@eservices.virginia.edu \
--to=kah3f@eservices.virginia.edu \
--cc=fortran@gcc.gnu.org \
--cc=kholcomb@virginia.edu \
--cc=sewell@utep.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).