Repository: conan-io/conan-center-index

Issue:
[package] wayland/1.21.0: Dependency "libffi" not found
### Description

cross compile from linux x86_64 to linux arm64 failed.
report error "Run-time dependency libffi found: NO (tried pkgconfig and cmake)"

### Package and Environment Details

* Package Name/Version: **wayland/1.21.0**
* Operating System+version: **Linux Ubuntu 16.04**
* Compiler+version: **gcc 7.5 & aarch linux gnu gcc 7.5**
* Docker image: **zvicii/gcc7-arm64-ubuntu16.04-jenkins(based on conanio/gcc7-ubuntu16.04-jenkins )**
* Conan version: **conan 1.52.0**
* Python version: **Python 3.7.13**


### Conan profile

Configuration (profile_host):
[settings]
arch=armv8
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=14
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
AR=aarch64-linux-gnu-ar
AS=aarch64-linux-gnu-as
CC=aarch64-linux-gnu-gcc
CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++
CMAKE_C_COMPILER=aarch64-linux-gnu-gcc
CXX=aarch64-linux-gnu-g++
CXXFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
FC=aarch64-linux-gnu-gfortran
LD=aarch64-linux-gnu-ld
RANLIB=aarch64-linux-gnu-ranlib
STRIP=aarch64-linux-gnu-strip
Configuration (profile_build):
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=14
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
[options]
[build_requires]
[env]
AR=ar
AS=as
CC=gcc
CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
CMAKE_CXX_COMPILER=g++
CMAKE_C_COMPILER=gcc
CXX=g++
CXXFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
FC=gfortran
LD=ld
RANLIB=ranlib
STRIP=strip

### Steps to reproduce

conan install -r conancenter wayland/1.21.0@ --build=missing --build=wayland -pr:b=profile_build -pr:h=profile_host

### Logs

<details><summary>Click to expand log</summary>

```
-- Conan: checking conan executable
-- Conan: Found program /opt/pyenv/versions/3.7.13/bin/conan
-- Conan: Version found Conan version 1.52.0
-- Conan executing: /opt/pyenv/versions/3.7.13/bin/conan install /home/conan/workspace/nim-cross-platform-sdk --build missing --build wayland --profile:host /home/conan/workspace/nim-cross-platform-sdk/.build/linux-arm64-gcc7 --profile:build /home/conan/workspace/nim-cross-platform-sdk/.build/linux-x86_64-gcc7 --settings:host build_type=Release --settings:build build_type=Release
Configuration (profile_host):
[settings]
arch=armv8
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=14
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
AR=aarch64-linux-gnu-ar
AS=aarch64-linux-gnu-as
CC=aarch64-linux-gnu-gcc
CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++
CMAKE_C_COMPILER=aarch64-linux-gnu-gcc
CXX=aarch64-linux-gnu-g++
CXXFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
FC=aarch64-linux-gnu-gfortran
LD=aarch64-linux-gnu-ld
RANLIB=aarch64-linux-gnu-ranlib
STRIP=aarch64-linux-gnu-strip
Configuration (profile_build):
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=14
compiler.libcxx=libstdc++11
compiler.version=7
os=Linux
[options]
[build_requires]
[env]
AR=ar
AS=as
CC=gcc
CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
CMAKE_CXX_COMPILER=g++
CMAKE_C_COMPILER=gcc
CXX=g++
CXXFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden
FC=gfortran
LD=ld
RANLIB=ranlib
STRIP=strip
Current platform: Linux
Current platform: Linux
Current platform: Linux
wayland/1.21.0: Forced build from source
wayland/1.21.0: Forced build from source
conanfile.py (nim/None): Installing package
Requirements
    aws-c-auth/0.6.11 from 'conancenter' - Cache
    aws-c-cal/0.5.13 from 'conancenter' - Cache
    aws-c-common/0.7.4 from 'conancenter' - Cache
    aws-c-compression/0.2.14 from 'conancenter' - Cache
    aws-c-event-stream/0.2.7 from 'conancenter' - Cache
    aws-c-http/0.6.13 from 'conancenter' - Cache
    aws-c-io/0.10.20 from 'conancenter' - Cache
    aws-c-mqtt/0.7.10 from 'conancenter' - Cache
    aws-c-s3/0.1.37 from 'conancenter' - Cache
    aws-c-sdkutils/0.1.2 from 'conancenter' - Cache
    aws-checksums/0.1.12 from 'conancenter' - Cache
    aws-crt-cpp/0.17.23 from 'conancenter' - Cache
    aws-sdk-cpp/1.9.234 from 'conancenter' - Cache
    brotli/1.0.9 from 'conancenter' - Cache
    bzip2/1.0.8 from 'conancenter' - Cache
    c-ares/1.18.1 from 'conancenter' - Cache
    double-conversion/3.2.1 from 'conancenter' - Cache
    expat/2.4.8 from 'conancenter' - Cache
    fontconfig/2.13.93 from 'conancenter' - Cache
    freetype/2.12.1 from 'conancenter' - Cache
    gtest/1.11.0 from 'conancenter' - Cache
    h_available/2.0.1-6-gfcab424c@yunxin/testing from 'NetEaseConan' - Cache
    icu/71.1 from 'conancenter' - Cache
    jsoncpp/1.9.4 from 'conancenter' - Cache
    libcurl/7.80.0 from 'conancenter' - Cache
    libevent/2.1.12 from 'conancenter' - Cache
    libffi/3.4.2 from 'conancenter' - Cache
    libiconv/1.17 from 'conancenter' - Cache
    libpng/1.6.38 from 'conancenter' - Cache
    libuuid/1.0.3 from 'conancenter' - Cache
    libuv/1.41.1 from 'conancenter' - Cache
    libxml2/2.9.14 from 'conancenter' - Cache
    md4c/0.4.8 from 'conancenter' - Cache
    ne_phoenix/0.2.0-alpha.95@yunxin/testing from 'NetEaseConan' - Cache
    nebase/v3.7.0-184-gae578453@yunxin/testing from 'NetEaseConan' - Cache
    nim_tools_http/1.1.0-21-gc39e9883@yunxin/testing from 'NetEaseConan' - Cache
    nlohmann_json/3.11.1 from 'conancenter' - Cache
    opengl/system from 'conancenter' - Cache
    openssl/1.1.1n from 'conancenter' - Cache
    pcre2/10.40 from 'conancenter' - Cache
    qt/5.15.4 from 'conancenter' - Cache
    s2n/1.3.15 from 'conancenter' - Cache
    sqlcipher/4.5.0 from 'conancenter' - Cache
    sqlite_orm/1.7.1@yunxin/testing from 'NetEaseConan' - Cache
    tinyNET/0.1.0-16-g8712eb90@yunxin/testing from 'NetEaseConan' - Cache
    tinySAK/0.1.0-9-g95b15110@yunxin/testing from 'NetEaseConan' - Cache
    wayland/1.21.0 from 'conancenter' - Cache
    wayland-protocols/1.26 from 'conancenter' - Cache
    xkbcommon/1.4.1 from 'conancenter' - Cache
    xorg/system from 'conancenter' - Cache
    zlib/1.2.12 from 'conancenter' - Cache
Packages
    aws-c-auth/0.6.11:fada56acb5cb475f2a5c7eefff2eb8ec73dbaf0e - Cache
    aws-c-cal/0.5.13:d12671bf878dfa48a237a8c28de040b06c9d4663 - Cache
    aws-c-common/0.7.4:fb6e7e290e2553e07fc113b3453fe91f0b116c57 - Cache
    aws-c-compression/0.2.14:72b377395006375e5b2f0a8f5f48ec60e4c33273 - Cache
    aws-c-event-stream/0.2.7:b51ed88bf817f0964f7051870bc23797601f911b - Cache
    aws-c-http/0.6.13:9171014dcb7980cb4943abb3812b217fcd8e4986 - Cache
    aws-c-io/0.10.20:dd1281739f92405f2b4fbedeedfb93d97ab58a13 - Cache
    aws-c-mqtt/0.7.10:ca4392cc0eb910bb2a030fefbaba23c557e8e908 - Cache
    aws-c-s3/0.1.37:36e7ff92f7904423bfa7feb43de71a7fee0d2113 - Cache
    aws-c-sdkutils/0.1.2:72b377395006375e5b2f0a8f5f48ec60e4c33273 - Cache
    aws-checksums/0.1.12:72b377395006375e5b2f0a8f5f48ec60e4c33273 - Cache
    aws-crt-cpp/0.17.23:641ee9f9b94ed8ca847a3dfb4b45b9ff95f67255 - Cache
    aws-sdk-cpp/1.9.234:26d0bb9f359d64916eb798a507e8941a66087b97 - Cache
    brotli/1.0.9:d282d846f8b69daf277177839276ed2a6a0b5b74 - Cache
    bzip2/1.0.8:75c0a8a066a2422a4e85cba63decf52760f1010c - Cache
    c-ares/1.18.1:07c788adfedd6794bc3148bc8c087c4c3a4013da - Cache
    double-conversion/3.2.1:4d653e2028a38fb67cd7250a8b911bb0cfd0dfaf - Cache
    expat/2.4.8:8ca280ee2b2069bbe2754a427afd38b56aff1751 - Cache
    fontconfig/2.13.93:1000ea44314d87684d0eaa834e3bf9090ac3f0a9 - Build
    freetype/2.12.1:2ba00e6a67421284baaa3dd4ad72a9e0a8369746 - Cache
    gtest/1.11.0:67f4268216091ad8dd11496a24299f32759b7b2f - Cache
    h_available/2.0.1-6-gfcab424c@yunxin/testing:bceb0be4480fa78b78c166143fafd09d238e2e8d - Cache
    icu/71.1:097f353942228b3d504a0e3c54e0b4f313a31e1f - Cache
    jsoncpp/1.9.4:4d653e2028a38fb67cd7250a8b911bb0cfd0dfaf - Cache
    libcurl/7.80.0:d6cd50c7259ae931fc65571f6c673fb227a6dbaf - Cache
    libevent/2.1.12:30f203e318472d4ab7eea1a7fcd6f6079856226d - Cache
    libffi/3.4.2:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
    libiconv/1.17:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
    libpng/1.6.38:4c8eccb3da689f218a0f97ca9fff2e839fcf7bef - Cache
    libuuid/1.0.3:8fd38d381db52e2495321ce060b9f457656f6c8f - Build
    libuv/1.41.1:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
    libxml2/2.9.14:567a33571ec0f7e332612d29d3ba19e5b4564386 - Cache
    md4c/0.4.8:dc9ada156f6a3aa934871a7f0e9b9720433423e6 - Cache
    ne_phoenix/0.2.0-alpha.95@yunxin/testing:b490c5c59511eedabcf466f331f81d0ca7b8bcab - Cache
    nebase/v3.7.0-184-gae578453@yunxin/testing:046dd26f560ab0c62313d432f0bfeed35e072787 - Cache
    nim_tools_http/1.1.0-21-gc39e9883@yunxin/testing:8456da1ffa820eb72228cee6f26ba0879a55c8f1 - Cache
    nlohmann_json/3.11.1:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    opengl/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    openssl/1.1.1n:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
    pcre2/10.40:b385f66ddacaea8f8dc6622d45204e1153b63ee8 - Cache
    qt/5.15.4:c36ecf625689b6d99429ed52eafea8615329886c - Build
    s2n/1.3.15:d718951f1563499e9f8560adb7e472bd9d34fd98 - Cache
    sqlcipher/4.5.0:a811ab77670567993474e31cc53f078ad73efaaa - Cache
    sqlite_orm/1.7.1@yunxin/testing:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    tinyNET/0.1.0-16-g8712eb90@yunxin/testing:0ae2d871d191b599291956c7c5039d06aef27260 - Cache
    tinySAK/0.1.0-9-g95b15110@yunxin/testing:4d653e2028a38fb67cd7250a8b911bb0cfd0dfaf - Cache
    wayland/1.21.0:e7fe6d00c2e8fadd056c0ec4c294fa6925173acb - Build
    wayland-protocols/1.26:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    xkbcommon/1.4.1:f7328dfc9c42fc6206d9144c8f150542e9ae693c - Build
    xorg/system:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    zlib/1.2.12:8fd38d381db52e2495321ce060b9f457656f6c8f - Cache
Build requirements
    autoconf/2.71 from 'conancenter' - Cache
    automake/1.16.5 from 'conancenter' - Cache
    bison/3.7.6 from 'conancenter' - Cache
    expat/2.4.8 from 'conancenter' - Cache
    gperf/3.1 from 'conancenter' - Cache
    libffi/3.4.2 from 'conancenter' - Cache
    libiconv/1.17 from 'conancenter' - Cache
    libtool/2.4.7 from 'conancenter' - Cache
    libxml2/2.9.14 from 'conancenter' - Cache
    m4/1.4.19 from 'conancenter' - Cache
    meson/0.63.1 from 'conancenter' - Cache
    meson/0.63.2 from 'conancenter' - Cache
    ninja/1.11.0 from 'conancenter' - Cache
    pkgconf/1.7.4 from 'conancenter' - Cache
    wayland/1.21.0 from 'conancenter' - Cache
    zlib/1.2.12 from 'conancenter' - Cache
Build requirements packages
    autoconf/2.71:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    automake/1.16.5:258f6f05ca54813b3d7180161753df7f9ccf7e1d - Cache
    bison/3.7.6:9f1c778deba9ba7575b39b11414cb4a9948c5487 - Cache
    expat/2.4.8:d2aa7fde96817bd9d6d001c15e0479bf82133afe - Cache
    gperf/3.1:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache
    libffi/3.4.2:d50a0d523d98c15bb147b18fa7d203887c38be8b - Cache
    libiconv/1.17:d50a0d523d98c15bb147b18fa7d203887c38be8b - Cache
    libtool/2.4.7:6fbe64f35b9d3eb3f534cbf1646451f40f718a31 - Cache
    libxml2/2.9.14:07753a3ecbad874f99f63d243fbb690a067a17be - Cache
    m4/1.4.19:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache
    meson/0.63.1:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    meson/0.63.2:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    ninja/1.11.0:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache
    pkgconf/1.7.4:24647d9fe8ec489125dfbae4b3ebefaf7581674c - Cache
    wayland/1.21.0:00d8f2e37c9112ad8417921edf0c46944c44bbab - Build
    zlib/1.2.12:d50a0d523d98c15bb147b18fa7d203887c38be8b - Cache

Cross-build from 'Linux:x86_64' to 'Linux:armv8'
Installing (downloading, building) binaries...
aws-c-common/0.7.4: Already installed!
brotli/1.0.9: Already installed!
bzip2/1.0.8: Already installed!
bzip2/1.0.8: Appending PATH environment variable: /home/conan/.conan/data/bzip2/1.0.8/_/_/package/75c0a8a066a2422a4e85cba63decf52760f1010c/bin
c-ares/1.18.1: Already installed!
c-ares/1.18.1: Appending PATH environment variable: /home/conan/.conan/data/c-ares/1.18.1/_/_/package/07c788adfedd6794bc3148bc8c087c4c3a4013da/bin
double-conversion/3.2.1: Already installed!
expat/2.4.8: Already installed!
expat/2.4.8: Already installed!
gperf/3.1: Already installed!
gperf/3.1: Appending PATH environment variable: /home/conan/.conan/data/gperf/3.1/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
gtest/1.11.0: Already installed!
icu/71.1: Already installed!
icu/71.1: Prepending to ICU_DATA runtime environment variable: /home/conan/.conan/data/icu/71.1/_/_/package/097f353942228b3d504a0e3c54e0b4f313a31e1f/res/icudt71l.dat
icu/71.1: Appending PATH environment variable: /home/conan/.conan/data/icu/71.1/_/_/package/097f353942228b3d504a0e3c54e0b4f313a31e1f/bin
jsoncpp/1.9.4: Already installed!
libffi/3.4.2: Already installed!
libffi/3.4.2: Already installed!
libiconv/1.17: Already installed!
libiconv/1.17: Appending PATH environment var: /home/conan/.conan/data/libiconv/1.17/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/bin
libiconv/1.17: Already installed!
libiconv/1.17: Appending PATH environment var: /home/conan/.conan/data/libiconv/1.17/_/_/package/8fd38d381db52e2495321ce060b9f457656f6c8f/bin
libiconv/1.17: Appending PATH environment var: /home/conan/.conan/data/libiconv/1.17/_/_/package/d50a0d523d98c15bb147b18fa7d203887c38be8b/bin
libuv/1.41.1: Already installed!
m4/1.4.19: Already installed!
m4/1.4.19: Appending PATH environment variable: /home/conan/.conan/data/m4/1.4.19/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
m4/1.4.19: Appending PATH environment variable: /home/conan/.conan/data/m4/1.4.19/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
md4c/0.4.8: Already installed!
md4c/0.4.8: Appending PATH environment variable: /home/conan/.conan/data/md4c/0.4.8/_/_/package/dc9ada156f6a3aa934871a7f0e9b9720433423e6/bin
ninja/1.11.0: Already installed!
nlohmann_json/3.11.1: Already installed!
opengl/system: Already installed!
openssl/1.1.1n: Already installed!
pkgconf/1.7.4: Already installed!
pkgconf/1.7.4: Appending PATH env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
pkgconf/1.7.4: Setting PKG_CONFIG env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/pkgconf
pkgconf/1.7.4: Appending AUTOMAKE_CONAN_INCLUDES env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/aclocal
pkgconf/1.7.4: Appending PATH env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
pkgconf/1.7.4: Setting PKG_CONFIG env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/pkgconf
pkgconf/1.7.4: Appending AUTOMAKE_CONAN_INCLUDES env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/aclocal
pkgconf/1.7.4: Appending PATH env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
pkgconf/1.7.4: Setting PKG_CONFIG env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/pkgconf
pkgconf/1.7.4: Appending AUTOMAKE_CONAN_INCLUDES env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/aclocal
pkgconf/1.7.4: Appending PATH env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
pkgconf/1.7.4: Setting PKG_CONFIG env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/pkgconf
pkgconf/1.7.4: Appending AUTOMAKE_CONAN_INCLUDES env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/aclocal
pkgconf/1.7.4: Appending PATH env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin
pkgconf/1.7.4: Setting PKG_CONFIG env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/pkgconf
pkgconf/1.7.4: Appending AUTOMAKE_CONAN_INCLUDES env var: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/aclocal
sqlite_orm/1.7.1@yunxin/testing: Already installed!
tinySAK/0.1.0-9-g95b15110@yunxin/testing: Already installed!
wayland-protocols/1.26: Already installed!
xorg/system: Already installed!
zlib/1.2.12: Already installed!
zlib/1.2.12: Already installed!
autoconf/2.71: Already installed!
autoconf/2.71: Appending PATH env var with : /home/conan/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
autoconf/2.71: Setting AC_MACRODIR to /home/conan/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/share/autoconf
autoconf/2.71: Setting AUTOCONF to /home/conan/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autoconf
autoconf/2.71: Setting AUTORECONF to /home/conan/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autoreconf
autoconf/2.71: Setting AUTOHEADER to /home/conan/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autoheader
autoconf/2.71: Setting AUTOM4TE to /home/conan/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/autom4te
autoconf/2.71: Setting AUTOM4TE_PERLLIBDIR to /home/conan/.conan/data/autoconf/2.71/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/share/autoconf
aws-c-cal/0.5.13: Already installed!
aws-c-compression/0.2.14: Already installed!
aws-c-sdkutils/0.1.2: Already installed!
aws-checksums/0.1.12: Already installed!
bison/3.7.6: Already installed!
bison/3.7.6: Setting BISON_ROOT environment variable: /home/conan/.conan/data/bison/3.7.6/_/_/package/9f1c778deba9ba7575b39b11414cb4a9948c5487
bison/3.7.6: Appending PATH environment variable: /home/conan/.conan/data/bison/3.7.6/_/_/package/9f1c778deba9ba7575b39b11414cb4a9948c5487/bin
bison/3.7.6: Setting the BISON_PKGDATADIR environment variable: /home/conan/.conan/data/bison/3.7.6/_/_/package/9f1c778deba9ba7575b39b11414cb4a9948c5487/res/bison
libcurl/7.80.0: Already installed!
libevent/2.1.12: Already installed!
libpng/1.6.38: Already installed!
libxml2/2.9.14: Already installed!
libxml2/2.9.14: Appending PATH environment variable: /home/conan/.conan/data/libxml2/2.9.14/_/_/package/567a33571ec0f7e332612d29d3ba19e5b4564386/bin
libxml2/2.9.14: Already installed!
libxml2/2.9.14: Appending PATH environment variable: /home/conan/.conan/data/libxml2/2.9.14/_/_/package/07753a3ecbad874f99f63d243fbb690a067a17be/bin
libxml2/2.9.14: Appending PATH environment variable: /home/conan/.conan/data/libxml2/2.9.14/_/_/package/07753a3ecbad874f99f63d243fbb690a067a17be/bin
meson/0.63.1: Already installed!
meson/0.63.1: Appending PATH environment variable: /home/conan/.conan/data/meson/0.63.1/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
meson/0.63.2: Already installed!
meson/0.63.2: Appending PATH environment variable: /home/conan/.conan/data/meson/0.63.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
meson/0.63.2: Appending PATH environment variable: /home/conan/.conan/data/meson/0.63.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
meson/0.63.2: Appending PATH environment variable: /home/conan/.conan/data/meson/0.63.2/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin
pcre2/10.40: Already installed!
pcre2/10.40: Appending PATH environment variable: /home/conan/.conan/data/pcre2/10.40/_/_/package/b385f66ddacaea8f8dc6622d45204e1153b63ee8/bin
s2n/1.3.15: Already installed!
sqlcipher/4.5.0: Already installed!
tinyNET/0.1.0-16-g8712eb90@yunxin/testing: Already installed!
automake/1.16.5: Already installed!
automake/1.16.5: Appending PATH environment variable:: /home/conan/.conan/data/automake/1.16.5/_/_/package/258f6f05ca54813b3d7180161753df7f9ccf7e1d/bin
automake/1.16.5: Appending ACLOCAL environment variable with: /home/conan/.conan/data/automake/1.16.5/_/_/package/258f6f05ca54813b3d7180161753df7f9ccf7e1d/bin/aclocal
automake/1.16.5: Setting AUTOMAKE_DATADIR to /home/conan/.conan/data/automake/1.16.5/_/_/package/258f6f05ca54813b3d7180161753df7f9ccf7e1d/res
automake/1.16.5: Setting AUTOMAKE_LIBDIR to /home/conan/.conan/data/automake/1.16.5/_/_/package/258f6f05ca54813b3d7180161753df7f9ccf7e1d/res/automake-1.16
automake/1.16.5: Setting AUTOMAKE_PERLLIBDIR to /home/conan/.conan/data/automake/1.16.5/_/_/package/258f6f05ca54813b3d7180161753df7f9ccf7e1d/res/automake-1.16
automake/1.16.5: Setting AUTOMAKE to /home/conan/.conan/data/automake/1.16.5/_/_/package/258f6f05ca54813b3d7180161753df7f9ccf7e1d/bin/automake
automake/1.16.5: Append M4 include directories to AUTOMAKE_CONAN_INCLUDES environment variable
aws-c-io/0.10.20: Already installed!
freetype/2.12.1: Already installed!
ne_phoenix/0.2.0-alpha.95@yunxin/testing: Already installed!
nebase/v3.7.0-184-gae578453@yunxin/testing: Already installed!
wayland/1.21.0: Applying build-requirement: meson/0.63.2
wayland/1.21.0: Applying build-requirement: pkgconf/1.7.4
wayland/1.21.0: Applying build-requirement: ninja/1.11.0
wayland/1.21.0: Copying sources to build folder
wayland/1.21.0: Building your package in /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab
wayland/1.21.0: Generator 'PkgConfigDeps' calling 'generate()'
wayland/1.21.0: Calling generate()
wayland/1.21.0: Aggregating env generators
wayland/1.21.0: Calling build()
wayland/1.21.0: Meson configure cmd: meson setup --native-file "/home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release/conan/conan_meson_native.ini" "/home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release" "/home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/src" -Dprefix="/home/conan/.conan/data/wayland/1.21.0/_/_/package/00d8f2e37c9112ad8417921edf0c46944c44bbab"
Capturing current environment in /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release/conan/deactivate_conanbuildenv-release-x86_64.sh
Configuring environment variables
Capturing current environment in /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release/conan/deactivate_conanrunenv-release-x86_64.sh
Configuring environment variables
The Meson build system
Version: 0.63.2
Source dir: /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/src
Build dir: /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release
Build type: native build
Project name: wayland
Project version: 1.21.0
C compiler for the host machine: gcc (gcc 7.5.0 "gcc (GCC) 7.5.0")
C linker for the host machine: gcc ld.bfd 2.37
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wno-unused-parameter: YES 
Compiler for C supports arguments -Wstrict-prototypes: YES 
Compiler for C supports arguments -Wmissing-prototypes: YES 
Compiler for C supports arguments -fvisibility=hidden: YES 
Has header "sys/prctl.h" : YES 
Has header "sys/procctl.h" : NO 
Has header "sys/ucred.h" : NO 
Checking for function "accept4" : YES 
Checking for function "mkostemp" : YES 
Checking for function "posix_fallocate" : YES 
Checking for function "prctl" : YES 
Checking for function "memfd_create" : NO 
Checking for function "mremap" : YES 
Checking for function "strndup" : YES 
Checking whether type "struct xucred" has member "cr_pid" : NO 
Found pkg-config: /home/conan/.conan/data/pkgconf/1.7.4/_/_/package/24647d9fe8ec489125dfbae4b3ebefaf7581674c/bin/pkgconf (1.7.4)
Found CMake: /opt/pyenv/versions/3.7.13/bin/cmake (3.24.1)
Run-time dependency libffi found: NO (tried pkgconfig and cmake)

../src/meson.build:80:1: ERROR: Dependency "libffi" not found, tried pkgconfig and cmake

A full log can be found at /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release/meson-logs/meson-log.txt
wayland/1.21.0: 
WARN: qt/5.15.4: requirement openssl/1.1.1q overridden by nim/None to openssl/1.1.1n 
WARN: nim_tools_http/1.1.0-21-gc39e9883@yunxin/testing: requirement nebase/v3.7.0-169-g05dc8430@yunxin/testing overridden by nim/None to nebase/v3.7.0-184-gae578453@yunxin/testing 
WARN: nebase/v3.7.0-184-gae578453@yunxin/testing: requirement zlib/1.2.11 overridden by nim_tools_http/1.1.0-21-gc39e9883@yunxin/testing to zlib/1.2.12 
WARN: libevent/2.1.12: requirement openssl/1.1.1q overridden by nebase/v3.7.0-184-gae578453@yunxin/testing to openssl/1.1.1n 
WARN: libcurl/7.80.0: requirement openssl/1.1.1q overridden by nebase/v3.7.0-184-gae578453@yunxin/testing to openssl/1.1.1n 
WARN: ne_phoenix/0.2.0-alpha.95@yunxin/testing: requirement sqlcipher/4.5.1 overridden by h_available/2.0.1-6-gfcab424c@yunxin/testing to sqlcipher/4.5.0 
WARN: ne_phoenix/0.2.0-alpha.95@yunxin/testing: requirement zlib/1.2.11 overridden by h_available/2.0.1-6-gfcab424c@yunxin/testing to zlib/1.2.12 
WARN: ne_phoenix/0.2.0-alpha.95@yunxin/testing: requirement openssl/1.1.1m overridden by h_available/2.0.1-6-gfcab424c@yunxin/testing to openssl/1.1.1n 
WARN: aws-sdk-cpp/1.9.234: requirement aws-c-common/0.6.19 overridden by h_available/2.0.1-6-gfcab424c@yunxin/testing to aws-c-common/0.7.4 
WARN: aws-c-cal/0.5.13: requirement aws-c-common/0.8.2 overridden by aws-sdk-cpp/1.9.234 to aws-c-common/0.7.4 
WARN: aws-c-cal/0.5.13: requirement openssl/1.1.1q overridden by aws-sdk-cpp/1.9.234 to openssl/1.1.1n 
WARN: aws-c-http/0.6.13: requirement aws-c-common/0.6.19 overridden by aws-sdk-cpp/1.9.234 to aws-c-common/0.7.4 
WARN: aws-c-compression/0.2.14: requirement aws-c-common/0.8.2 overridden by aws-c-http/0.6.13 to aws-c-common/0.7.4 
WARN: aws-c-io/0.10.20: requirement aws-c-common/0.8.2 overridden by aws-c-http/0.6.13 to aws-c-common/0.7.4 
WARN: s2n/1.3.15: requirement openssl/1.1.1q overridden by aws-c-io/0.10.20 to openssl/1.1.1n 
WARN: aws-crt-cpp/0.17.23: requirement aws-c-common/0.6.19 overridden by aws-sdk-cpp/1.9.234 to aws-c-common/0.7.4 
WARN: aws-c-event-stream/0.2.7: requirement aws-checksums/0.1.13 overridden by aws-crt-cpp/0.17.23 to aws-checksums/0.1.12 
WARN: aws-c-event-stream/0.2.7: requirement aws-c-common/0.8.2 overridden by aws-crt-cpp/0.17.23 to aws-c-common/0.7.4 
WARN: aws-c-event-stream/0.2.7: requirement aws-c-io/0.13.4 overridden by aws-crt-cpp/0.17.23 to aws-c-io/0.10.20 
WARN: aws-checksums/0.1.12: requirement aws-c-common/0.8.2 overridden by aws-c-event-stream/0.2.7 to aws-c-common/0.7.4 
WARN: aws-c-auth/0.6.11: requirement aws-c-common/0.6.19 overridden by aws-crt-cpp/0.17.23 to aws-c-common/0.7.4 
WARN: aws-c-sdkutils/0.1.2: requirement aws-c-common/0.8.2 overridden by aws-c-auth/0.6.11 to aws-c-common/0.7.4 
WARN: aws-c-mqtt/0.7.10: requirement aws-c-common/0.6.19 overridden by aws-crt-cpp/0.17.23 to aws-c-common/0.7.4 
WARN: aws-c-s3/0.1.37: requirement aws-c-common/0.6.19 overridden by aws-crt-cpp/0.17.23 to aws-c-common/0.7.4 
wayland/1.21.0: WARN: Build folder is dirty, removing it: /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab
wayland/1.21.0: ERROR: Package '00d8f2e37c9112ad8417921edf0c46944c44bbab' build failed
wayland/1.21.0: WARN: Build folder /home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release
ERROR: wayland/1.21.0: Error in build() method, line 108
        meson.configure()
        ConanException: Error 1 while executing meson setup --native-file "/home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release/conan/conan_meson_native.ini" "/home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/build-release" "/home/conan/.conan/data/wayland/1.21.0/_/_/build/00d8f2e37c9112ad8417921edf0c46944c44bbab/src" -Dprefix="/home/conan/.conan/data/wayland/1.21.0/_/_/package/00d8f2e37c9112ad8417921edf0c46944c44bbab"
CMake Error at build/conan.cmake:651 (message):
  Conan install failed='1'
Call Stack (most recent call first):
  CMakeLists.txt:73 (conan_cmake_install)
```

</details>



Discussion:

Resolving patch:
diff --git a/recipes/wayland/all/conanfile.py b/recipes/wayland/all/conanfile.py
--- a/recipes/wayland/all/conanfile.py
+++ b/recipes/wayland/all/conanfile.py
@@ -3,12 +3,13 @@
 from conan.tools.build import cross_building
 from conan.tools.env import VirtualBuildEnv, VirtualRunEnv
 from conan.tools.files import copy, get, replace_in_file, rmdir
+from conan.tools.gnu import PkgConfigDeps
 from conan.tools.layout import basic_layout
 from conan.tools.meson import Meson, MesonToolchain
 from conan.tools.scm import Version
 import os
 
-required_conan_version = ">=1.50.0"
+required_conan_version = ">=1.52.0"
 
 
 class WaylandConan(ConanFile):
@@ -36,11 +37,12 @@ class WaylandConan(ConanFile):
         "enable_dtd_validation": True,
     }
 
-    generators = "PkgConfigDeps"
-
     def configure(self):
         if self.options.shared:
-            del self.options.fPIC
+            try:
+                del self.options.fPIC
+            except Exception:
+                pass
         try:
             del self.settings.compiler.libcxx
         except Exception:
@@ -52,18 +54,18 @@ def configure(self):
 
     def requirements(self):
         if self.options.enable_libraries:
