bug-glibc
[Top][All Lists]
Advanced

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

Re: Make an executable independent of libraries? (repost w


From: Petr Vandrovec
Subject: Re: Make an executable independent of libraries? (repost w
Date: Thu, 24 May 2001 18:44:30 MET-1

On 24 May 01 at 12:19, Peter Sherwood wrote:
> 
>     ./BPlot B.dat
> 
> ./BPlot: /lib/libc.so.6: version `GLIBC_2.2' not found (required by ./BPlot)
> 
> 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.

Did you tried simple 'gcc -static -o BPlot BPlot.c' ? It should work OK
if you have static versions of all libraries you are using. But created
binary may have several megs instead of couple KBs. I assume that you want
to run it also under Linux, and not that you want to create Solaris binary
on Linux. This is another story. But AFAIK even binary statically compiled
with glibc2.2 will not run on 2.0.x kernel. You'll get 'Sorry, kernel 2.0
has so many bugs' error message. But maybe that static library prints
this only if pthread is used.
                                        Best regards,
                                                Petr Vandrovec
                                                address@hidden
                                                



reply via email to

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