Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Boost 1.85.0] boost/1.85.0: Fail to cross compile using LLVM clang #24981

Open
av4625 opened this issue Aug 18, 2024 · 4 comments
Open

[Boost 1.85.0] boost/1.85.0: Fail to cross compile using LLVM clang #24981

av4625 opened this issue Aug 18, 2024 · 4 comments
Assignees
Labels
bug Something isn't working requires reporter action Waiting on issue reporter

Comments

@av4625
Copy link

av4625 commented Aug 18, 2024

Description

I am unable to cross compile boost using LLVM clang version 18.
I installed LLVM clang using:

brew install llvm

When I try to build boost using a separate build and host profile it fails. The header files it can't find are in the sysroot in an expected place.

I am able to build gtest and nlohmann_json using the same command and profiles. Building the dependencies for boost also seems to work fine.

I think it might be a linker issue, like it might be using the wrong one or something, or not using the sysroot properly but not sure.

This is the command to build one file using clang as a cross compiler incase this helps.

/usr/local/opt/llvm/bin/clang++ --target=armv7a-linux-gnueabihf --sysroot=orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a+fp -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -fuse-ld=lld main.cpp -o cross_compile_test

Package and Environment Details

  • Package Name/Version: boost/1.85.0
  • Operating System+version: MacOS 12.7.6
  • Compiler+version: LLVM Clang 18.1
  • Docker image: NA
  • Conan version: 1.65.0
  • Python version: Python 3.12.5

Conan profile

Build Profile

[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=14
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

Host Profile

[settings]
arch=armv7hf
arch_build=armv7hf
build_type=Release
compiler=clang
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=18
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
AR=/usr/local/opt/llvm/bin/llvm-ar
AS=/usr/local/opt/llvm/bin/llvm-as
CC=/usr/local/opt/llvm/bin/clang
CFLAGS=--target=armv7a-linux-gnueabihf --sysroot=orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld
CHOST=arm-linux-gnueabihf
CONAN_CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
CXX=/usr/local/opt/llvm/bin/clang++
CXXFLAGS=--target=armv7a-linux-gnueabihf --sysroot=orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld
LDFLAGS=-fuse-ld=lld
RANLIB=/usr/local/opt/llvm/bin/llvm-ranlib
STRIP=/usr/local/opt/llvm/bin/llvm-strip
SYSROOT=orangepi_sysroot
[buildenv]
CHOST=arm-linux-gnueabihf
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
CONAN_CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
AR=/usr/local/opt/llvm/bin/llvm-ar
AS=/usr/local/opt/llvm/bin/llvm-as
RANLIB=/usr/local/opt/llvm/bin/llvm-ranlib
LDFLAGS=-fuse-ld=lld
STRIP=/usr/local/opt/llvm/bin/llvm-strip
CC=/usr/local/opt/llvm/bin/clang
CXX=/usr/local/opt/llvm/bin/clang++
SYSROOT=orangepi_sysroot
CFLAGS=--target=armv7a-linux-gnueabihf --sysroot=orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld
CXXFLAGS=--target=armv7a-linux-gnueabihf --sysroot=orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld

I have tried adding this to the host profile as well: LD=/usr/local/opt/llvm/bin/ld.lld.

I have also tried adding and removing -fuse-ld=lld from the C, CXX and LD flags.

Steps to reproduce

conan install -r conancenter boost/1.85.0@ -pr:b=default -pr:h=host_profile --update --build missing

Logs

Click to expand log
% conan install -r conancenter boost/1.85.0@ -pr:b=default -pr:h=host_profile --update --build missing

WARN: **************************************************
WARN: *** Conan 1 is legacy and on a deprecation path **
WARN: *********** Please upgrade to Conan 2 ************
WARN: **************************************************
Configuration (profile_host):
[settings]
arch=armv7hf
arch_build=armv7hf
build_type=Release
compiler=clang
compiler.cppstd=17
compiler.libcxx=libstdc++11
compiler.version=18
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
AR=/usr/local/opt/llvm/bin/llvm-ar
AS=/usr/local/opt/llvm/bin/llvm-as
CC=/usr/local/opt/llvm/bin/clang
CFLAGS=--target=armv7a-linux-gnueabihf --sysroot=/Users/<user>/Downloads/test_cross_compile/orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld
CHOST=arm-linux-gnueabihf
CONAN_CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
CXX=/usr/local/opt/llvm/bin/clang++
CXXFLAGS=--target=armv7a-linux-gnueabihf --sysroot=/Users/<user>/Downloads/test_cross_compile/orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld
LD=/usr/local/opt/llvm/bin/ld.lld
LDFLAGS=-fuse-ld=lld
RANLIB=/usr/local/opt/llvm/bin/llvm-ranlib
STRIP=/usr/local/opt/llvm/bin/llvm-strip
SYSROOT=orangepi_sysroot
[buildenv]
CHOST=arm-linux-gnueabihf
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
CONAN_CMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
CONAN_CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
AR=/usr/local/opt/llvm/bin/llvm-ar
AS=/usr/local/opt/llvm/bin/llvm-as
RANLIB=/usr/local/opt/llvm/bin/llvm-ranlib
LD=/usr/local/opt/llvm/bin/ld.lld
LDFLAGS=-fuse-ld=lld
STRIP=/usr/local/opt/llvm/bin/llvm-strip
CC=/usr/local/opt/llvm/bin/clang
CXX=/usr/local/opt/llvm/bin/clang++
SYSROOT=orangepi_sysroot
CFLAGS=--target=armv7a-linux-gnueabihf --sysroot=/Users/<user>/Downloads/test_cross_compile/orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld
CXXFLAGS=--target=armv7a-linux-gnueabihf --sysroot=/Users/<user>/Downloads/test_cross_compile/orangepi_sysroot -mfloat-abi=hard -mthumb -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv3 -Wno-psabi -stdlib=libstdc++ -v -fuse-ld=lld

Configuration (profile_build):
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=14
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

bzip2/1.0.8: WARN: Can't update, no package in remote
libbacktrace/cci.20210118: WARN: Can't update, no package in remote
zlib/1.3.1: WARN: Can't update, no package in remote
boost/1.85.0: WARN: Package binary is corrupted, removing: 19223fce9fab9ecb8ab404706f29ee0ce239137c
Version ranges solved
    zlib/* versions found in 'conancenter' remote
    Version range '>=1.2.11 <2' required by 'boost/1.85.0' resolved to 'zlib/1.3.1' in remote 'conancenter'
    b2/* versions found in 'conancenter' remote
    Version range '>=5.2 <6' required by 'boost/1.85.0' resolved to 'b2/5.2.1' in remote 'conancenter'

Installing package: boost/1.85.0
Requirements
    boost/1.85.0 from 'conancenter' - Cache
    bzip2/1.0.8 from 'conancenter' - Cache
    libbacktrace/cci.20210118 from 'conancenter' - Cache
    zlib/1.3.1 from 'conancenter' - Cache
Packages
    boost/1.85.0:19223fce9fab9ecb8ab404706f29ee0ce239137c - Build
    bzip2/1.0.8:73d96a7f3102e40cbf2597973d121a5ee8bb3fb1 - Cache
    libbacktrace/cci.20210118:f84964be2ccc0752e33b3114c0e273f98e4b656d - Cache
    zlib/1.3.1:f84964be2ccc0752e33b3114c0e273f98e4b656d - Cache
Build requirements
    b2/5.2.1 from 'conancenter' - Cache
Build requirements packages
    b2/5.2.1:4e1751b0fa83186dec61c3f59d918b6b17b28aad - Cache

Cross-build from 'Macos:x86_64' to 'Linux:armv7hf'
Installing (downloading, building) binaries...
b2/5.2.1: Already installed!
bzip2/1.0.8: Already installed!
libbacktrace/cci.20210118: Already installed!
zlib/1.3.1: Already installed!
boost/1.85.0: Applying build-requirement: b2/5.2.1
boost/1.85.0: WARN: Build folder is dirty, removing it: /Users/<user>/.conan/data/boost/1.85.0/_/_/build/19223fce9fab9ecb8ab404706f29ee0ce239137c
boost/1.85.0: Building your package in /Users/<user>/.conan/data/boost/1.85.0/_/_/build/19223fce9fab9ecb8ab404706f29ee0ce239137c
boost/1.85.0: Generator txt created conanbuildinfo.txt
boost/1.85.0: Calling generate()
boost/1.85.0: Aggregating env generators
boost/1.85.0: Calling build()
boost/1.85.0: WARN: replace_in_file didn't find pattern '$(>) > $(<)' in '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/libs/stacktrace/build/Jamfile.v2' file.
boost/1.85.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
boost/1.85.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file.
boost/1.85.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/tools/build/src/tools/gcc.jam' file.
boost/1.85.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/tools/build/src/tools/gcc.jam' file.
boost/1.85.0: WARN: replace_in_file didn't find pattern '    <conditional>@numa' in '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/libs/fiber/build/Jamfile.v2' file.
boost/1.85.0: WARN: Patching user-config.jam
boost/1.85.0: WARN: 
using zlib : 1.3.1 : <include>"/Users/<user>/.conan/data/zlib/1.3.1/_/_/package/f84964be2ccc0752e33b3114c0e273f98e4b656d/include" <search>"/Users/<user>/.conan/data/zlib/1.3.1/_/_/package/f84964be2ccc0752e33b3114c0e273f98e4b656d/lib" <name>z ;
using bzip2 : 1.0.8 : <include>"/Users/<user>/.conan/data/bzip2/1.0.8/_/_/package/73d96a7f3102e40cbf2597973d121a5ee8bb3fb1/include" <search>"/Users/<user>/.conan/data/bzip2/1.0.8/_/_/package/73d96a7f3102e40cbf2597973d121a5ee8bb3fb1/lib" <name>bz2 ;
using "clang" :  :  "/usr/local/opt/llvm/bin/clang++" : 
<archiver>"/usr/local/opt/llvm/bin/llvm-ar" <ranlib>"/usr/local/opt/llvm/bin/llvm-ranlib" <compileflags>"-I/Users/<user>/.conan/data/libbacktrace/cci.20210118/_/_/package/f84964be2ccc0752e33b3114c0e273f98e4b656d/include" <linkflags>"-L/Users/<user>/.conan/data/libbacktrace/cci.20210118/_/_/package/f84964be2ccc0752e33b3114c0e273f98e4b656d/lib"  ;
boost/1.85.0: Cross building, detecting compiler...
boost/1.85.0: Cross building flags: ['-mfloat-abi=hard']
boost/1.85.0: WARN: b2 -mfloat-abi=hard -q numa=on target-os=linux architecture=arm address-model=32 binary-format=elf abi=aapcs --layout=system --user-config=/Users/<user>/.conan/data/boost/1.85.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=release --with-atomic --with-charconv --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-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=clang cxxstd=17 define=_GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/Users/<user>/.conan/data/libbacktrace/cci.20210118/_/_/package/f84964be2ccc0752e33b3114c0e273f98e4b656d define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK=1 linkflags="-stdlib=libstdc++" cxxflags="-fPIC -stdlib=libstdc++ -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/Users/<user>/.conan/data/boost/1.85.0/_/_/package/19223fce9fab9ecb8ab404706f29ee0ce239137c -j8 --abbreviate-paths -d0 --debug-configuration --build-dir="/Users/<user>/.conan/data/boost/1.85.0/_/_/build/19223fce9fab9ecb8ab404706f29ee0ce239137c/build-release"
notice: found boost-build.jam at /Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/boost-build.jam
notice: loading B2 from /Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build-system.jam
notice: Searching '/etc' '/Users/<user>' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/util' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/tools' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/options' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/contrib' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2' for site-config configuration file 'site-config.jam'.
notice: Configuration file 'site-config.jam' not found in '/etc' '/Users/<user>' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/util' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/tools' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/options' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/contrib' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build' '/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2'.
notice: Loading explicitly specified user configuration file:
    /Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/tools/build/user-config.jam
notice: Searching '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/tools/build' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from '/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/tools/build'.
notice: [zlib] Using pre-installed library
notice: [zlib] Condition
notice: [bzip2] Using pre-installed library
notice: [bzip2] Condition
notice: will use '/usr/local/opt/llvm/bin/clang++' for clang-darwin, condition <toolset>clang-18
notice: [zlib] zlib is already configured
notice: [bzip2] bzip is already configured
notice: iostreams: not using lzma compression 
notice: iostreams: not using zstd compression 
notice: [python-cfg] Configuring python...
notice: [python-cfg] Checking interpreter command "python"...
notice: [python-cfg] running command 'python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1'
notice: [python-cfg] ...does not invoke a working interpreter
notice: [python-cfg] Python headers and libraries not found.
/Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/libs/test/build/../../predef/check/predef.jam:17: in modules.import from module predef
warning: loading predef
warning: circular module loading dependency:
warning: build-system Jamfile</Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/libs/test/build> predef ==> predef
/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build/project.jam:1308: in import from module Jamfile</Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/libs/test/build>
libs/test/build/Jamfile.v2:11: in modules.load from module Jamfile</Users/<user>/.conan/data/boost/1.85.0/_/_/source/src/libs/test/build>
/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build/project.jam:544: in load-jamfile from module project
/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build/project.jam:68: in load from module project
/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build/project.jam:109: in load-used-projects from module project
/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build/project.jam:79: in load from module project
/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build/project.jam:201: in project.find from module project
/Users/<user>/.conan/data/b2/5.2.1/_/_/package/4e1751b0fa83186dec61c3f59d918b6b17b28aad/bin/.b2/build-system.jam:618: in module scope from module build-system
Performing configuration checks

    - default address-model    : 64-bit [1]
    - default architecture     : x86 [1]
    - cxx11_static_assert      : no [2]
    - cxx11_static_assert      : no [3]
    - cxx11_variadic_templates : no [2]
    - cxx11_variadic_templates : no [3]
    - cxx11_hdr_ratio          : no [2]
    - cxx11_hdr_ratio          : no [3]
    - has std::atomic_ref      : no [2]
    - has statx                : no [2]
    - has statx syscall        : no [2]
    - cxx11_rvalue_references  : no [2]
    - has std::atomic_ref      : no [3]
    - has statx                : no [3]
    - has statx syscall        : no [3]
    - cxx11_rvalue_references  : no [3]
    - cxx11_auto_declarations  : no [2]
    - cxx11_auto_declarations  : no [3]
    - has init_priority attribute : yes [2]
    - has stat::st_blksize     : no [2]
    - has stat::st_mtim        : no [2]
    - has stat::st_mtimensec   : no [2]
    - has stat::st_mtimespec   : no [2]
    - has stat::st_birthtim    : no [2]
    - has stat::st_birthtimensec : no [2]
    - has stat::st_birthtimespec : no [2]
    - has fdopendir(O_NOFOLLOW) : no [2]
    - has dirent::d_type       : no [2]
    - has POSIX *at APIs       : no [2]
    - has fallocate            : no [2]
    - has_icu builds           : no [2]
    - zlib                     : no [2]
    - bzip2                    : no [2]
    - cxx11_constexpr          : no [2]
    - cxx11_constexpr          : no [3]
    - iconv (libc)             : no [2]
    - iconv (separate)         : no [2]
- Boost.Locale needs either iconv or ICU library to be built.
    - iconv (libc)             : no [3]
    - iconv (separate)         : no [3]
- Boost.Locale needs either iconv or ICU library to be built.
    - native atomic int32 supported : no [2]
    - native syslog supported  : yes [2]
    - pthread supports robust mutexes : no [2]
    - Boost.Regex is header-only : no [2]
    - lockfree boost::atomic_flag : no [2]
    - native atomic int32 supported : no [3]
    - native syslog supported  : yes [3]
    - pthread supports robust mutexes : no [3]
    - cxx11_lambdas            : no [2]
    - cxx11_lambdas            : no [3]
    - gcc visibility           : yes [2]
    - cxx11_noexcept           : no [2]
    - gcc visibility           : yes [3]
    - cxx11_noexcept           : no [3]
    - std_wstreambuf builds    : no [2]
    - std_wstreambuf           : no [2]
    - std_wstreambuf           : no [3]
    - BOOST_COMP_GNUC >= 4.3.0 : no [2]

[1] clng-18/trgt-os-lnx
[2] clng-drwn-18/rls/abi-apcs/adrs-mdl-32/archt-arm/bnry-frmt-elf/bst.l-lbc/bst.l-on/bst.l-off/cxstd-17-iso/lnk-sttc/nm-on/trgt-os-lnx/thrd-mlt/vsblt-hdn
[3] clng-drwn-18/rls/abi-apcs/adrs-mdl-32/archt-arm/bnry-frmt-elf/bst.l-lbc/bst.l-on/bst.l-off/bld-no/cxstd-17-iso/lnk-sttc/nm-on/trgt-os-lnx/thrd-mlt/vsblt-hdn

Component configuration:

    - atomic                   : building
    - charconv                 : building
    - chrono                   : building
    - cobalt                   : not building
    - container                : building
    - context                  : building
    - contract                 : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - fiber                    : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : not building
    - headers                  : not building
    - iostreams                : building
    - json                     : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : not building
    - nowide                   : building
    - program_options          : building
    - python                   : not building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - stacktrace               : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - type_erasure             : building
    - url                      : building
    - wave                     : building

clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
libs/serialization/src/archive_exception.cpp:15:10: fatal error: 'exception' file not found
   15 | #include <exception>
      |          ^~~~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/random/src/random_device.cpp:15:
./boost/random/random_device.hpp:21:10: fatal error: 'string' file not found
   21 | #include <string>
      |          ^~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/cmdline.cpp:9:
In file included from ./boost/program_options/config.hpp:10:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/variables_map.cpp:9:
In file included from ./boost/program_options/config.hpp:10:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/config_file.cpp:9:
In file included from ./boost/program_options/config.hpp:10:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/value_semantic.cpp:9:
In file included from ./boost/program_options/config.hpp:10:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/utf8_codecvt_facet.cpp:9:
In file included from ./boost/program_options/config.hpp:10:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/options_description.cpp:10:
In file included from ./boost/program_options/config.hpp:10:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/parsers.cpp:7:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/serialization/src/basic_pointer_iserializer.cpp:12:
In file included from ./boost/serialization/config.hpp:18:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
libs/serialization/src/basic_serializer_map.cpp:15:10: fatal error: 'set' file not found
   15 | #include <set>
      |          ^~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/serialization/src/basic_oarchive.cpp:11:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/serialization/src/basic_iarchive.cpp:11:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
libs/serialization/src/extended_type_info_no_rtti.cpp:12:10: fatal error: 'cstring' file not found
   12 | #include <cstring>
      |          ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
libs/serialization/src/basic_text_oprimitive.cpp:15:10: fatal error: 'ostream' file not found
   15 | #include <ostream>
      |          ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/program_options/src/split.cpp:10:
In file included from ./boost/program_options/parsers.hpp:10:
In file included from ./boost/program_options/config.hpp:10:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/serialization/src/stl_port.cpp:18:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
libs/serialization/src/binary_oarchive.cpp:11:10: fatal error: 'ostream' file not found
   11 | #include <ostream>
      |          ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
libs/serialization/src/xml_archive_exception.cpp:16:10: fatal error: 'exception' file not found
   16 | #include <exception>
      |          ^~~~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
libs/serialization/src/void_cast.cpp:17:10: fatal error: 'set' file not found
   17 | #include <set>
      |          ^~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/serialization/src/polymorphic_text_iarchive.cpp:16:
In file included from ./boost/serialization/config.hpp:18:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
clang++: warning: unknown platform, assuming -mfloat-abi=soft
In file included from libs/serialization/src/polymorphic_binary_oarchive.cpp:16:
In file included from ./boost/serialization/config.hpp:18:
In file included from ./boost/config.hpp:44:
./boost/config/detail/select_stdlib_config.hpp:26:14: fatal error: 'cstddef' file not found
   26 | #    include <cstddef>
      |              ^~~~~~~~~
1 error generated.

...failed updating 0 target...
boost/1.85.0: 
boost/1.85.0: ERROR: Package '19223fce9fab9ecb8ab404706f29ee0ce239137c' build failed
boost/1.85.0: WARN: Build folder /Users/<user>/.conan/data/boost/1.85.0/_/_/build/19223fce9fab9ecb8ab404706f29ee0ce239137c/build-release
ERROR: boost/1.85.0: Error in build() method, line 1127
	self.run(full_command)
	ConanException: Error 1 while executing b2 -mfloat-abi=hard -q numa=on target-os=linux architecture=arm address-model=32 binary-format=elf abi=aapcs --layout=system --user-config=/Users/<user>/.conan/data/boost/1.85.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=release --with-atomic --with-charconv --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-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-url --with-wave toolset=clang cxxstd=17 define=_GLIBCXX_USE_CXX11_ABI=1 pch=on -sLIBBACKTRACE_PATH=/Users/<user>/.conan/data/libbacktrace/cci.20210118/_/_/package/f84964be2ccc0752e33b3114c0e273f98e4b656d define=BOOST_STACKTRACE_LIBCXX_RUNTIME_MAY_CAUSE_MEMORY_LEAK=1 linkflags="-stdlib=libstdc++" cxxflags="-fPIC -stdlib=libstdc++ -DBOOST_STACKTRACE_ADDR2LINE_LOCATION=/usr/bin/addr2line" install --prefix=/Users/<user>/.conan/data/boost/1.85.0/_/_/package/19223fce9fab9ecb8ab404706f29ee0ce239137c -j8 --abbreviate-paths -d0 --debug-configuration --build-dir="/Users/<user>/.conan/data/boost/1.85.0/_/_/build/19223fce9fab9ecb8ab404706f29ee0ce239137c/build-release"
@av4625 av4625 added the bug Something isn't working label Aug 18, 2024
@av4625
Copy link
Author

av4625 commented Sep 14, 2024

This issue does seem to be specifically with just the boost recipe.
I reduced my projects dependency on boost to be header only and instead included poco for anything I needed from boost that wasn't header only and I am able to successfully build again. So the problem seems to be building boost libraries only.

I am able to build boost/1.86.0 (header only), nlohmann_json/3.11.3, sqlitecpp/3.3.1, poco/1.13.3 and gtest/1.14.0 using the method above including these libraries dependencies. Just not the full boost library.

@uilianries
Copy link
Member

@av4625 Hello, I believe it could be a misconfiguration. Please, read the example of cross-building in Conan 2.x docs: https://docs.conan.io/2/examples/cross_build/tricore.html

I see you are still using Conan 1.x, but that example should work as well. The key is using the configuration tools.build:compiler_executables and point the path to your compilers.

Also, consider moving to Conan 2.x when possible. It seems 19 months since its release and Conan 1.x is the way of deprecation.

@uilianries uilianries self-assigned this Sep 23, 2024
@uilianries uilianries added the requires reporter action Waiting on issue reporter label Sep 23, 2024
@av4625
Copy link
Author

av4625 commented Sep 23, 2024

I will try and give that a go asap.

I currently have cmake-conan incorporated into a fairly big project, which is why I’m stuck on conan 1.x.

@av4625
Copy link
Author

av4625 commented Sep 24, 2024

I added this to the conan profile:

[conf]
tools.build:compiler_executables={'c': '/usr/local/opt/llvm/bin/clang', 'cpp': '/usr/local/opt/llvm/bin/clang++'}

This didn't help, you can see from the included output that it isn't using the compile flags as it errors saying clang++: warning: unknown platform, assuming -mfloat-abi=soft and you can see I set it to hard. This is probably why it can't find std headers either as its probably not using -stdlib=libstdc++.

log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working requires reporter action Waiting on issue reporter
Projects
None yet
Development

No branches or pull requests

2 participants