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

Re: Compiling coreutils from source


Florian Pelgrim writes:
> I would also be interested what this message means and if it can be
> ignored or anything should be done:
>> /home/vagrant/coreutils-8.23/src/whoami.c:85: warning: Using
>> 'getpwuid' in statically linked applications requires at runtime the
>> shared libraries from the glibc version used for linking

`getpwuid' uses shared objects to implement modules for user information
lookup (/etc/passwd) and the like; this is configured in
/etc/nsswitch.conf. As far as I know, the interface between glibc and
these modules is not stable. I don't know how often it changes though.

If you link statically, you have to have the correct versions of these
shared objects around: they cannot be linked in as it is only decided at
runtime which ones to load. If they aren't available, I would expect
failures in programs relying on name lookup: for example whoami cannot
get the username associated with the uid if `getpwuid' fails.


Reply to: