conan-io / conan-center-index

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

[package] boost/1.79.0 does not work with Conan 2.0 #15003

Closed System-Arch closed 1 year ago

System-Arch commented 1 year ago

Description

While much effort has gone into porting the boost recipe to Conan 2.0 syntax, the use of self.output.warn() causes fatal errors when actually trying to use it with Conan 2.0:

ERROR: conanfile.py (boost/1.79.0): Error in build() method, line 859 self._create_user_config_jam(self._boost_build_dir) while calling '_create_user_config_jam', line 1203 self.output.warn("Patching user-config.jam") AttributeError: 'ConanOutput' object has no attribute 'warn'

Package and Environment Details

Conan profile

Profile host: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=10.3 os=Linux [options] :shared=True [tool_requires] : gcc/10.3.0, cmake/3.24.2, ninja/1.11.0 [conf] tools.cmake.cmaketoolchain:generator=Ninja

Profile build: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=8 os=Linux [options] cmake:bootstrap=True [tool_requires] !openssl: cmake/3.24.2

Steps to reproduce

conan-2.0 build -pr:b tools.jinja -pr:h default.jinja --name boost --version 1.79.0 .

Logs

Click to expand log ``` conan-2.0 build -pr:b tools.jinja -pr:h default.jinja --name boost --version 1.79.0 . # --build=never -------- Input profiles -------- Profile host: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=10.3 os=Linux [options] *:shared=True [tool_requires] *: gcc/10.3.0, cmake/3.24.2, ninja/1.11.0 [conf] tools.cmake.cmaketoolchain:generator=Ninja Profile build: [settings] arch=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=8 os=Linux [options] cmake*:bootstrap=True [tool_requires] !openssl*: cmake/3.24.2 -------- Computing dependency graph -------- Graph root conanfile.py (boost/1.79.0): /tmp/tmp.27qoV1fdf1/boost/conanfile.py Requirements bzip2/1.0.8#6fbcb24c8aa5cc24cc5f1a13ba8a08bf - Cache libbacktrace/cci.20210118#e15db3d2e097b960da976d1b983444e4 - Cache zlib/1.2.13#416618fa04d433c6bd94279ed2e93638 - Cache Build requirements b2/4.9.2#5a894f36e86a1e157dd8df83f1def0ea - Cache cmake/3.24.2#c9ca2759150e09689b6ec6e350fe3bbb - Cache flex/2.6.4#1c7967e3b56bc1af57b8671dac7448a1 - Cache gcc/10.3.0#7f89aa10c83fe66dd2bf1a9bbffc5577 - Cache gmp/6.2.1#1b736a3bfe5cb8eaf7c597682b11935c - Cache isl/0.24#8f8890a82f5af416f79113974b152e05 - Cache m4/1.4.19#32eb97d367f97ef9a7e873ca41988b37 - Cache mpc/1.2.0#4219c0a20cea391ff6e061fa810d1441 - Cache mpfr/4.1.0#124dc118a67c9ca33e6a58092d2e53e3 - Cache ninja/1.11.0#da75168088b60dc184c4bb6e66441012 - Cache openssl/1.1.1s#6ac50ee9e58b08be28d7deb28dbd96b9 - Cache zlib/1.2.13#416618fa04d433c6bd94279ed2e93638 - Cache -------- Computing necessary packages -------- Requirements bzip2/1.0.8#6fbcb24c8aa5cc24cc5f1a13ba8a08bf:028a6df729eea0947ac48c1c3732498b266e1bea#cd74f44bff1b16e3d4f8c3a5be7e15b1 - Cache libbacktrace/cci.20210118#e15db3d2e097b960da976d1b983444e4:0b4324953d18bb5078b753b91f2488ae6cdfc53a#a0902afb5ac321dda0086f90c4a34043 - Cache zlib/1.2.13#416618fa04d433c6bd94279ed2e93638:0b4324953d18bb5078b753b91f2488ae6cdfc53a#0687fbd2f76ba1589e761d4a89c5a439 - Cache Build requirements b2/4.9.2#5a894f36e86a1e157dd8df83f1def0ea:63fead0844576fc02943e16909f08fcdddd6f44b#73888b6d46d4c0163e8a53c06d9b76e4 - Cache cmake/3.24.2#c9ca2759150e09689b6ec6e350fe3bbb:99ba5f8234b5341513c60c4f500b886d4a72f667#0b1fae2bb5f1787f8e60bd798055ddf4 - Skip flex/2.6.4#1c7967e3b56bc1af57b8671dac7448a1:897e6fde718e72637d92b0b8ed929893a1976238#9b94dff6888ebf2ebacaeac35a8a8e03 - Skip gcc/10.3.0#7f89aa10c83fe66dd2bf1a9bbffc5577:df6c14c1345f6fad201fa4f4d8369cb0471cdd7b#1b8824c68e0d6553907f8e1ba52d56b4 - Cache gmp/6.2.1#1b736a3bfe5cb8eaf7c597682b11935c:e2042160f5f9e84f1f34511f201378289e063b83#2dfc4f3dc9c0243ecb7155e2702ef848 - Skip isl/0.24#8f8890a82f5af416f79113974b152e05:9ca3050f245a3bd66cd7a191c86d0d7ea547cebd#309f36733e4c08cac37b00e7b15487eb - Skip m4/1.4.19#32eb97d367f97ef9a7e873ca41988b37:3593751651824fb813502c69c971267624ced41a#a3d350d91e1a728cd7181c2f12b5ccb3 - Skip mpc/1.2.0#4219c0a20cea391ff6e061fa810d1441:95d790159428786d1c71779e5bee9788c659ea75#9df0f8a680ac8ce9363e5845c201c5d4 - Skip mpfr/4.1.0#124dc118a67c9ca33e6a58092d2e53e3:cc59a59152d2abf2d9dc21511523f4ee400e9670#ad8c297389cb9be777ed2a39ecb58b69 - Skip ninja/1.11.0#da75168088b60dc184c4bb6e66441012:3593751651824fb813502c69c971267624ced41a#0dc74834457ae37183757460a6996342 - Cache openssl/1.1.1s#6ac50ee9e58b08be28d7deb28dbd96b9:896855b1e3b5961bfcc08e699116d9ed588cac00#d7649fcbb2fde8241ef630423a195b81 - Skip (3p-tools) zlib/1.2.13#416618fa04d433c6bd94279ed2e93638:897e6fde718e72637d92b0b8ed929893a1976238#4b30748db76ec642513d35ebfecfc311 - Skip -------- Installing packages -------- -------- Installing (downloading, building) binaries... -------- cmake/3.24.2: Already installed! cmake/3.24.2: Appending PATH environment variable: /home/marc/.conan2/p/e0c986b48f7b7ad8/p/bin WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X b2/4.9.2: Already installed! WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X ninja/1.11.0: Already installed! gcc/10.3.0: Already installed! gcc/10.3.0: Creating CC env var with: /home/marc/.conan2/p/7a1d0342fb682550/p/bin/gcc-10.3.0 gcc/10.3.0: Creating CXX env var with: /home/marc/.conan2/p/7a1d0342fb682550/p/bin/g++-10.3.0 gcc/10.3.0: Creating FC env var with: /home/marc/.conan2/p/7a1d0342fb682550/p/bin/gfortran-10.3.0 gcc/10.3.0: Creating AR env var with: /home/marc/.conan2/p/7a1d0342fb682550/p/bin/gcc-ar-10.3.0 gcc/10.3.0: Creating NM env var with: /home/marc/.conan2/p/7a1d0342fb682550/p/bin/gcc-nm-10.3.0 gcc/10.3.0: Creating RANLIB env var with: /home/marc/.conan2/p/7a1d0342fb682550/p/bin/gcc-ranlib-10.3.0 WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X bzip2/1.0.8: Already installed! WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'cpp_info.build_modules' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'env_info' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X libbacktrace/cci.20210118: Already installed! zlib/1.2.13: Already installed! WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X WARN: The use of 'cpp_info.names' is deprecated in Conan 2.0 and will be removed in Conan 2.X. Please, update your recipes unless you are maintaining compatibility with Conan 1.X -------- Finalizing install (deploy, generators) -------- conanfile.py (boost/1.79.0): Calling generate() conanfile.py (boost/1.79.0): Aggregating env generators conanfile.py (boost/1.79.0): Calling build() conanfile.py (boost/1.79.0): WARN: replace_in_file didn't find pattern '/* thread_local */' in '/tmp/tmp.27qoV1fdf1/boost/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. conanfile.py (boost/1.79.0): WARN: replace_in_file didn't find pattern '/* static __thread */' in '/tmp/tmp.27qoV1fdf1/boost/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. conanfile.py (boost/1.79.0): WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/tmp/tmp.27qoV1fdf1/boost/src/tools/build/src/tools/gcc.jam' file. conanfile.py (boost/1.79.0): WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/tmp/tmp.27qoV1fdf1/boost/src/tools/build/src/tools/gcc.jam' file. ERROR: conanfile.py (boost/1.79.0): Error in build() method, line 859 self._create_user_config_jam(self._boost_build_dir) while calling '_create_user_config_jam', line 1203 self.output.warn("Patching user-config.jam") AttributeError: 'ConanOutput' object has no attribute 'warn' ERROR: Conan-2.0 build failed for 'boost'```
SpaceIm commented 1 year ago

https://github.com/conan-io/conan-center-index/pull/14819 should fix this issue.