🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.netbsd.tech.toolchain
Article #10

Re: ld compat linker warnings considered harmful

#10
From: Thomas Klausner
Date: Wed, 25 Nov 2026 20:01
40 lines
3214 bytes
Since there still was no solution committed for this, I've filed

toolchain/61079: ld compat linker warnings considered harmful

 Thomas


On Tue, Aug 18, 2026 at 09:58:58AM +0100, Thomas Klausner wrote:
> Hi!
> 
> For library function renaming to work, NetBSD uses header macros to
> use the latest version of a function, so that the old symbol still
> stays available for programs that were linked against the previous
> version of the function.
> 
> There is also a linker warning so that you do not use the old
> functions by accident, because you forgot including the header, e.g.:
> 
> ld: /usr/lib/libm.so.0: warning: warning: reference to compatibility cabs()
> 
> The (known) problem is that this linker warning also triggers when it
> shouldn't, when libraries are pulled in indirectly and the functions
> not even used by the program that (indirectly) links against them.
> 
> The latest meson now defaults to fatal linker warnings, which causes
> programs fail to build because of this.
> 
> See e.g.
> 
> https://releng.netbsd.org/pkgreports/shadow/HEAD/NetBSD-11.0-x86_64/20260816.2028/libliftoff-0.5.0/build.log
> 
> Can someone please fix the linker warnings so they only trigger when
> necessary?
> 
> Thanks,
>  Thomas

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <awc-iks1oRrtWe0G@exadelic.gatalith.at>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!sewer!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <aoQPncBN_RlnE63E@exadelic.gatalith.at>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!sewer!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: Thomas Klausner <wiz@netbsd.org>
Newsgroups: muc.lists.netbsd.tech.toolchain
Subject: Re: ld compat linker warnings considered harmful
Date: Wed, 25 Nov 2026 21:01:41 +0100
Organization: Newsgate at muc.de e.V.
Sender: tech-toolchain-owner@NetBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <awc-iks1oRrtWe0G@exadelic.gatalith.at>
References: <aoQPncBN_RlnE63E@exadelic.gatalith.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="4903"; mail-complaints-to="news-admin@muc.de"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
	s=20240131; t=1795636906;
	bh=0yIrqHrh+Ri99eu5VU1co4gARdRZy765OJ5Grk5tnF8=;
	h=Date:From:To:Subject:References:In-Reply-To:List-Id:
	 List-Unsubscribe;
	b=qoK92BwTag9C6OX7xABjXZ5Dxx5OnT/CDadORHgqHCebbjDvsvvM8KdQZ5eFkdvV/
	 mUl7vr49ON6dRXxIlCnVvC48X5UiNGkfUJwI0BUH7lDgXD3CHZeydoFAa1+t+oT6QW
	 DIUxzmgGGGhvskjeY3/SZFrAe2i0bKocWb+i7FWY=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netbsd.org;
	s=20240131; t=1795636903;
	bh=0yIrqHrh+Ri99eu5VU1co4gARdRZy765OJ5Grk5tnF8=;
	h=Date:From:To:Subject:References:In-Reply-To;
	b=LfxkKeSiE0j6d4EPU/6uXAEjCpD2kQ34aT4SB0N4jXDLvgVJn8qko5K2JSTDqNftr
	 g8RDoVnoPONTTLLElBcKSRF1pXFBwwJpZgXhMlY54lTjS1ACDQdzTk+UYbGC66HgoY
	 54smaNb5ai7TrWVMRYcdZNOj53IlhJr7Fm0oIfio=
Content-Disposition: inline
In-Reply-To: <aoQPncBN_RlnE63E@exadelic.gatalith.at>
Precedence: bulk
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes