Open lproj opened 1 year ago
- default architecture : x86 [1]
If you cross-build with 2 profiles and arch in host profile is armv7hf, it's not possible by design of boost recipe. Please try without cmake-conan
to avoid adding an extra layer of potential bugs.
That is what I did afterwards: I did run conan install
from command line only, but the problem remains. Note that the host profile specified in the above section of this bug report come from the output of the command (I did not write it by myself, I should have made this more clear).
This is the command from a fresh environment without any conan profiles:
. env.sh
# ok, first set CC,CXX,etc...
/usr/local/bin/conan install boost/1.78.0@ --update --remote conancenter --build missing --settings arch=armv7hf --settings build_type=Debug --settings compiler=gcc --settings compiler.version=11 --settings compiler.libcxx=libstdc++11 --settings compiler.cppstd=20 -pr:b=default
conan v2 helpers don't listen environment variables set externally, so I would say it's UB. They expect profiles to explicitly set them in [buildenv] so that conan can inject these env variables in the proper context.
Description
Hi, I have an application based on CMake which I am trying to cross-compile to ARM. CMake is integrated with Conan via cmake-conan. The call to the
conan_cmake_install()
function calls the conan client in turn (which I also retried from command line directly):/usr/local/bin/conan install boost/1.78.0@ --update --remote conancenter --build missing --settings arch=armv7hf --settings build_type=Debug --settings compiler=gcc --settings compiler.version=11 --settings compiler.libcxx=libstdc++11 --settings compiler.cppstd=20 -pr:b=default
$CC, $CXX and other environment variables have been properly set and exported via a shell script.
The problem is that the boost configure step keeps detecting the x86/x64 as host, from the output (please see the detailed logs at the bottom).
However, I remember I had no problems in the past. It works if I specify an older recipe revision from command line:
CONAN_REVISIONS_ENABLED=1 /usr/local/bin/conan install boost/1.78.0@#662597c4e834b1f6e67b4ee6d7d634bd --update --remote conancenter --build missing --settings arch=armv7hf --settings build_type=Debug --settings compiler=gcc --settings compiler.version=11 --settings compiler.libcxx=libstdc++11 --settings compiler.cppstd=20 -pr:b=default
...
Package and Environment Details
Conan profile
Steps to reproduce
/usr/local/bin/conan install boost/1.78.0@ --update --remote conancenter --build missing --settings arch=armv7hf --settings build_type=Debug --settings compiler=gcc --settings compiler.version=11 --settings compiler.libcxx=libstdc++11 --settings compiler.cppstd=20 -pr:b=default
Logs
Click to expand log
``` Configuration (profile_host): [settings] arch=armv7hf arch_build=x86_64 build_type=Debug compiler=gcc compiler.cppstd=20 compiler.libcxx=libstdc++11 compiler.version=11 os=Linux os_build=Linux [options] [build_requires] [env] Configuration (profile_build): [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++ compiler.version=11 os=Linux os_build=Linux [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.2.13: WARN: Can't update, no package in remote boost/1.78.0: WARN: Package binary is corrupted, removing: f46a02e3e1208e4ba2172ce4e3436bdfa0b84dc9 b2/4.9.2: WARN: Can't update, no package in remote Installing package: boost/1.78.0 Requirements boost/1.78.0 from 'conancenter' - Cache bzip2/1.0.8 from 'conancenter' - Cache libbacktrace/cci.20210118 from 'conancenter' - Cache zlib/1.2.13 from 'conancenter' - Cache Packages boost/1.78.0:f46a02e3e1208e4ba2172ce4e3436bdfa0b84dc9 - Build bzip2/1.0.8:cd05d4dc9ee01176355eaafc0b9b97048f3f3ecb - Cache libbacktrace/cci.20210118:17d0fcc517d726a18f148667256f6d4e42960ed8 - Cache zlib/1.2.13:17d0fcc517d726a18f148667256f6d4e42960ed8 - Cache Build requirements b2/4.9.2 from 'conancenter' - Cache Build requirements packages b2/4.9.2:4db1be536558d833e52e862fd84d64d75c2b3656 - Cache Cross-build from 'Linux:x86_64' to 'Linux:armv7hf' Installing (downloading, building) binaries... b2/4.9.2: Already installed! bzip2/1.0.8: Already installed! libbacktrace/cci.20210118: Already installed! zlib/1.2.13: Already installed! boost/1.78.0: Applying build-requirement: b2/4.9.2 boost/1.78.0: WARN: Build folder is dirty, removing it: /root/.conan/data/boost/1.78.0/_/_/build/f46a02e3e1208e4ba2172ce4e3436bdfa0b84dc9 boost/1.78.0: Building your package in /root/.conan/data/boost/1.78.0/_/_/build/f46a02e3e1208e4ba2172ce4e3436bdfa0b84dc9 boost/1.78.0: Generator txt created conanbuildinfo.txt boost/1.78.0: Calling generate() boost/1.78.0: Aggregating env generators boost/1.78.0: Calling build() boost/1.78.0: WARN: replace_in_file didn't find pattern '$(>) > $(<)' in '/root/.conan/data/boost/1.78.0/_/_/source/src/libs/stacktrace/build/Jamfile.v2' file. boost/1.78.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/root/.conan/data/boost/1.78.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.78.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/root/.conan/data/boost/1.78.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.78.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/root/.conan/data/boost/1.78.0/_/_/source/src/tools/build/src/tools/gcc.jam' file. boost/1.78.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/root/.conan/data/boost/1.78.0/_/_/source/src/tools/build/src/tools/gcc.jam' file. boost/1.78.0: WARN: replace_in_file didn't find pattern '