Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility ...
On Wed, Feb 25, 2026 at 10:12:41PM +0100, Joerg Sonnenberger wrote:
> On 2/24/26 9:41 PM, Thomas Klausner wrote:
> > 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
>
> Yes, this is a GNU ld bug in that it is reporting references from shared
> libraries. I looked at it years ago, but gave up trying to resolve those.
Would it be an option to use __attribute__((deprecated(msg)))
instead of the asm macro we have now?
For comparison, here's what we have now (sys/cdefs_elf.h):
#define __warn_references(sym,msg) \
__asm(".pushsection .gnu.warning." #sym "\n" \
".ascii \"" msg "\"\n" \
".popsection");
In my toy example, this seems to work better, only printing an error
when the function is actually called.
Thomas
Home |
Main Index |
Thread Index |
Old Index