mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Richard OGrady <Rich_Ogrady@grayhill.com>
Cc: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] pkg-config-wrapper
Date: Fri, 7 Oct 2022 09:37:05 +0200	[thread overview]
Message-ID: <20221007073705.GJ26936@pengutronix.de> (raw)
In-Reply-To: <MN2PR14MB30871631A8122DDEA101C69BF05D9@MN2PR14MB3087.namprd14.prod.outlook.com>

Hi,

On Wed, Oct 05, 2022 at 08:44:44PM +0000, Richard OGrady wrote:
> Debugging a prepare stage issue so trying to understand this chunk of code in pkg-config-wrapper.
> 
> for pkg in ${pkgs}; do
>    if [[ ! " ${whitelist} " =~ " ${pkg} " && ! "${pkg}" =~ '-uninstalled' ]]; then
>       echo "$(basename ${0}): warning: blocking '${pkg}': not selected by '${PKGCONFIG_WHITELIST_SRC}'" >&${ERROR_FD}
>       exit 1
>   fi
> done
> 
> Where does ${whitelist} come from?  Have tried to trace this back and best guess is it may come from ../state/${PKGCONFIG_WHITELIST_SRC}. pkgconfig .
> 
> If this is the case, perhaps pkg-config-wrapper can't be used during prepare as the .pkgconfig file isn't there yet?

${whitelist} is defined as PKGCONFIG_WHITELIST_HOST or
PKGCONFIG_WHITELIST_TARGET depending on whether the host or cross pkgconfig
is called. For example PKGCONFIG_WHITELIST_HOST is used by when the Linux
kernel looks for openssl to build a host tool.

These variables are filled by the .pkgconfig files from all packages that
are selected in the .in file. So those are already available during the
prepare stage.
During the install stage the new .pkgconfig for the package is created. It
is filled with the name of any .pc file the package itself provides and the
content of the .pkgconfig files of all direct dependencies. This way, the
.pkgconfig will contain all pkg-config packages of the ptxdist package and
all its dependencies.

So if you hit this then your package is not selecting the necessary
dependencies.
Btw, if you run ptxdist with '-v' then the full prepare command is logged
including PKGCONFIG_WHITELIST_HOST= / PKGCONFIG_WHITELIST_TARGET=
environment variables. Take a look, what's actually listed there.

Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  parent reply	other threads:[~2022-10-07  7:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BYAPR14MB30787CFC6DF335A2C40F501CF05B9@BYAPR14MB3078.namprd14.prod.outlook.com>
2022-10-03 20:43 ` [ptxdist] pkg-config-wrapper issue Ladislav Michl
2022-10-04 13:57   ` Richard OGrady
     [not found] ` <MN2PR14MB30871631A8122DDEA101C69BF05D9@MN2PR14MB3087.namprd14.prod.outlook.com>
2022-10-07  7:37   ` Michael Olbrich [this message]
     [not found]     ` <BYAPR14MB307877E0F9AF8D0E8C4D545CF05F9@BYAPR14MB3078.namprd14.prod.outlook.com>
2022-10-07 15:28       ` [ptxdist] pkg-config-wrapper Michael Olbrich
2022-10-10 14:11         ` Richard OGrady

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=20221007073705.GJ26936@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=Rich_Ogrady@grayhill.com \
    --cc=ptxdist@pengutronix.de \
    /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