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: Unable to compile with clang 17 #24301

Closed Todiq closed 3 months ago

Todiq commented 3 months ago

Description

Hello,

It looks like I am not able to build boost from source using clang 17. Would you mind having a look? Thanks in advance!

Package and Environment Details

Conan profile

[settings] arch={{detect_api.detect_arch()}} build_type=Release compiler=clang compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=17 os=Linux

[conf] tools.build:compiler_executables = {"c": "clang", "cpp": "clang++", "rc": "llvm-rc", "ar": "llvm-ar", "ld": "ld.lld"}

Steps to reproduce

May be linked to https://github.com/conan-io/conan/issues/16465

Apparently, bumping b2's version used to build boost should be enough. (From 4.10.1 to 5.2.0)

[requires]
boost/1.81.0

[options]
boost*/*:shared=True
boost*/*:bzip2=False
boost*/*:without_python=False
boost*/*:without_stacktrace=True
boost*/*:zlib=False

Logs

Click to expand log ``` ======== Input profiles ======== Profile host: [settings] arch=x86_64 build_type=Release compiler=clang compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=17 os=Linux [conf] tools.build:compiler_executables={'c': 'clang', 'cpp': 'clang++', 'rc': 'llvm-rc', 'ar': 'llvm-ar', 'ld': 'ld.lld'} Profile build: [settings] arch=x86_64 build_type=Release compiler=clang compiler.cppstd=17 compiler.libcxx=libstdc++11 compiler.version=17 os=Linux [conf] tools.build:compiler_executables={'c': 'clang', 'cpp': 'clang++', 'rc': 'llvm-rc', 'ar': 'llvm-ar', 'ld': 'ld.lld'} ======== Computing dependency graph ======== boost/1.81.0: Not found in local cache, looking in remotes... boost/1.81.0: Checking remote: conancenter boost/1.81.0: Downloaded recipe revision ee027e2185d9866c04a467e740944810 boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" b2/4.10.1: Not found in local cache, looking in remotes... b2/4.10.1: Checking remote: conancenter b2/4.10.1: Downloaded recipe revision 392e8deb2d02b1f9734ebfc9028f2f92 Graph root conanfile.txt: /workspace/conanfile.txt Requirements boost/1.81.0#ee027e2185d9866c04a467e740944810 - Downloaded (conancenter) Build requirements b2/4.10.1#392e8deb2d02b1f9734ebfc9028f2f92 - Downloaded (conancenter) ======== Computing necessary packages ======== boost/1.81.0: Compatible package ID 5a6772368a0bb86d93cae6040eba4d384a2ff562 equal to the default package ID: Skipping it. boost/1.81.0: Checking 9 compatible configurations boost/1.81.0: Compatible configurations not found in cache, checking servers boost/1.81.0: 'b1e50b088ddd389bb76c0bde3c3d0030e7784662': compiler.cppstd=11 boost/1.81.0: '1c23d3aaf4635f0389f54256b940f8e284d2c40a': compiler.cppstd=gnu11 boost/1.81.0: '8d467db9fbcdfcfa836a90eac127705304b24fd4': compiler.cppstd=14 boost/1.81.0: '9579eba78e693ae1127728bd264d08e18cef2a0f': compiler.cppstd=gnu14 boost/1.81.0: 'a473f977fc3d3470b06119f6e8398463c6256971': compiler.cppstd=gnu17 boost/1.81.0: '5183797c82046effd5181b95645012a674079869': compiler.cppstd=20 boost/1.81.0: '7d6c4839cfaeb0cd02d74fde114463a83523c98b': compiler.cppstd=gnu20 boost/1.81.0: '7148dca07a0925a88d4e2903ca2f469d01c544d3': compiler.cppstd=23 boost/1.81.0: 'dda7ffd7b9868e11c93b9293ae632b0089c6885c': compiler.cppstd=gnu23 Requirements boost/1.81.0#ee027e2185d9866c04a467e740944810:5a6772368a0bb86d93cae6040eba4d384a2ff562 - Build Build requirements b2/4.10.1#392e8deb2d02b1f9734ebfc9028f2f92:63fead0844576fc02943e16909f08fcdddd6f44b#bf58bf81a2b7b01714c44f174a775c13 - Download (conancenter) ======== Installing packages ======== -------- Downloading 1 package -------- b2/4.10.1: Retrieving package 63fead0844576fc02943e16909f08fcdddd6f44b from remote 'conancenter' b2/4.10.1: Package installed 63fead0844576fc02943e16909f08fcdddd6f44b b2/4.10.1: Downloaded package revision bf58bf81a2b7b01714c44f174a775c13 boost/1.81.0: Sources downloaded from 'conancenter' boost/1.81.0: Calling source() in /opt/conan/p/boost9bd69f0af7529/s/src boost/1.81.0: Downloading 118.8MB boost_1_81_0.tar.bz2 boost/1.81.0: Apply patch (conan): Fails the build when mpi is not configured boost/1.81.0: Apply patch (conan): Fails the build when there is no iconv backend -------- Installing package boost/1.81.0 (2 of 2) -------- boost/1.81.0: Building from source boost/1.81.0: Package boost/1.81.0:5a6772368a0bb86d93cae6040eba4d384a2ff562 boost/1.81.0: Building your package in /opt/conan/p/b/boost044fa5d77573c/b boost/1.81.0: Calling generate() boost/1.81.0: Generators folder: /opt/conan/p/b/boost044fa5d77573c/b/build-release/conan boost/1.81.0: Generating aggregated env files boost/1.81.0: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh'] boost/1.81.0: Calling build() boost/1.81.0: WARN: replace_in_file didn't find pattern '/* thread_local */' in '/opt/conan/p/boost9bd69f0af7529/s/src/boost/stacktrace/detail/libbacktrace_impls.hpp' file. boost/1.81.0: WARN: replace_in_file didn't find pattern '/* static __thread */' in '/opt/conan/p/boost9bd69f0af7529/s/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 '/opt/conan/p/boost9bd69f0af7529/s/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 '/opt/conan/p/boost9bd69f0af7529/s/src/tools/build/src/tools/gcc.jam' file. boost/1.81.0: WARN: Patching user-config.jam boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('include'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('include'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('platinclude'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('platinclude'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('INCLUDEDIR'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('INCLUDEDIR'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_python_inc())" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_python_inc())" Traceback (most recent call last): File "", line 1, in AttributeError: module 'sysconfig' has no attribute 'get_python_inc' boost/1.81.0: (failed) boost/1.81.0: checking /usr/local/include/python3.9/Python.h boost/1.81.0: found Python.h: /usr/local/include/python3.9/Python.h boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LIBRARY'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LIBRARY'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LDLIBRARY'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LDLIBRARY'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LIBDIR'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LIBDIR'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('multiarchsubdir'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('multiarchsubdir'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import distutils.sysconfig as du_sysconfig; print(du_sysconfig.get_config_var('multiarchsubdir'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import distutils.sysconfig as du_sysconfig; print(du_sysconfig.get_config_var('multiarchsubdir'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('WITH_DYLD'))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('WITH_DYLD'))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.81.0: running "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print(getattr(sys, 'abiflags', ''))" boost/1.81.0: RUN: "/opt/venv/bin/python" -c "from __future__ import print_function; import sys; print(getattr(sys, 'abiflags', ''))" boost/1.81.0: checking /usr/local/lib/libpython3.9.so boost/1.81.0: found python library: /usr/local/lib/libpython3.9.so boost/1.81.0: WARN: using python : 3.9 : "/opt/venv/bin/python" : "/usr/local/include/python3.9" : "/usr/local/lib" ; using "clang" : : "clang++" : ; boost/1.81.0: WARN: b2 -q numa=on target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/opt/conan/p/boost9bd69f0af7529/s/src/tools/build/user-config.jam -sNO_ZLIB=1 -sNO_BZIP2=1 -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=shared variant=release --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-python --with-random --with-regex --with-serialization --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 linkflags="-stdlib=libstdc++" cxxflags="-fPIC -stdlib=libstdc++" install --prefix=/opt/conan/p/b/boost044fa5d77573c/p -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="/opt/conan/p/b/boost044fa5d77573c/b/build-release" boost/1.81.0: RUN: b2 -q numa=on target-os=linux architecture=x86 address-model=64 binary-format=elf abi=sysv --layout=system --user-config=/opt/conan/p/boost9bd69f0af7529/s/src/tools/build/user-config.jam -sNO_ZLIB=1 -sNO_BZIP2=1 -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=shared variant=release --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-python --with-random --with-regex --with-serialization --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 linkflags="-stdlib=libstdc++" cxxflags="-fPIC -stdlib=libstdc++" install --prefix=/opt/conan/p/b/boost044fa5d77573c/p -j12 --abbreviate-paths -d0 --debug-configuration --build-dir="/opt/conan/p/b/boost044fa5d77573c/b/build-release" /bin/sh: b2: not found boost/1.81.0: ERROR: Package '5a6772368a0bb86d93cae6040eba4d384a2ff562' build failed boost/1.81.0: WARN: Build folder /opt/conan/p/b/boost044fa5d77573c/b/build-release ERROR: boost/1.81.0: Error in build() method, line 1130 self.run(full_command) ConanException: Error 127 while executing ```
Todiq commented 3 months ago

Fixed by apk add gcompat. But I then end up with the following errors:

...
In file included from libs/python/src/numpy/scalars.cpp:8:
In file included from ./boost/python/numpy/internal.hpp:17:
In file included from ./boost/python.hpp:11:
In file included from ./boost/python/args.hpp:8:
In file included from ./boost/python/detail/prefix.hpp:14:
In file included from ./boost/python/detail/config.hpp:15:
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 17 targets...

boost/1.85.0: ERROR:
Package 'a2292d0b3e271f99eae631ba66bae3e6b3e1223c' build failed
boost/1.85.0: WARN: Build folder /opt/conan/p/b/boost379201752a222/b/build-release
ERROR: boost/1.85.0: Error in build() method, line 1130
        self.run(full_command)
        ConanException: Error 1 while executing

Which are the same as described there : https://github.com/conan-io/conan-center-index/issues/13619, hence closing this ticket as duplicate.