From owner-freebsd-questions@freebsd.org Mon Feb 8 20:10:20 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 E16E353FCD1 for ; Mon, 8 Feb 2021 20:10:20 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DZHFS20BFz4n2j for ; Mon, 8 Feb 2021 20:10:20 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-il1-x135.google.com with SMTP id m20so13964068ilj.13 for ; Mon, 08 Feb 2021 12:10:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9T25pQ4NtxUkYKKsrD+atOeZQPnYjd9OBrdz7n+OsBs=; b=aPJyWdCpwpD8/TUO8v/7++qamgdkALEn/OeTaI8ORX5IApF+ClYt4bjC0qpNr90wOs 0+hTUbvWn7SPCADBh21i/Yr3U2P++or5ll/YJkYQ6xzAxdO0rEvktv43CHpZlLrgmavN TLCrn+NSCFDislKf4oMAS3+3csAnR4k6irx9iWpH76IXp6R1c94m/YZk5KkhIISy+R5s k4Zna61J+783oBmm0l15RYB0YjfiY7SAlaov3RVGOSIaSUpi7QWsAuN0cxQlt01gm6Be MCfxupX/ZnjSiaEeEkbQxnKKAVCce+gffviCWsKQpRzuPWxNXQxnXXDxZdHkfQbzqcS9 qXjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9T25pQ4NtxUkYKKsrD+atOeZQPnYjd9OBrdz7n+OsBs=; b=m9kFTRYWZAc3j1GZh09wmg7DjvnTJuyjfOTCdfMeWDPgcSKS0P/CeoOWMY7jITZji5 5tEDPbrnEF1JMMBrXmvIoU8pH6MUnFjnqpMcr7pEpO/O6ruL2kPKRtyPBaGYIuolDX/x 01a6VzdRWrYUzoFqIzBYQcQU4Npedv2quYWlc2a1kRidutGnVLa3DTKl4WQAX28h4/lB 09K97fnFPqaOu45t39OOwIt695lYpFosaHDm2uLv+eYM46ZicjrTN5UQeNek5YThLCOg LiuE6e8jMV/CDWYzez2UBgl2e6E5Td53aKreShgcR5tCp8ie33uSYbn68wFWi5xOKdtz nZ+g== X-Gm-Message-State: AOAM533CZJ9ImYecRfTGrVGPTFV3TP9RjBAp+207kxPwBkh6T5fFl5Ab deiPRrRBrISBLzbyyFehXcVWzuACCKboMiQJU7XR6j9ZWoDdhQ== X-Google-Smtp-Source: ABdhPJxkbGGB0/xK43Mu3q8BvzZXPt7UisjKVNs4U5/fmJ3XIWEEzmHH+T8xL9eE7yvkD+sw9LJSmqiDS8oj/LTcX70= X-Received: by 2002:a92:d987:: with SMTP id r7mr16857518iln.3.1612815019028; Mon, 08 Feb 2021 12:10:19 -0800 (PST) MIME-Version: 1.0 References: <601d6f51-e3e5-a780-332a-95648fe87168@yuripv.dev> <2281312.bDOn7JOVgO@sigill.theweb.org.ua> In-Reply-To: <2281312.bDOn7JOVgO@sigill.theweb.org.ua> From: Michael Schuster Date: Mon, 8 Feb 2021 21:10:07 +0100 Message-ID: Subject: Re: "make" in ports tells me "requires kernel source files in SRC_BASE=/usr/src." despite an up-to-date /usr/src To: "Oleg V. Nauman" Cc: freeBSD Mailing List X-Rspamd-Queue-Id: 4DZHFS20BFz4n2j X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=aPJyWdCp; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of michaelsprivate@gmail.com designates 2607:f8b0:4864:20::135 as permitted sender) smtp.mailfrom=michaelsprivate@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::135:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[1.52.98.32:email]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::135:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DBL_PROHIBIT(0.00)[1.52.98.32:email]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::135:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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 20:10:21 -0000 On Mon, Feb 8, 2021 at 6:08 PM Oleg V. Nauman wrote: > 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 > actually, in my case it was ... I don't quite know what. You may have seen I use "DESTDIR=/mnt", which is the mountpoint for a newly created boot environment: $ bectl list BE Active Mountpoint Space Created [...] BE_20210206_175312_CURRENT14 NR / 30.8G 2021-02-06 17:53 BE_20210208_204901_CURRENT_14 - /mnt 860K 2021-02-08 20:49 ... which, as I found out, does NOT include /usr/src; only after creating a snapshot of same and mounting that specifically: $ sudo mount -t zfs tank/usr/src@20210208 /mnt/usr/src ... did my make command work. Thx to all who helped me think about this properly :-) Michael PS: I'll be researching this boot env. behaviour a bit more (I was the same using bectl or beadm), should someone have an idea already, I'm all ears! > 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 > > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion'