Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: James Hilliard <james.hilliard1@gmail.com>,
	"Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] Makefile: unexport TARGET env variable
Date: Wed, 7 Sep 2022 14:42:48 +0200	[thread overview]
Message-ID: <09be7323-3af8-2fa2-2d45-16d3d92e1c13@mind.be> (raw)
In-Reply-To: <CADvTj4rCFTZOm0MA+Ph7u8DmjPqgJw39oXqWoxPLWmERRCJrPg@mail.gmail.com>



On 06/09/2022 23:15, James Hilliard wrote:
> On Tue, Sep 6, 2022 at 1:22 AM Yann E. MORIN <yann.morin.1998@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?

  It's conditionally assigned:

ifneq ($(ENABLE_STATIC),)
TARGET = $(STUBDATA_LIBDIR)$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
endif

  There are a couple of Makefile.in where it's defined like that....

  This does look like a very icu-specific thing though, so I think it should be 
fixed in icu.mk itself, by setting TARGET= in the _ENV.

  Regards,
  Arnout


> 
>>
>> 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@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@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.  |
>> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-09-07 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-05 20:20 [Buildroot] [PATCH 1/1] Makefile: unexport TARGET env variable James Hilliard
2022-09-06  7:21 ` Yann E. MORIN
2022-09-06 21:15   ` James Hilliard
2022-09-07 12:42     ` Arnout Vandecappelle [this message]
2022-09-07 22:51       ` James Hilliard
2022-09-09 19:31         ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09be7323-3af8-2fa2-2d45-16d3d92e1c13@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=james.hilliard1@gmail.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox