NetBSD-Bugs archive

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

Re: toolchain/61079: ld compat linker warnings considered harmful



The following reply was made to PR toolchain/61079; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: toolchain/61079: ld compat linker warnings considered harmful
Date: Wed, 25 Nov 2026 22:49:09 +0000

 On Wed, Nov 25, 2026 at 08:00:00PM +0000, wiz%NetBSD.org@localhost via gnats wrote:
  > ld: /usr/lib/libm.so.0: warning: warning: reference to compatibility cabs()
 
 As I noted the last time this came up on tech-pkg, often (in fact, as
 best as I can recall, always) when I've investigated these they turn
 out to be real problems with missing includes.
 
  > In short, a program just doing 'exit' is linked against libgssapi (or
  > libroken, both work), and the linker complains:
  > 
  > # gcc -o a a.c -lgssapi
  > ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility login_getpwclass(); include <login_cap.h> for correct reference
 
 What is generating the reference to the obsolete login_getpwclass
 symbol? Are we sure that libgssapi was built correctly? If it wasn't,
 that should be fixed.
 
 Unless the linker is making this reference up on its own, it seems
 like mucking with which libraries are pulled in by copying or not
 copying DT_NEEDED entries is a bandaid. Which is not to say that we
 shouldn't fix this if it's broken.
 
  > RVP pointed out that --no-copy-dt-needed-entries seems to work around this:
  > 
  > https://mail-index.netbsd.org/tech-toolchain/2026/09/18/msg004903.html
  > 
  > but I don't know if that's an appropriate solution or not.
 
 I'd also got as far as discovering that the spurious warnings go away
 if you disable the gcc LTO plugin.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 



Home | Main Index | Thread Index | Old Index