This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static_link_warning


2010/8/19 StanisÅaw Findeisen <stf@eisenbits.homelinux.net>:
> Sometimes when you statically link programs with GNU C Library you get
> warnings like this:
>
>> warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
>
> Could anyone please explain to me what it means and why is it so?

Somenetwork functions rely on NSS to perform the lookup operations.
NSS can be configured to use several different modules. The support
for these modules is provided by dynamically opening the required
module and calling the appropriate functions therein.

Even if you have a static application, if you make certain function
calls, it may dynamically load the appropriate NSS module. Once you
dynamically load a module you need all the shared libraries to be
installed to support the module.

The shared libraries must be from the version of glibc used for
linking to ensure structures match the expected sizes in the static
application.

I hope that helps.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]