Closed Enhex closed 1 year ago
It's not really a conan-center issue, but a lack of backward compatibility of conan new helpers. See https://github.com/conan-io/conan-center-index/issues/14767 & https://github.com/conan-io/conan-center-index/issues/14781
thanks, adding this to the linux_to_win64
profile fixed the problem:
# for conan v2 recipes
[buildenv]
CHOST=$target_host
CC=$target_host-$cc_compiler
CXX=$target_host-$cxx_compiler
the documentation should be updated, otherwise it sets up people to failure.
Do not hesitate to give your opinion in https://github.com/conan-io/conan-center-index/issues/14781
Description
it seems that a recent change to the Boost recipe broke MinGW compilation.
it used to work fine until few days ago for me. today I downloaded a new version of the Boost recipe using
conan install -u
, and I'm gettingg++: error: unrecognized command-line option ‘-mthreads’; did you mean ‘-pthread’?
errors.It seems that it uses the regular g++ compiler instead of the MinGW one, ignoring the cross-compile host profile.
Package and Environment Details
Conan profile
-pr:b=default
-pr:h=linux_to_win64
Steps to reproduce
conan install boost/1.80.0@ -pr:h=linux_to_win64 -pr:b=default --build=outdated -u
Logs
Click to expand log
``` Configuration (profile_host): [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=12.2 os=Windows [options] [build_requires] [env] AR=x86_64-w64-mingw32-ar AS=x86_64-w64-mingw32-as CC=x86_64-w64-mingw32-gcc CHOST=x86_64-w64-mingw32 CONAN_CMAKE_FIND_ROOT_PATH=/usr/x86_64-w64-mingw32 # Adjust this path # Optional, for CMake to find things in that folder CONAN_CMAKE_SYSROOT=/usr/x86_64-w64-mingw32 # Adjust this path # Optional, if we want to define sysroot CXX=x86_64-w64-mingw32-g++ RANLIB=x86_64-w64-mingw32-ranlib RC=x86_64-w64-mingw32-windres STRIP=x86_64-w64-mingw32-strip Configuration (profile_build): [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=12.2 os=Linux [options] [build_requires] [env] 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: WARN: Can't update, no package in remote zlib/1.2.13: Package is up to date b2/4.9.2: Package is up to date Installing package: boost/1.80.0 Requirements boost/1.80.0 from 'conancenter' - Cache bzip2/1.0.8 from 'conancenter' - Cache zlib/1.2.13 from 'conancenter' - Cache Packages boost/1.80.0:6ddff8f30ac0b6e6747a9e6a8f3ab8e074837dd2 - Build bzip2/1.0.8:96b5dc9e94773bf79ec47f298dd00c4df54e6bad - Cache zlib/1.2.13:41cffd99b7d2f80972a6fdb1ee7dea0da331a019 - 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 'Windows:x86_64' Installing (downloading, building) binaries... b2/4.9.2: Already installed! bzip2/1.0.8: Already installed! zlib/1.2.13: Already installed! boost/1.80.0: Applying build-requirement: b2/4.9.2 boost/1.80.0: Building your package in /home/desktop/.conan/data/boost/1.80.0/_/_/build/6ddff8f30ac0b6e6747a9e6a8f3ab8e074837dd2 boost/1.80.0: Generator txt created conanbuildinfo.txt boost/1.80.0: Calling generate() boost/1.80.0: Aggregating env generators boost/1.80.0: Calling build() boost/1.80.0: WARN: replace_in_file didn't find pattern '$(>) > $(<)' in '/home/desktop/.conan/data/boost/1.80.0/_/_/source/src/libs/stacktrace/build/Jamfile.v2' file. boost/1.80.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/home/desktop/.conan/data/boost/1.80.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.80.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/home/desktop/.conan/data/boost/1.80.0/_/_/source/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.80.0: WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/home/desktop/.conan/data/boost/1.80.0/_/_/source/src/tools/build/src/tools/gcc.jam' file. boost/1.80.0: WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/home/desktop/.conan/data/boost/1.80.0/_/_/source/src/tools/build/src/tools/gcc.jam' file. boost/1.80.0: WARN: replace_in_file didn't find pattern '