conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
949 stars 1.73k forks source link

[package] boost/1.81.0: b2 not found when cross-compiling #15368

Open jwillikers opened 1 year ago

jwillikers commented 1 year ago

Description

When cross-compiling Boost on x86_64 to arm64, the b2 executable is not found by the recipe and the build fails.

Package and Environment Details

Conan profile

Configuration for profile yocto/debug:

[settings] os=Linux arch=armv8 compiler=gcc compiler.version=11 compiler.libcxx=libstdc++11 compiler.cppstd=20 build_type=Debug [options] boost:extra_b2_flags=cxxstd=20 compileflags=-march=armv8-a+crc+crypto compileflags=-mtune=cortex-a35 compileflags=--sysroot=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux [conf] tools.build:cflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a35'] tools.build:compiler_executables={'asm': 'aarch64-mycompany-linux-as', 'c': 'aarch64-mycompany-linux-gcc', 'cpp': 'aarch64-mycompany-linux-g++'} tools.build:cxxflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a35'] tools.build:exelinkflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a35'] tools.build:sharedlinkflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a35'] tools.build:sysroot=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux tools.cmake.cmaketoolchain:system_processor=aarch64 tools.cmake.cmaketoolchain:user_toolchain=['/var/home/jordan/.conan/toolchains/yocto.cmake'] [env] PATH=["'/usr/local/mycompany-sdk/sysroots/x86_64-mycompany-linux/sysroots/x86_64-mycompany-linux/usr/bin/aarch64-mycompany-linux'"] CONAN_CMAKE_TOOLCHAIN_FILE=['"/var/home/jordan/.conan/toolchains/yocto.cmake"'] CC=aarch64-mycompany-linux-gcc -march=armv8-a+crc+crypto -mtune=cortex-a35 --sysroot=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux CXX=aarch64-mycompany-linux-g++ -march=armv8-a+crc+crypto -mtune=cortex-a35 --sysroot=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux CPP=aarch64-mycompany-linux-gcc -E -march=armv8-a+crc+crypto -mtune=cortex-a35 --sysroot=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux AS=aarch64-mycompany-linux-as LD=aarch64-mycompany-linux-ld -march=armv8-a+crc+crypto -mtune=cortex-a35 --sysroot=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux GDB=aarch64-mycompany-linux-gdb STRIP=aarch64-mycompany-linux-strip RANLIB=aarch64-mycompany-linux-ranlib OBJCOPY=aarch64-mycompany-linux-objcopy OBJDUMP=aarch64-mycompany-linux-objdump AR=aarch64-mycompany-linux-ar NM=aarch64-mycompany-linux-nm M4=m4 TARGET_PREFIX=aarch64-mycompany-linux- ARCH=arm64 CONFIGURE_FLAGS=--target=aarch64-mycompany-linux --host=aarch64-mycompany-linux --build=x86_64-linux --with-libtool-sysroot=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux OE_CMAKE_TOOLCHAIN_FILE=/usr/local/mycompany-sdk/sysroots/x86_64-mycompany-linux/usr/share/cmake/OEToolchainConfig.cmake OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX=echo lib | sed -e s/lib// PKG_CONFIG_SYSROOT_MAP=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux PKG_CONFIG_PATH=/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux/usr/lib/pkgconfig:/usr/local/mycompany-sdk/sysroots/cortexa35-mycompany-linux/usr/share/pkgconfig CONFIG_SITE=/usr/local/mycompany-sdk/site-config-cortexa35-mycompany-linux OECORE_TARGET_ARCH=aarch64 OECORE_TARGET_OS=linux

Steps to reproduce

cd recipes/boost/all conan create . boost/1.81.0@ -pr yocto/debug -u -b outdated -b cascade -o:h 'boost/*:without_stacktrace=True'

Logs

Click to expand log ``` [HOOK - conan-center.py] pre_export(): [DEPRECATED GLOBAL CPPSTD (KB-H001)] OK [HOOK - conan-center.py] pre_export(): [REFERENCE LOWERCASE (KB-H002)] OK [HOOK - conan-center.py] pre_export(): [RECIPE METADATA (KB-H003)] OK [HOOK - conan-center.py] pre_export(): [HEADER_ONLY, NO COPY SOURCE (KB-H005)] OK [HOOK - conan-center.py] pre_export(): [FPIC OPTION (KB-H006)] OK [HOOK - conan-center.py] pre_export(): [VERSION RANGES (KB-H008)] OK [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] Total recipe size: 250.4345703125 KB [HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] OK [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None [HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] OK [HOOK - conan-center.py] pre_export(): [TEST PACKAGE FOLDER (KB-H024)] OK [HOOK - conan-center.py] pre_export(): [META LINES (KB-H025)] OK [HOOK - conan-center.py] pre_export(): [CONAN CENTER INDEX URL (KB-H027)] OK [HOOK - conan-center.py] pre_export(): [CMAKE MINIMUM VERSION (KB-H028)] OK [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - RUN ENVIRONMENT (KB-H029)] OK [HOOK - conan-center.py] pre_export(): [SYSTEM REQUIREMENTS (KB-H032)] OK [HOOK - conan-center.py] pre_export(): [CONANDATA.YML FORMAT (KB-H030)] OK [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO IMPORTS() (KB-H034)] OK [HOOK - conan-center.py] pre_export(): [NO AUTHOR (KB-H037)] OK [HOOK - conan-center.py] pre_export(): [NOT ALLOWED ATTRIBUTES (KB-H039)] OK [HOOK - conan-center.py] pre_export(): [NO TARGET NAME (KB-H040)] OK [HOOK - conan-center.py] pre_export(): [NO FINAL ENDLINE (KB-H041)] OK [HOOK - conan-center.py] pre_export(): [NO REQUIRES.ADD() (KB-H044)] OK [HOOK - conan-center.py] pre_export(): [DELETE OPTIONS (KB-H045)] OK [HOOK - conan-center.py] pre_export(): [CMAKE VERBOSE MAKEFILE (KB-H046)] OK [HOOK - conan-center.py] pre_export(): [CMAKE VERSION REQUIRED (KB-H048)] OK [HOOK - conan-center.py] pre_export(): [CMAKE WINDOWS EXPORT ALL SYMBOLS (KB-H049)] OK [HOOK - conan-center.py] pre_export(): [DEFAULT OPTIONS AS DICTIONARY (KB-H051)] OK [HOOK - conan-center.py] pre_export(): [CONFIG.YML HAS NEW VERSION (KB-H052)] OK [HOOK - conan-center.py] pre_export(): [PRIVATE IMPORTS (KB-H053)] OK [HOOK - conan-center.py] pre_export(): [SINGLE REQUIRES (KB-H055)] OK [HOOK - conan-center.py] pre_export(): [TOOLS RENAME (KB-H057)] OK [HOOK - conan-center.py] pre_export(): [ILLEGAL CHARACTERS (KB-H058)] OK [HOOK - conan-center.py] pre_export(): [CLASS NAME (KB-H059)] OK [HOOK - conan-center.py] pre_export(): [NO CRLF (KB-H060)] OK [HOOK - conan-center.py] pre_export(): [NO BUILD SYSTEM FUNCTIONS (KB-H061)] OK [HOOK - conan-center.py] pre_export(): [TOOLS CROSS BUILDING (KB-H062)] OK [HOOK - conan-center.py] pre_export(): [INVALID TOPICS (KB-H064)] OK [HOOK - conan-center.py] pre_export(): [NO REQUIRED_CONAN_VERSION (KB-H065)] OK [HOOK - conan-center.py] pre_export(): [TEST_TYPE MANAGEMENT (KB-H068)] OK [HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO DEFAULT OPTIONS (KB-H069)] OK [HOOK - conan-center.py] pre_export(): [MANDATORY SETTINGS (KB-H070)] OK [HOOK - conan-center.py] pre_export(): [PYLINT EXECUTION (KB-H072)] OK [HOOK - conan-center.py] pre_export(): [TEST V1 PACKAGE FOLDER (KB-H073)] OK [HOOK - conan-center.py] pre_export(): [REQUIREMENT OVERRIDE PARAMETER (KB-H075)] OK Exporting package recipe boost/1.81.0 exports: File 'conandata.yml' found. Exporting it... boost/1.81.0 exports: Copied 1 '.yml' file: conandata.yml boost/1.81.0: Calling export() boost/1.81.0: Copied 1 '.yml' file: dependencies-1.81.0.yml boost/1.81.0: Calling export_sources() [HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] Saving conandata.yml: {'sources': {'1.81.0': {'url': ['https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2', 'https://sourceforge.net/projects/boost/files/boost/1.81.0/boost_1_81_0.tar.bz2'], 'sha256': '71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa'}}, 'patches': {'1.81.0': [{'patch_file': 'patches/boost_1_77_mpi_check.patch', 'patch_description': 'Fails the build when mpi is not configured', 'patch_type': 'conan'}, {'patch_file': 'patches/1.81.0-locale-fail-on-missing-backend.patch', 'patch_description': 'Fails the build when there is no iconv backend', 'patch_type': 'conan'}]}} [HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] New conandata.yml contents: patches: 1.81.0: - patch_description: Fails the build when mpi is not configured patch_file: patches/boost_1_77_mpi_check.patch patch_type: conan - patch_description: Fails the build when there is no iconv backend patch_file: patches/1.81.0-locale-fail-on-missing-backend.patch patch_type: conan sources: 1.81.0: sha256: 71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa url: - https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2 - https://sourceforge.net/projects/boost/files/boost/1.81.0/boost_1_81_0.tar.bz2 [HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] OK [HOOK - conan-center.py] post_export(): [DEFAULT SHARED OPTION VALUE (KB-H050)] OK [HOOK - conan-center.py] post_export(): [LICENSE PUBLIC DOMAIN (KB-H056)] OK boost/1.81.0: The stored package has not changed boost/1.81.0: Using the exported files summary hash as the recipe revision: 0aca3d1f3a8d8b2f46886c7c26da599d boost/1.81.0: Exported revision: 0aca3d1f3a8d8b2f46886c7c26da599d Configuration (profile_host): [settings] arch=armv8 arch.extensions=crc+crypto arch.processor=cortex-a72.cortex-a53 build_type=Debug compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=11 os=Linux [options] boost:extra_b2_flags=cxxstd=20 compileflags=-march=armv8-a+crc+crypto compileflags=-mtune=cortex-a72.cortex-a53 compileflags=--sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux boost:without_stacktrace=True [build_requires] [env] AR=aarch64-mycompany-linux-ar ARCH=arm64 AS=aarch64-mycompany-linux-as CC=aarch64-mycompany-linux-gcc -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux CONAN_CMAKE_TOOLCHAIN_FILE=["/var/home/jordan/.conan/toolchains/yocto.cmake"] CONFIGURE_FLAGS=--target=aarch64-mycompany-linux --host=aarch64-mycompany-linux --build=x86_64-linux --with-libtool-sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux CONFIG_SITE=/usr/local/mycompany-raptor-sdk/site-config-cortexa72-cortexa53-crypto-mycompany-linux CPP=aarch64-mycompany-linux-gcc -E -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux CXX=aarch64-mycompany-linux-g++ -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux GDB=aarch64-mycompany-linux-gdb LD=aarch64-mycompany-linux-ld -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux M4=m4 NM=aarch64-mycompany-linux-nm OBJCOPY=aarch64-mycompany-linux-objcopy OBJDUMP=aarch64-mycompany-linux-objdump OECORE_TARGET_ARCH=aarch64 OECORE_TARGET_OS=linux OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX=`echo lib | sed -e s/lib//` OE_CMAKE_TOOLCHAIN_FILE=/usr/local/mycompany-raptor-sdk/sysroots/x86_64-mycompany-linux/usr/share/cmake/OEToolchainConfig.cmake PATH=['/usr/local/mycompany-raptor-sdk/sysroots/x86_64-mycompany-linux/sysroots/x86_64-mycompany-linux/usr/bin/aarch64-mycompany-linux'] PKG_CONFIG_PATH=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux/usr/lib/pkgconfig:/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux/usr/share/pkgconfig PKG_CONFIG_SYSROOT_MAP=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux RANLIB=aarch64-mycompany-linux-ranlib STRIP=aarch64-mycompany-linux-strip TARGET_PREFIX=aarch64-mycompany-linux- [conf] tools.env.virtualenv:auto_use=True tools.cmake.cmake_layout:build_folder_vars=['settings.arch', 'settings.compiler', 'options.platform', 'options.shared'] tools.cmake.cmaketoolchain:find_package_prefer_config=True tools.cmake.cmaketoolchain:generator=Ninja tools.system.package_manager:mode=install tools.system.package_manager:sudo=True tools.build:compiler_executables={'asm': 'aarch64-mycompany-linux-as', 'c': 'aarch64-mycompany-linux-gcc', 'cpp': 'aarch64-mycompany-linux-g++'} tools.build:cflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a72.cortex-a53'] tools.build:cxxflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a72.cortex-a53'] tools.build:exelinkflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a72.cortex-a53'] tools.build:sharedlinkflags=['-march=armv8-a+crc+crypto', '-mtune=cortex-a72.cortex-a53'] tools.build:sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux tools.cmake.cmaketoolchain:system_processor=aarch64 tools.cmake.cmaketoolchain:user_toolchain=['/var/home/jordan/.conan/toolchains/yocto.cmake'] [buildenv] PATH=['/usr/local/mycompany-raptor-sdk/sysroots/x86_64-mycompany-linux/sysroots/x86_64-mycompany-linux/usr/bin/aarch64-mycompany-linux'] CONAN_CMAKE_TOOLCHAIN_FILE=["/var/home/jordan/.conan/toolchains/yocto.cmake"] CC=aarch64-mycompany-linux-gcc -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux CXX=aarch64-mycompany-linux-g++ -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux CPP=aarch64-mycompany-linux-gcc -E -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux AS=aarch64-mycompany-linux-as LD=aarch64-mycompany-linux-ld -march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53 --sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux GDB=aarch64-mycompany-linux-gdb STRIP=aarch64-mycompany-linux-strip RANLIB=aarch64-mycompany-linux-ranlib OBJCOPY=aarch64-mycompany-linux-objcopy OBJDUMP=aarch64-mycompany-linux-objdump AR=aarch64-mycompany-linux-ar NM=aarch64-mycompany-linux-nm M4=m4 TARGET_PREFIX=aarch64-mycompany-linux- ARCH=arm64 CONFIGURE_FLAGS=--target=aarch64-mycompany-linux --host=aarch64-mycompany-linux --build=x86_64-linux --with-libtool-sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux OE_CMAKE_TOOLCHAIN_FILE=/usr/local/mycompany-raptor-sdk/sysroots/x86_64-mycompany-linux/usr/share/cmake/OEToolchainConfig.cmake OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo lib | sed -e s/lib//`" PKG_CONFIG_SYSROOT_MAP=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux PKG_CONFIG_PATH=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux/usr/lib/pkgconfig:/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux/usr/share/pkgconfig CONFIG_SITE=/usr/local/mycompany-raptor-sdk/site-config-cortexa72-cortexa53-crypto-mycompany-linux OECORE_TARGET_ARCH="aarch64" OECORE_TARGET_OS="linux" Configuration (profile_build): [settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=12 os=Linux [options] [build_requires] [env] [conf] tools.env.virtualenv:auto_use=True tools.cmake.cmake_layout:build_folder_vars=['settings.arch', 'settings.compiler', 'options.platform', 'options.shared'] tools.cmake.cmaketoolchain:find_package_prefer_config=True tools.cmake.cmaketoolchain:generator=Ninja tools.system.package_manager:mode=install tools.system.package_manager:sudo=True bzip2/1.0.8: WARN: Can't update, no package in remote bzip2/1.0.8: Package is up to date zlib/1.2.13: Package is up to date b2/4.9.3: Package is up to date boost/1.81.0 (test package): Installing package Requirements boost/1.81.0 from 'conancenter' - Cache bzip2/1.0.8 from 'conancenter' - Cache zlib/1.2.13 from 'conancenter' - Cache Packages boost/1.81.0:85cad237076e3f94b582831a58d4b5bef1773758 - Build bzip2/1.0.8:031c7e2b156578299e5c115231e8a9b01c67dd2a - Cache zlib/1.2.13:7d573acb8003126c25d1f362d807e5549ec62799 - Cache Build requirements b2/4.9.3 from 'conancenter' - Cache Build requirements packages b2/4.9.3:4db1be536558d833e52e862fd84d64d75c2b3656 - Cache Cross-build from 'Linux:x86_64' to 'Linux:armv8' Installing (downloading, building) binaries... b2/4.9.3: Already installed! bzip2/1.0.8: Already installed! zlib/1.2.13: Already installed! boost/1.81.0: Applying build-requirement: b2/4.9.3 boost/1.81.0: Building your package in /var/home/jordan/.conan/data/boost/1.81.0/_/_/build/85cad237076e3f94b582831a58d4b5bef1773758 boost/1.81.0: Generator txt created conanbuildinfo.txt boost/1.81.0: Calling generate() boost/1.81.0: Aggregating env generators [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK. 'fPIC' option found and apparently well managed [HOOK - conan-center.py] pre_build(): [FPIC MANAGEMENT (KB-H007)] OK boost/1.81.0: Calling build() boost/1.81.0: WARN: replace_in_file didn't find pattern '$(>) > $(<)' in '/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/libs/stacktrace/build/Jamfile.v2' file. boost/1.81.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.81.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.81.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/tools/build/src/tools/gcc.jam' file. boost/1.81.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/tools/build/src/tools/gcc.jam' file. boost/1.81.0: WARN: replace_in_file didn't /notificationsfind pattern ' @numa' in '/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/libs/fiber/build/Jamfile.v2' file. boost/1.81.0: WARN: Patching user-config.jam boost/1.81.0: WARN: using zlib : 1.2.13 : "/var/home/jordan/.conan/data/zlib/1.2.13/_/_/package/7d573acb8003126c25d1f362d807e5549ec62799/include" "/var/home/jordan/.conan/data/zlib/1.2.13/_/_/package/7d573acb8003126c25d1f362d807e5549ec62799/lib" z ; using bzip2 : 1.0.8 : "/var/home/jordan/.conan/data/bzip2/1.0.8/_/_/package/031c7e2b156578299e5c115231e8a9b01c67dd2a/include" "/var/home/jordan/.conan/data/bzip2/1.0.8/_/_/package/031c7e2b156578299e5c115231e8a9b01c67dd2a/lib" bz2 ; using "gcc" : : "aarch64-mycompany-linux-g++" : "aarch64-mycompany-linux-ar" "aarch64-mycompany-linux-ranlib" "-march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53" "-march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53" "-march=armv8-a+crc+crypto -mtune=cortex-a72.cortex-a53" ; boost/1.81.0: Cross building, detecting compiler... boost/1.81.0: Cross building flags: [] boost/1.81.0: WARN: b2 -q numa=on target-os=linux architecture=arm address-model=64 binary-format=elf abi=aapcs --layout=system --user-config=/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libc threading=multi visibility=hidden link=static variant=debug --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=gcc cxxflags=-std=c++2a define=_GLIBCXX_USE_CXX11_ABI=1 pch=on linkflags="" cxxflags="-fPIC" cxxstd=20 compileflags=-march=armv8-a+crc+crypto compileflags=-mtune=cortex-a72.cortex-a53 compileflags=--sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux install --prefix=/var/home/jordan/.conan/data/boost/1.81.0/_/_/package/85cad237076e3f94b582831a58d4b5bef1773758 -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="/var/home/jordan/.conan/data/boost/1.81.0/_/_/build/85cad237076e3f94b582831a58d4b5bef1773758/build-debug" /bin/sh: line 1: b2: command not found boost/1.81.0: boost/1.81.0: ERROR: Package '85cad237076e3f94b582831a58d4b5bef1773758' build failed boost/1.81.0: WARN: Build folder /var/home/jordan/.conan/data/boost/1.81.0/_/_/build/85cad237076e3f94b582831a58d4b5bef1773758/build-debug ERROR: boost/1.81.0: Error in build() method, line 872 self.run(full_command) ConanException: Error 127 while executing b2 -q numa=on target-os=linux architecture=arm address-model=64 binary-format=elf abi=aapcs --layout=system --user-config=/var/home/jordan/.conan/data/boost/1.81.0/_/_/source/src/tools/build/user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=on boost.locale.iconv.lib=libc threading=multi visibility=hidden link=static variant=debug --with-atomic --with-chrono --with-container --with-context --with-contract --with-coroutine --with-date_time --with-exception --with-fiber --with-filesystem --with-graph --with-iostreams --with-json --with-locale --with-log --with-math --with-nowide --with-program_options --with-random --with-regex --with-serialization --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=gcc cxxflags=-std=c++2a define=_GLIBCXX_USE_CXX11_ABI=1 pch=on linkflags="" cxxflags="-fPIC" cxxstd=20 compileflags=-march=armv8-a+crc+crypto compileflags=-mtune=cortex-a72.cortex-a53 compileflags=--sysroot=/usr/local/mycompany-raptor-sdk/sysroots/cortexa72-cortexa53-crypto-mycompany-linux install --prefix=/var/home/jordan/.conan/data/boost/1.81.0/_/_/package/85cad237076e3f94b582831a58d4b5bef1773758 -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="/var/home/jordan/.conan/data/boost/1.81.0/_/_/build/85cad237076e3f94b582831a58d4b5bef1773758/build-debug" ```
coofercat commented 1 year ago

