🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.current
Article #18

Re: drm-66-kmod build fail during main-n290014-7a48c3fd3e6e -> main-n290042-9f0432041b8f

#18
From: Bjoern A. Zeeb
Date: Mon, 12 Oct 2026 18:13
81 lines
4921 bytes
On Tue, 13 Oct 2026, Tomoaki AOKI wrote:

> On Mon, 12 Oct 2026 17:21:39 +0200
> A FreeBSD User <freebsd@walstatt-de.de> wrote:
>
>> Am Tage des Herren Sun, 11 Oct 2026 22:07:36 +0100
>> Nuno Teixeira <eduardo@freebsd.org> schrieb:
>>
>>> Hello,
>>>
>>> 37:
>>>> /usr/src/sys/compat/linuxkpi/common/include/linux/kernel.h:33:10: fatal
>>>> error: 'opt_linuxkpi.h' file not found
>>>>    33 | #include "opt_linuxkpi.h"
>>>>       |          ^~~~~~~~~~~~~~~~
>>>
>>>
>>> I've reported today at
>>> https://lists.freebsd.org/archives/dev-commits-src-all/2026-October/082012.html
>>>
>>> Cheers,
>>>
>>
>> Ups. I did also for port graphics/drm-612-kmod a few minutes ago. The header file in question
>> is simply not in the most recent source tree ... very strange ;-)
>
> Good point.
>
> It SHOULDN'T be under /usr/src/, but under /usr/obj/, as it's generated
> on "kernel build time".
>
> This means, it shouldn't exist unless you built kernel
> yourself locally.
>
> Thus, I believe it SHOULDN'T be required for out-of-tree
> kmods (in ports or in the wild).
>
> If it's REALLY mandatory for out-of-tree kmod builds
> and fix in out-of-tree kmod side, error message to request
> local kernel builds first should be needed.
>
> If not, guards for #include NOT to be included except for
> kernel builds in src side would be the best fix.
>
> IIRC, it's the way usually done for this kind of situations,
> but I'm not enough sure if opt_linuxkpi.h is really mandatory
> or not for out-of-tree kmod builds.
>
> Note that, as far as I could confirm, there are 3 headers
> attempting to include opt_linuxkpi.h in offending commits
> (at least). And LINUXKPI_DEBUG could be appropreate to be
> used for safeguard?
>
> /usr/src/sys/compat/linuxkpi/common/include/linux/spinlock.h
> /usr/src/sys/compat/linuxkpi/common/include/linux/kconfig.h
> /usr/src/sys/compat/linuxkpi/common/include/linux/kernel.h

The sole problem here is that drm-kmod is handrolling stuff
instead of using the kmod,mk provided defines.

Apply the changes from the pull request and what's in drm-kmod
master already and it'll build along with a kernel, as a standalone
git checkout or from ports.  If there's a 4th method, please let me
know.

As a plus (once cleanup gets done beyond initial repair), in the
future this kind of breakage shouldn't happen anymore and there's
going to be a single place to track SRCS+= and CFLAGS+= dependencies
needed to use LinuxKPI.

So yes, please see https://github.com/freebsd/drm-kmod/pull/524

-- 
For there shall arise false Christs, and false prophets, and shall shew
great signs and wonders; insomuch that, if it were possible, they shall
deceive the very elect. Behold, I have told you before. [Mat. 24:24-25]


--
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: <qs218pp7-r9s4-o953-3442-459775r42p5p@SerrOFQ.bet>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <> <20261013025525.04e2cac18270c17ec4ab765c@dec.sakura.ne.jp>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news.szaf.org!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: "Bjoern A. Zeeb" <bz@FreeBSD.org>
Newsgroups: muc.lists.freebsd.current
Subject: Re: drm-66-kmod build fail during main-n290014-7a48c3fd3e6e ->
 main-n290042-9f0432041b8f
Date: Mon, 12 Oct 2026 18:13:40 +0000 (UTC)
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-current@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <qs218pp7-r9s4-o953-3442-459775r42p5p@SerrOFQ.bet>
References: <> <20261013025525.04e2cac18270c17ec4ab765c@dec.sakura.ne.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="56142"; mail-complaints-to="news-admin@muc.de"
X-Original-To: current@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1791828827;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
	 in-reply-to:in-reply-to:references:references;
	bh=/A4+A7dlznr3xrLenY/7c4+wG29CcFQlvVW6qvA2+10=;
	b=pNirZPSwZhSJuWJptN4fa4rn2DGrVjexFtXIUAkNflGjlkrrsHi45I+PQodJn8H3+puVmT
	L9OsOavdkoDNCKFh+uz3GzXIfq+linydI33wrNqnX6vARwRP91G+U0z9rC8nJxuEtFdGi4
	6NdbMirQ9LlZTl24QQlpRuacu/XhkTh4bAoNBpEIhsPj68eW3ENlEnXLdJZ+MWiQcgIa0M
	fkkI6LIqAfa7Vo8aoaqw1TFtPt3TDk5/4cryNhdKzc6O77LOw1yZ90p9KpNTcupv/Gqcxi
	szUh/H++0DLyREpkSVKKlchzna5gO1vCImQIDlvn69pRIEC4Xe2urUoNidP7Kg==
In-Reply-To: <20261013025525.04e2cac18270c17ec4ab765c@dec.sakura.ne.jp>
X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes