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.78.0: fails to find Python #8638

Closed Enhex closed 2 years ago

Enhex commented 2 years ago

The recipe seems to fail finding Python 3.10. Building Boost manually works, so it suggests the problem is with the Conan recipe. also getting warnings about distutils package being deprecated.

Package and Environment Details (include every applicable attribute)

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

call conan install . --build=outdated with the follow recipe:

[requires]
boost/1.78.0

[options]
boost:without_python=False

Logs (Include/Attach if Applicable)

Click to expand log ``` conan install . --build=outdated Configuration: [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] boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" bzip2/1.0.8: Package is up to date libbacktrace/cci.20210118: Package is up to date zlib/1.2.11: Package is up to date boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.78.0: WARN: Package binary is corrupted, removing: 090a15e8d2c710a571a6883f9c69f86ba3d1e028 b2/4.5.0: Package is up to date conanfile.txt: Installing package Requirements boost/1.78.0 from 'conancenter' - Cache bzip2/1.0.8 from 'conancenter' - Cache libbacktrace/cci.20210118 from 'conancenter' - Cache zlib/1.2.11 from 'conancenter' - Cache Packages boost/1.78.0:090a15e8d2c710a571a6883f9c69f86ba3d1e028 - Build bzip2/1.0.8:c32092bf4d4bb47cf962af898e02823f499b017e - Cache libbacktrace/cci.20210118:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache zlib/1.2.11:dfbe50feef7f3c6223a476cd5aeadb687084a646 - Cache Build requirements b2/4.5.0 from 'conancenter' - Cache Build requirements packages b2/4.5.0:4db1be536558d833e52e862fd84d64d75c2b3656 - Cache Installing (downloading, building) binaries... b2/4.5.0: Already installed! bzip2/1.0.8: Already installed! bzip2/1.0.8: Appending PATH environment variable: /home/vm/.conan/data/bzip2/1.0.8/_/_/package/c32092bf4d4bb47cf962af898e02823f499b017e/bin libbacktrace/cci.20210118: Already installed! zlib/1.2.11: Already installed! boost/1.78.0: Applying build-requirement: b2/4.5.0 boost/1.78.0: WARN: Build folder is dirty, removing it: /home/vm/.conan/data/boost/1.78.0/_/_/build/090a15e8d2c710a571a6883f9c69f86ba3d1e028 boost/1.78.0: Building your package in /home/vm/.conan/data/boost/1.78.0/_/_/build/090a15e8d2c710a571a6883f9c69f86ba3d1e028 boost/1.78.0: Generator txt created conanbuildinfo.txt boost/1.78.0: Aggregating env generators boost/1.78.0: Calling build() WARN: replace_in_file didn't find pattern '/* thread_local */' in '/home/vm/.conan/data/boost/1.78.0/_/_/source/source_subfolder/boost/stacktrace/detail/libbacktrace_impls.hpp' file. WARN: replace_in_file didn't find pattern '/* static __thread */' in '/home/vm/.conan/data/boost/1.78.0/_/_/source/source_subfolder/boost/stacktrace/detail/libbacktrace_impls.hpp' file. WARN: replace_in_file didn't find pattern 'local generic-os = [ set.difference $(all-os) : aix darwin vxworks solaris osf hpux ] ;' in '/home/vm/.conan/data/boost/1.78.0/_/_/source/source_subfolder/tools/build/src/tools/gcc.jam' file. WARN: replace_in_file didn't find pattern 'local no-threading = android beos haiku sgi darwin vxworks ;' in '/home/vm/.conan/data/boost/1.78.0/_/_/source/source_subfolder/tools/build/src/tools/gcc.jam' file. WARN: replace_in_file didn't find pattern ' @numa' in '/home/vm/.conan/data/boost/1.78.0/_/_/source/source_subfolder/libs/fiber/build/Jamfile.v2' file. boost/1.78.0: WARN: Patching user-config.jam boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('include'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_path('platinclude'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('INCLUDEDIR'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_python_inc())" boost/1.78.0: (failed) boost/1.78.0: checking /usr/include/python3.10/Python.h boost/1.78.0: found Python.h: /usr/include/python3.10/Python.h boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LIBRARY'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LDLIBRARY'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('LIBDIR'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('multiarchsubdir'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import distutils.sysconfig as du_sysconfig; print(du_sysconfig.get_config_var('multiarchsubdir'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sysconfig; print(sysconfig.get_config_var('WITH_DYLD'))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sys; print('{}.{}'.format(sys.version_info[0], sys.version_info[1]))" boost/1.78.0: running "/usr/bin/python" -c "from __future__ import print_function; import sys; print(getattr(sys, 'abiflags', ''))" boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython3.10.so boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython3.10.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python.dylib boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python3.10.dylib boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python310.dylib boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python.so boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python3.10.so boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python310.so boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python.dll.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python3.10.dll.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python310.dll.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python3.10.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/python310.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython.dylib boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython3.10.dylib boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython310.dylib boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython.so boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython3.10.so boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython310.so boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython.dll.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython3.10.dll.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython310.dll.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython3.10.a boost/1.78.0: checking /usr/lib/:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives :1: DeprecationWarning: The distutils.sysconfig module is deprecated, use sysconfig instead None/libpython310.a boost/1.78.0: boost/1.78.0: ERROR: Package '090a15e8d2c710a571a6883f9c69f86ba3d1e028' build failed boost/1.78.0: WARN: Build folder /home/vm/.conan/data/boost/1.78.0/_/_/build/090a15e8d2c710a571a6883f9c69f86ba3d1e028 ERROR: boost/1.78.0: Invalid configuration: couldn't locate python libraries - make sure you have installed python development files ```
Enhex commented 2 years ago

replacing:

    def _get_python_var(self, name):
        """
        obtain value of python variable, either by sysconfig, or by distutils.sysconfig
        :param name: name of variable to be queried (such as LIBRARY or LDLIBRARY)
        :return: value of python sysconfig variable
        """
        return self._get_python_sc_var(name) or self._get_python_du_var(name)

with:

    def _get_python_var(self, name):
        """
        obtain value of python variable, either by sysconfig, or by distutils.sysconfig
        :param name: name of variable to be queried (such as LIBRARY or LDLIBRARY)
        :return: value of python sysconfig variable
        """
        return self._get_python_sc_var(name)

fixes the problem and the deprecation warnings.