Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp282676pxu; Tue, 1 Dec 2020 11:07:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJzXINn4jt2F7V/bBq4og2WeJsk9NQhhG/AkcZcMP6mUmvgYmWAyr3geKmN1jTk30Iq7+wGN X-Received: by 2002:a17:906:2a93:: with SMTP id l19mr4481204eje.244.1606849676895; Tue, 01 Dec 2020 11:07:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606849676; cv=none; d=google.com; s=arc-20160816; b=P5+k8xkg8fgV0OHx2/0GYvHCT7vGUJn8Y8utOiO+0PCk7/yZXL3yk5TL/cVnrj3i+R JNjZAx7OiGfH2ECou6p8JF1wLQ9G1Pvxqu1OT8qP31JmNiP2w9fw5loRpdL5fx1URvrv nO4viA7XM00XpPfrnAyoZLxx+1h9yWsCjAjv4C9VuZQSwRAOsvmbngUDjTrN/BPKMq/H YPqoRlcVDyPGk0eT/lQZbMSF3RsLRdfyUAiQhhCkNwaEQxw1pidPm0DsNpBSaDrJwRc6 5zu6PGi8zdHJ+sMv+EDmpkBYyU1rT8vsUApdPdSALqaTwjwwU0KI9phufQSVWAB3zHEl Laww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=88kbJJu2Jv4frbwGGFo8+gZMN3U+7GdXo1HwS3naZb8=; b=Y60fHnYPyVostFyB8wjSk0er4rSUfKjSBaD/37sbKcJy5waoao3qLFpeHMaS1HYa1f mWc15ADs3EYY7NeaAihb0s8Our5XE2RBJQUcwoFpbBO3tY+vLN+eCPlXvc0gu9/vUa2R uduCt37aRE/r37mAhVZx8kN7Sjcla0IA5JqxH1PYf3uC6X9rxsjI/zQO7voXOVJ4eXpH VS02AYV9vw3NWdYjFdFCOIlyPQ0kA6sIxQCvTjHLohrQYDTIrmryydlFDOV24FRTe97w xo9QjHH1FRC5H7K1p+oE1ShK/bO2RXV7JSmQiOhY1xPIoHMLgv/T+TGBnkzbnVyBXysr ILIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P8GFsMpK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z59si431080ede.218.2020.12.01.11.07.31; Tue, 01 Dec 2020 11:07:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P8GFsMpK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392342AbgLATCh (ORCPT + 99 others); Tue, 1 Dec 2020 14:02:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392316AbgLATCh (ORCPT ); Tue, 1 Dec 2020 14:02:37 -0500 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6C7EC061A4B; Tue, 1 Dec 2020 11:01:31 -0800 (PST) Received: by mail-ej1-x644.google.com with SMTP id f9so6421337ejw.4; Tue, 01 Dec 2020 11:01:31 -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=88kbJJu2Jv4frbwGGFo8+gZMN3U+7GdXo1HwS3naZb8=; b=P8GFsMpK7OgMSzw5Sn/1P1G034n1iWBGK4y+sBYE8i97Yc4eeE8eowHwo3XkYxYe5Y gKR5bjMxNw2NfQBQo/8CB12kMoFeNEHTKkfCSMDsjgGMuAQi0/iTCz3KS83VFOuKiGwC YtSXEH5a/yvsA9yDURQ0VQXCUKhw7P3ohPpcIhKnj0TA/wo9yTGq7jh/F0XKRDKESPRp 1v3fQ99R3qin1bfvHIuswvEyxQXRzXlD1eL9PlV8k/HpVzfU4/0UtQSSLrXntpAiX0no tXQPWkWC7v11EwdUWeZy0VjOVDfosrDkQmQaelgs0AvUVnLZvTK1eyUga0VaLNjAJwtg eY+w== 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=88kbJJu2Jv4frbwGGFo8+gZMN3U+7GdXo1HwS3naZb8=; b=s5d+vT4EukofZatzW7Poabv6VRN8ImPtIheSCNO7jS7QjlHpiIXSq6F5tknwVon/Lc 9sgwzCNHPvZW0VJH1cY12aQAjeAC7ZILqxSowDxsnjtW2/n6lfP1KQQp8MIzosvTIFXh N5A/ukckVgDn2Xmh2+sL17os3Yw1TrRXMH0f9mhMH1+3c/h7DrhHu9JgG/SW3ovCCLvm BAoJscYCBRLqfkndgkc5O2oDEu9go+7vdYSeWLYEAUDIA5oApjh0PWR55AJNKNcKw+YJ pmUPsIJMs6DTmLLj0+Wg0aR4jOwt+9FTE5LD89dYy+/QkoNOA7NoTgmrWE95gnBGjKf9 zeZw== X-Gm-Message-State: AOAM533GBtWb8YgSSZbCW4bsvlxSqXjOtl5pElR1WAonQQ5nM5oDND1v 5Myl8rNkUZngXPLdtI38Ntt3ErCnhv/V/KoupW3G2k3sR6DqKA== X-Received: by 2002:a17:906:5e0f:: with SMTP id n15mr4405903eju.459.1606849290490; Tue, 01 Dec 2020 11:01:30 -0800 (PST) MIME-Version: 1.0 References: <20201128004505.27619-1-scott.branden@broadcom.com> In-Reply-To: From: Bruce Ashfield Date: Tue, 1 Dec 2020 14:01:19 -0500 Message-ID: Subject: Re: [PATCH] menuconfig,mconf-cfg: Allow specification of ncurses location To: Scott Branden Cc: Masahiro Yamada , Linux Kbuild mailing list , Linux Kernel Mailing List , Broadcom Kernel Feedback List , OE-core , openembeded-devel , Michal Marek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 1, 2020 at 12:19 PM Scott Branden wrote: > > Hi Masahiro, > > On 2020-12-01 4:25 a.m., Masahiro Yamada wrote: > > On Sat, Nov 28, 2020 at 9:45 AM Scott Branden > > wrote: > >> From: Bruce Ashfield > >> > >> In some cross build environments such as the Yocto Project build > >> environment it provides an ncurses library that is compiled > >> differently than the host's version. This causes display corruption > >> problems when the host's curses includes are used instead of the > >> includes from the provided compiler are overridden. There is a second > >> case where there is no curses libraries at all on the host system and > >> menuconfig will just fail entirely. > >> > >> The solution is simply to allow an override variable in > >> check-lxdialog.sh for environments such as the Yocto Project. Adding > >> a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing > >> compiling and linking against the right headers and libraries. > >> > >> Signed-off-by: Jason Wessel > >> cc: Michal Marek > >> cc: linux-kbuild@vger.kernel.org > >> Signed-off-by: Bruce Ashfield > >> Signed-off-by: Scott Branden > >> --- > > > > Some people solve the cross-compiling in Yocto > > by using pkg-config. > > > > > > For example, > > > > commit 067c650c456e758f933aaf87a202f841d34be269 > > Author: Pavel Modilaynen > > Date: Fri Jul 12 13:52:19 2019 +0200 > > > > dtc: Use pkg-config to locate libyaml > > > > Using Makefile's wildcard with absolute path to detect > > the presence of libyaml results in false-positive > > detection when cross-compiling e.g. in yocto environment. > > > > > > > > mconf-cfg.sh already allows the path flexibility with pkg-config. > > Why do you want yet another hook? > I hope the yocto community can provide more details on this patch. > The yocto environment isolates the build environment from the host tools. > Running menuconfig with the upstream kernel does not work on the latest yocto without this patch. Sorry for not commenting on the origin patch, gmail buried it within some other threads, but luckily this one popped up. It is true that we've been carrying this for several years to deal with the fact that the native sysroot is not searched by the pkg-config called by mconf-cfg.sh (since it is separate from host and target pkg-config). As it turns out, in the past few weeks, we have come up with a way to inject those native sysroot components into pkg-config without the need for any changes to the scripts. Scott: if you try again the the latest oe-core, and are still seeing the problem with the mainline kernel, ping me, and we can see if the pkg-config fix isn't holding for you, at that point, yes, we may still need a hook like this to solve the problem. Cheers, Bruce > >> scripts/kconfig/mconf-cfg.sh | 8 ++++++++ > >> 1 file changed, 8 insertions(+) > >> mode change 100755 => 100644 scripts/kconfig/mconf-cfg.sh > >> > >> diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh > >> old mode 100755 > >> new mode 100644 > >> index aa68ec95620d..32448bc198a5 > >> --- a/scripts/kconfig/mconf-cfg.sh > >> +++ b/scripts/kconfig/mconf-cfg.sh > >> @@ -4,6 +4,14 @@ > >> PKG="ncursesw" > >> PKG2="ncurses" > >> > >> +if [ "$CROSS_CURSES_LIB" != "" ]; then > >> + echo libs=\'$CROSS_CURSES_LIB\' > >> + if [ x"$CROSS_CURSES_INC" != x ]; then > >> + echo cflags=\'$CROSS_CURSES_INC\' > >> + fi > >> + exit 0 > >> +fi > >> + > >> if [ -n "$(command -v pkg-config)" ]; then > >> if pkg-config --exists $PKG; then > >> echo cflags=\"$(pkg-config --cflags $PKG)\" > >> -- > >> 2.17.1 > >> > > > -- - Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II