[OpenWrt-Devel] [PATCH v2] build: fix make kernel_menuconfig
cotequeiroz at gmail.com
Tue Sep 24 17:28:44 EDT 2019
Sorry for the double reply, Peter, this did not make it to the list.
On Tue, Sep 24, 2019 at 5:42 PM Petr Štetiar <ynezz at true.cz> wrote:
> Eneas Queiroz <cotequeiroz at gmail.com> [2019-09-24 17:06:28]:
> > The problem is that when scripts/config/lxdialog/check-lxdialog.sh is run,
> > it will still use the staging_dir/host/bin/pkg-config script without
> > STAGING_PREFIX set.
> it doesn't work like that here, I've just added following into check-lxdialog.sh:
> echo "$(command -v pkg-config)" > $TOPDIR/meh.log
> and meh.log contains /usr/bin/pkg-config after kernel_menuconfig run.
> > > +DISTRO_PKG_CONFIG:=$(shell which -a pkg-config | grep -E '\/usr' | head -n 1)
> > If we export this, then we can check its existence in
> > tools/pkg-config/files/pkg-config, and decide which pkg-config we want
> > to run.
> if I understand it correctly this global exports are not welcome.
> > Then, we can use the variable in our pkg-config script to decide what
> > to run, using just pkg-config.real as a fallback if nothing is defined
> > (alternatively, we can fail instead):
> similar approach was already suggested by Thomas originally and was considered
> brittle (and I agreed with that), so I've reworked it to current version.
> 1. https://patchwork.ozlabs.org/patch/1163120/
> -- ynezz
I've got your patch applied, and it still fails make menuconfig if I
start from scratch or after make -C scripts/config clean. I haven't
tried kernel_menuconfig yet--it will have to compile a lot of stuff if
I start fresh.
I've tried to run it like you did, but my meh.log points to
/home/equeiroz/src/openwrt/staging_dir/host/bin/pkg-config. How will
it get past $(TOPDIR)/staging_dir/host/bin, if that's the first
thing--at least here--in PATH?
I can certainly agree that globals are not really the best way. To
avoid that, we can set DISTRO_PKG_CONFIG inside
tools/pkg-config/files/pkg-config, and go from there:
DISTRO_PKG_CONFIG="$(which -a pkg-config | grep -Ev
'staging_dir/host/bin/pkg-config' | head -n 1)"
What do you think?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel