All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] Advice needed: Problem with clashing make variables in pkg-generic.mk when building perl-xml-sax package.
Date: Tue, 24 Oct 2017 00:18:19 +0200	[thread overview]
Message-ID: <20171023221819.GB18135@scaer> (raw)
In-Reply-To: <5106c5c9-62e9-494c-76d8-2bbee56a34e1@mind.be>

Joeri, Arnout, All,

On 2017-10-23 23:05 +0200, Arnout Vandecappelle spake thusly:
> On 23-10-17 16:41, Barbarien, Joeri (Nokia - BE/Antwerp) wrote:
> > Hello all,
> > 
> > When building perl-xml-sax (and its dependency perl-xml-sax-base) I noticed something strange in output/build/packages-file-list.txt:
> [snip]
> > The files that are listed for perl-xml-sax-0.99 are actually those built by perl-xml-sax-base
> > 
> > This is due to a clash of make variables in package/pkg-generic.mk:
> > 
> > $(2)_BASE_NAME  = $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
> > $(2)_RAW_BASE_NAME = $$(if $$($(2)_VERSION),$$($(2)_RAWNAME)-$$($(2)_VERSION),$$($(2)_RAWNAME))
> > $(2)_DL_DIR =  $$(DL_DIR)
> > $(2)_DIR  =  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
> > 
> > Due to the unfortunate naming of the packages,
> > 
> > $($(2)_BASE_NAME) for perl-xml-sax clashes with as $($(2)_NAME) for perl-xml-sax-base, leading to this wrong behavior.
> 
>  Wow, good catch! Incredible that this works at all...

Yes, this is a very good catch... Damned... :-/

I am basically in line with the analysis by Arnout: any solution we
decide on will be a huge work.

I think we really need to sleep on it for a little while, because we
definitely must be very cafreful that a solution:

  - does not introduces regressions

  - can be applied in as systematice a way as possible

  - does not need a second round to fix a fallout.

I think I will wait coming back from ELCE before I have a deep look at
this, though.

Notice that we have a similar problem for host packages: a target package
that is named foo and has a host variant could be confused with a target
package that is named host-foo, and then we'd have a clash in the
variable names as well...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-10-23 22:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 14:41 [Buildroot] Advice needed: Problem with clashing make variables in pkg-generic.mk when building perl-xml-sax package Barbarien, Joeri
2017-10-23 21:05 ` Arnout Vandecappelle
2017-10-23 22:18   ` Yann E. MORIN [this message]
2017-11-01 15:27   ` 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=20171023221819.GB18135@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.