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: Christos Zoulas <christos%zoulas.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: toolchain-manager%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: toolchain/61079: ld compat linker warnings considered harmful
Date: Wed, 25 Nov 2026 16:10:01 -0500
The reason the NetBSD defaults to copy-dt-needed is pkgsrc. What =
copy-dt-needed does
is if your program links against libcurses.so and libcurses.so has a =
DT_NEEDED for libterminfo.so=20
and your program references a symbol from libterminfo.so like setupterm:
with copy-dt-needed; the program will resolve the symbol from =
libterminfo.so
without copy-dt-needed: the program will fail to link unless =
-lterminfo is added to the link line
Now libncurses.so includes the terminfo functions in it, but our =
libcurses.so does not, so many
pkgsrc packages will break if we change the default to no-copy-dt-needed =
like linux did.
This is the most popular example for DT_NEEDED, another is libkrb5.so =
and libroken.so.
We have choices:
- keep the status quo and only fix what's broken, living with the bogus =
linker warnings
- take the plunge, make no-copy-dt-needed the default,=20
- and fix whatever breaks in pkgsrc
- or make our libraries more compatible with linux by =
incorporating libterminfo in libcurses etc.
Long term we should be going with aligning with the rest of the world =
and turning off copy-dt-needed.
This unfortunately means maintaining more patches in pkgsrc, and =
fighting with upstreams to accept them.
I don't think that compatibility is a good reason to merge libraries, =
unless standards mandate it.
This also means that more programs will not work out-of-the box for =
NetBSD.
christos=
Home |
Main Index |
Thread Index |
Old Index