[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q: How do I make an executable independent of libraries?

From: Andreas Jaeger
Subject: Re: Q: How do I make an executable independent of libraries?
Date: 23 May 2001 19:13:55 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.1 (Channel Islands)

Peter Sherwood <address@hidden> writes:

> Using Red Hat Linux 7 and gcc to compile/link C sources, I created an
> executable for my program BPlot. This executable worked fine on my system,
> but when I sent a copy of the executable to someone to try on a Red Hat
> Linux 6.2 system, when he started the program with
>     ./BPlot B.dat
> ./BPlot: /lib/libc.so.6: version `GLIBC_2.2' not found (required by ./BPlot)

Glibc only gives upwards compatibilty, programs compiled on an older
system will work on a newer one - the other way round does not work.

> This seems to indicate there is some component of glibc necessary for the
> executable to run. How can I create an executable which is independent of
> the system (i e, is portable), including all the library components it
> needs within the executable itself.

That's not easily possible, you might want to read about LDPS (see

 Andreas Jaeger
  SuSE Labs address@hidden
   private address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]