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


On 2010-08-19 18:11, Carlos O'Donell wrote:
> 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.

It's like another copy of glibc being loaded along with those NSS
modules, right? It could be dynamically loaded but also statically
linked with that NSS module or with one of the modules it needs?

Thanks!

STF

http://eisenbits.homelinux.net/~stf/
OpenPGP: DFD9 0146 3794 9CF6 17EA  D63F DBF5 8AA8 3B31 FE8A


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