Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility ...
Hi!
When compiling code in pkgsrc, I often see this block:
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility login_getpwclass(); include <login_cap.h> for correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_scan(); include <pwd.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility loginx(); include <util.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility parsedate(); include <util.h> for correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_copyx(); include <util.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_getpwconf(); include <pwd.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility login(); include <util.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility setusercontext(); include <login_cap.h> for correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_copy(); include <util.h> to generate correct reference
in code that doesn't use libutil at all.
This is a problem with code that is quite zealous and tries to use
-Wl,--fatal-warnings.
So I dug a bit and found that linking against libgssapi causes them as
well (which does not use libutil either), and digging deeper, I think
it's coming from libroken.
Minimal test case attached.
I think this is a bug, I'm just not sure if it's in ld or in the
warnings code (btw, it says "warning: warning: ") or somewhere else,
but it doesn't make sense to warn about this if the library is just
pulled in indirectly.
Thomas
a:
gcc -o a a.c -lgssapi
b:
gcc -o b a.c -lroken
#include <stdlib.h>
int main() {
exit(0);
}
Home |
Main Index |
Thread Index |
Old Index