public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* libm.a, libc.a
@ 2015-11-05 18:06 Sewell, Granville
  2015-11-05 18:23 ` Katherine Holcomb
  2015-11-05 19:24 ` Steve Kargl
  0 siblings, 2 replies; 3+ messages in thread
From: Sewell, Granville @ 2015-11-05 18:06 UTC (permalink / raw)
  To: fortran

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libm.a, libc.a
  2015-11-05 18:06 libm.a, libc.a Sewell, Granville
@ 2015-11-05 18:23 ` Katherine Holcomb
  2015-11-05 19:24 ` Steve Kargl
  1 sibling, 0 replies; 3+ messages in thread
From: Katherine Holcomb @ 2015-11-05 18:23 UTC (permalink / raw)
  To: Sewell, Granville, fortran

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: libm.a, libc.a
  2015-11-05 18:06 libm.a, libc.a Sewell, Granville
  2015-11-05 18:23 ` Katherine Holcomb
@ 2015-11-05 19:24 ` Steve Kargl
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Kargl @ 2015-11-05 19:24 UTC (permalink / raw)
  To: Sewell, Granville; +Cc: fortran

On Thu, Nov 05, 2015 at 06:06:10PM +0000, 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,
> 

FX already told you that this is not a gfortran issue.
You need to install libc.a and libm.a for your specific
operating system.  You need to contact someone involved
with SUSE linux.

-- 
steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-05 19:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-05 18:06 libm.a, libc.a Sewell, Granville
2015-11-05 18:23 ` Katherine Holcomb
2015-11-05 19:24 ` Steve Kargl

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).