-            self.requires("libffi/3.4.2")
+            self.requires("libffi/3.4.3")
         if self.options.enable_dtd_validation:
             self.requires("libxml2/2.9.14")
-        self.requires("expat/2.4.8")
+        self.requires("expat/2.4.9")
 
     def validate(self):
         if self.info.settings.os != "Linux":
             raise ConanInvalidConfiguration("Wayland can be built on Linux only")
 
     def build_requirements(self):
-        self.tool_requires("meson/0.63.2")
-        self.tool_requires("pkgconf/1.7.4")
+        self.tool_requires("meson/0.63.3")
+        self.tool_requires("pkgconf/1.9.3")
         if cross_building(self):
             self.tool_requires(self.ref)
 
@@ -74,12 +76,21 @@ def source(self):
         get(self, **self.conan_data["sources"][self.version], strip_root=True)
 
     def generate(self):
+        pkg_config_deps = PkgConfigDeps(self)
+        if cross_building(self):
+            pkg_config_deps.build_context_activated = ["wayland"]
+        elif self.dependencies["expat"].is_build_context:  # wayland is being built as build_require
+                # If wayland is the build_require, all its dependencies are treated as build_requires
+                pkg_config_deps.build_context_activated = [dep.ref.name for _, dep in self.dependencies.host.items()]
+        pkg_config_deps.generate()
         tc = MesonToolchain(self)
         tc.project_options["libdir"] = "lib"
         tc.project_options["datadir"] = "res"
         tc.project_options["libraries"] = self.options.enable_libraries
         tc.project_options["dtd_validation"] = self.options.enable_dtd_validation
         tc.project_options["documentation"] = False
+        if cross_building(self):
+            tc.project_options["build.pkg_config_path"] = self.generators_folder
         if Version(self.version) >= "1.18.91":
             tc.project_options["scanner"] = True
         tc.generate()
@@ -94,14 +105,6 @@ def _patch_sources(self):
         replace_in_file(self, os.path.join(self.source_folder, "meson.build"),
                         "subdir('tests')", "#subdir('tests')")
 
-        if cross_building(self):
-            replace_in_file(self, f"{self.source_folder}/src/meson.build",
-                            "scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())",
-                                "# scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())")
-            replace_in_file(self, f"{self.source_folder}/src/meson.build",
-                            "wayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner'))",
-                                "wayland_scanner_for_build = find_program('wayland-scanner')")
-
     def build(self):
         self._patch_sources()
         meson = Meson(self)


Test patch: