From owner-freebsd-questions@freebsd.org Mon Feb 8 17:08:15 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF1A353A1A2 for ; Mon, 8 Feb 2021 17:08:15 +0000 (UTC) (envelope-from oleg@theweb.org.ua) Received: from sigill.theweb.org.ua (noc.quadranet.com [66.63.164.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "sigill.theweb.org.ua", Issuer "sigill.theweb.org.ua" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZCCL4KlVz4X6w for ; Mon, 8 Feb 2021 17:08:13 +0000 (UTC) (envelope-from oleg@theweb.org.ua) Received: from sigill.theweb.org.ua (localhost [127.0.0.1]) by sigill.theweb.org.ua (8.16.1/8.16.1) with ESMTPS id 118H8Ao3043584 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 8 Feb 2021 19:08:10 +0200 (EET) (envelope-from oleg@theweb.org.ua) Received: (from oleg@localhost) by sigill.theweb.org.ua (8.16.1/8.16.1/Submit) id 118H8AUv043583 for freebsd-questions@freebsd.org; Mon, 8 Feb 2021 19:08:10 +0200 (EET) (envelope-from oleg@theweb.org.ua) X-Authentication-Warning: sigill.theweb.org.ua: oleg set sender to oleg@theweb.org.ua using -f From: "Oleg V. Nauman" To: freebsd-questions@freebsd.org Subject: Re: "make" in ports tells me "requires kernel source files in SRC_BASE=/usr/src." despite an up-to-date /usr/src Date: Mon, 08 Feb 2021 19:08:10 +0200 Message-ID: <2281312.bDOn7JOVgO@sigill.theweb.org.ua> Organization: Private persom In-Reply-To: <601d6f51-e3e5-a780-332a-95648fe87168@yuripv.dev> References: <601d6f51-e3e5-a780-332a-95648fe87168@yuripv.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Rspamd-Queue-Id: 4DZCCL4KlVz4X6w X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of oleg@theweb.org.ua has no SPF policy when checking 66.63.164.214) smtp.mailfrom=oleg@theweb.org.ua X-Spamd-Result: default: False [0.49 / 15.00]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; HFILTER_HELO_IP_A(1.00)[sigill.theweb.org.ua]; HAS_ORG_HEADER(0.00)[]; HFILTER_HELO_NORES_A_OR_MX(0.30)[sigill.theweb.org.ua]; NEURAL_HAM_SHORT(-0.21)[-0.210]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.63.164.214:from]; CTE_CASE(0.50)[]; ASN(0.00)[asn:8100, ipnet:66.63.164.0/23, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEFALL_USER(0.00)[oleg]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[theweb.org.ua]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[66.63.164.214:from:127.0.2.255]; R_DKIM_NA(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Feb 2021 17:08:15 -0000 On 2021 M02 8, Mon 09:01:26 EET Yuri Pankov wrote: > Michael Schuster wrote: > > Hi, > > > > again, apologies if this is not the right place to ask this question ... > > > > I've done a fair amount of googling, without relevant findings. > > > > $Subject says all - both the port I'm trying to build as well as /usr/src > > are up-to-date (one using "svn up", the other "git pull"), I'm also > > running > > the kernel that I built from those sources. > > > > uname: > > FreeBSD host 14.0-CURRENT FreeBSD 14.0-CURRENT #12 > > main-n244657-344f1083e12: Sat Feb 6 12:17:33 CET 2021 > > root@host:/usr/obj/usr/src/amd64.amd64/sys/GENERIC > > > > amd64 > > FWIW, I am not seeing the issue. Having said that, the trailing dot > after /usr/src in that error message looks suspicious, it is not there > in /usr/ports/Mk/Uses/kmod.mk; was that an exact copy/paste? If yes, > check if you are (incorrectly) setting SRC_BASE somewhere? It is a bug in /etc/rc.d/linux script linux_start() { local _emul_path _tmpdir _emul_path="$(sysctl -n compat.linux.emul_path)" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Attempt to use of "sysctl -n compat.linux.emul_path" value when it is not available because we are loading 'linux64.ko' later. It means that _emul_path contains empty data. load_kld -e 'linux(aout|elf)' linux case `sysctl -n hw.machine_arch` in amd64) load_kld -e 'linux64elf' linux64 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Actual load of linux64 kernel module ................................. and later.. if checkyesno linux_mounts_enable; then mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _emul_path is empty so it will run mount -o nocover -t linsysfs linsysfs "/sys" while # ls -dl /sys lrwxr-xr-x 1 root wheel 11 Jun 4 2018 /sys -> usr/src/sys symlink to /usr/src/sys It will effectively hide actual content of /usr/src/sys if you have linux_enable="YES", causing build failure of any port with kernel modules. Thank you