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 |