FWIW, I have the same with boost/1.79, and haven't found a solution. https://github.com/conan-io/conan-center-index/issues/14767 talks about duplicating the [env] to [buildenv] which didn't work in my case. I can't be 100% certain, but I think the b2 problem started around the time of the recipe changes that #14767 talks about - certainly, we had to fix our builds around that time because of those recipe changes, and have had to do direct-compile our aarch64 conan packages to solve the 'b2' problem since then.

If it matters, my profile settings are a lot simpler than above:

target_host=aarch64-none-linux-gnu # also tried aarch64-linux-gnu
standalone_toolchain=/toolchain/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
# also tried toolchain=/usr/aarch64-linux/gnu using standard Ubuntu apt packages
cc_compiler=gcc
cxx_compiler=g++

[env]
CONAN_CMAKE_FIND_ROOT_PATH=$standalone_toolchain
PATH=[$standalone_toolchain/bin]
CHOST=$target_host
AR=$target_host-ar
AS=$target_host-as
RANLIB=$target_host-ranlib
LD=$target_host-ld
STRIP=$target_host-strip
CC=$target_host-$cc_compiler
CXX=$target_host-$cxx_compiler

[buildenv]
CONAN_CMAKE_FIND_ROOT_PATH=$standalone_toolchain
PATH=[$standalone_toolchain/bin]
CHOST=$target_host
AR=$target_host-ar
AS=$target_host-as
RANLIB=$target_host-ranlib
LD=$target_host-ld
STRIP=$target_host-strip
CC=$target_host-$cc_compiler
CXX=$target_host-$cxx_compiler

[settings]
os=Linux
arch=armv8
compiler=gcc
compiler.version=9
compiler.libcxx=libstdc++11
build_type=Debug

I would really appreciate any help figuring out a way to solve this problem - right now we're direct-compiling our conan packages on Arm and then passing a tarball around to use on laptops/CI to cross-compile our application.

jwillikers commented 1 year ago

I figured out at least the first part where b2 isn't found. My PATH variable was getting put together all wrong because it wasn't using the correct syntax. I had to use the following to configure PATH in the buildenv section.

[buildenv]
PATH=+(path)/path/to/cross-compiler/bin

You can use =+ to prepend or += to append.

Of course, Boost still doesn't cross-compile for me, but that must be due to something else.