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

Re: NPTL and static linking



On Wed, 9 Mar 2005 05:00:52 -0600, Peter Samuelson <peter@p12n.org> wrote:
> 
> Yes, dlopen, but the problem is version skew.  With a dynamic libc6,
> libc and the NSS modules will always be compatible.  With a static
> libc6, NSS functions (gethostbyname, getpwuid, etc.) will only work if
> the target system has a very similar version of libc to the one the app
> was linked with.  Or they'll be ABI-incompatible and your program will
> crash.  Kind of defeats the purpose of static linking.

Ah. I understand. That makes sense.

> I know this is not directly related your question, but you displayed
> what seemed to be a misunderstanding of the static + NSS problem, so.

I appreciate the clarification. What is desirable, then, is for the developer
to be able to statically link his or her own libraries, and third
party libraries,
but to dynamically pick up "system" libraries, of which I would number
libpthread. That would be adequate for my needs. I expect this is possible,
as *everything* is possible, somehow. Perhaps it is something as trivial
as a compiler or linker flag that I have missed?

-Blunt

-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-



Reply to: