[Buildroot] [PATCH 1/1] Makefile: unexport TARGET env variable

James Hilliard james.hilliard1 at gmail.com
Tue Sep 6 21:15:12 UTC 2022


On Tue, Sep 6, 2022 at 1:22 AM Yann E. MORIN <yann.morin.1998 at free.fr> wrote:
>
> James, All,
>
> On 2022-09-05 14:20 -0600, James Hilliard spake thusly:
> > If set this can may break package builds in some cases such as the
>
> So, this is very probabilistic: 'can' and 'may'! ;-)

Well I think the breaking behavior depends on what TARGET is set to.

>
> > host-icu build.
>
> Can you provide an actual error message and an explanation on how that
> actually fails?

I had set this in my env(for some non-buildroot compiler testing), and noticed
it broke buildroot builds unless cleared:
export TARGET=bpf

>>> host-icu 70-1 Building
PATH="/home/buildroot/buildroot/output/per-package/host-icu/host/bin:/home/buildroot/buildroot/output/per-package/host-icu/host/sbin:/home/buildroot/bin:/home/buildroot/.local/bin:/home/buildroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
PKG_CONFIG="/home/buildroot/buildroot/output/per-package/host-icu/host/bin/pkg-config"
PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
PKG_CONFIG_LIBDIR="/home/buildroot/buildroot/output/per-package/host-icu/host/lib/pkgconfig:/home/buildroot/buildroot/output/per-package/host-icu/host/share/pkgconfig"
 /usr/bin/make -j33  -C
/home/buildroot/buildroot/output/build/host-icu-70-1/source
cd ./config; \
    /usr/bin/make -f pkgdataMakefile
rm -rf config/icu-config
rebuilding config/icucross.mk
rebuilding config/icucross.inc
/bin/bash ./mkinstalldirs lib
/bin/bash ./mkinstalldirs bin
/usr/bin/install -c ./config/icu-config-top config/icu-config
rm -rf pkgdata.inc
chmod u+w config/icu-config
mkdir lib
mkdir bin
LC_ALL=C /usr/bin/sed -f ./config/make2sh.sed < ./config/Makefile.inc
| grep -v '#M#' | uniq >> config/icu-config
config/icu-uc.pc updated.
config/icu-i18n.pc updated.
/usr/bin/make[2]: Making `all' in `stubdata'
LC_ALL=C /usr/bin/sed -f ./config/make2sh.sed < ./config/mh-linux |
grep -v '#M#' | uniq >> config/icu-config
cat ./config/icu-config-bottom >> config/icu-config
   (deps)     stubdata.cpp
chmod u-w config/icu-config
Note: rebuild with "/usr/bin/make VERBOSE=1 " to show all compiler parameters.
make[3]: *** No rule to make target 'bpf', needed by 'all-local'.  Stop.

>
> I've looked at the icu source code, and all I could see are plain
> assignments and references to TARGET. Variables assigned in a Makefile
> are supposed to take precedence to variables from the environment, so I
> am not sure I can see how that can actually fail...

I assume it's not actually assigned in the makefile then?

>
> See for example commits which describes the actual reasons it fails:
>     20ca008d0266 unexport TERMINFO to correct ncurses behavior
>     2e32330c4a49 Makefile: unexport O
>     d3910057c6ae Makefile: unexport 'DEVICE_TREE' environment variable
>     6cff741ebaf7 package/ccache: do not force colored diagnostics
>
> Regards,
> Yann E. MORIN.
>
> > Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
> > ---
> >  Makefile | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Makefile b/Makefile
> > index bd0b906cde..a82a22a276 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -427,6 +427,7 @@ unexport GCC_COLORS
> >  unexport PLATFORM
> >  unexport OS
> >  unexport DEVICE_TREE
> > +unexport TARGET
> >
> >  GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
> >
> > --
> > 2.34.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list