Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[package] boost/1.85.0: Install failed with python #26573

Closed
xiaoshenxian opened this issue Feb 11, 2025 · 2 comments
Closed

[package] boost/1.85.0: Install failed with python #26573

xiaoshenxian opened this issue Feb 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@xiaoshenxian
Copy link

Description

I want to build boost with python and numpy on window with below conanfile.py:

from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"
    default_options = {
        "boost/*:without_python": False,
        "boost/*:without_numpy": False
    }

    def requirements(self):
        self.requires("boost/1.85.0")

    def layout(self):
        cmake_layout(self)

and following below steps:

  1. run python -m venv venv
  2. run .\venv\Scripts\activate.ps1
  3. run pip install conan numpy
  4. run conan install . --output-folder=build --build=missing --settings=build_type=Debug

But things doesn't work.

Package and Environment Details

  • Package Name/Version: boost/1.85.0
  • Operating System+version: windows 10
  • Compiler+version: MSVC 19.42.34436
  • Conan version: conan 2.12.1
  • Python version: Python 3.11.4

Conan profile

[settings]
arch=x86_64
build_type=Release
compiler=msvc
compiler.cppstd=23
compiler.runtime=dynamic
compiler.runtime_type=Release
compiler.version=194
os=Windows

[conf]

Steps to reproduce

conan install . --output-folder=build --build=missing --settings=build_type=Debug

Logs

Click to expand log
...

Performing configuration checks

    - default address-model    : 64-bit [1]
    - default architecture     : x86 [1]
    - compiler supports SSE2   : yes [2]
    - compiler supports SSE4.1 : yes [2]
    - cxx11_static_assert      : yes [2]
    - has synchronization.lib  : yes [2]
    - cxx11_variadic_templates : yes [2]
    - cxx11_decltype           : yes [2]
    - GCC libquadmath and __float128 support : no [2]
    - cxx11_hdr_ratio          : yes [2]
    - cxx11_template_aliases   : yes [2]
    - cxx11_char16_t           : yes [2]
    - cxx11_char32_t           : yes [2]
    - cxx20_hdr_concepts       : yes [2]
    - cpp_lib_memory_resource  : yes [2]
warning: non-free usage requirements <boost.cobalt.pmr>std ignored
warning: in main-target boost_cobalt at libs\cobalt\build\Jamfile:73
    - has std::atomic_ref      : yes [2]
    - has statx                : no [2]
    - has statx syscall        : no [2]
    - has BCrypt API           : yes [2]
    - has init_priority attribute : no [2]
    - has stat::st_blksize     : no [2]
    - has stat::st_mtim        : no [2]
    - has stat::st_mtimensec   : no [2]
    - has stat::st_mtimespec   : no [2]
    - has stat::st_birthtim    : no [2]
    - has stat::st_birthtimensec : no [2]
    - has stat::st_birthtimespec : no [2]
    - has fdopendir(O_NOFOLLOW) : no [2]
    - has dirent::d_type       : no [2]
    - has POSIX *at APIs       : no [2]
    - has fallocate            : no [2]
    - cxx11_rvalue_references  : yes [2]
    - cxx11_scoped_enums       : yes [2]
    - cxx11_noexcept           : yes [2]
    - cxx11_nullptr            : yes [2]
    - cxx11_defaulted_functions : yes [2]
    - cxx11_defaulted_moves    : yes [2]
    - cxx11_deleted_functions  : yes [2]
    - cxx11_function_template_default_args : yes [2]
    - cxx11_final              : yes [2]
    - cxx11_override           : yes [2]
    - has_icu builds           : no [2]
    - zlib                     : yes [2]
    - bzip2                    : yes [2]
    - cxx11_constexpr          : yes [2]
    - cxx11_hdr_tuple          : yes [2]
    - cxx11_basic_alignas      : yes [2]
    - cxx11_auto_declarations  : yes [2]
    - cxx11_hdr_functional     : yes [2]
    - cxx11_hdr_type_traits    : yes [2]
    - cxx11_range_based_for    : yes [2]
    - cxx11_smart_ptr          : yes [2]
    - native atomic int32 supported : yes [2]
    - has message compiler     : yes [2]
    - native syslog supported  : no [2]
    - pthread supports robust mutexes : no [2]
    - Boost.Regex is header-only : yes [2]
    - compiler supports SSSE3  : yes [2]
    - compiler supports AVX2   : yes [2]
    - cxx11_lambdas            : yes [2]
    - gcc visibility           : no [2]
    - sfinae_expr              : yes [2]
    - cxx11_unified_initialization_syntax : yes [2]
    - cxx11_hdr_initializer_list : yes [2]
    - cxx11_hdr_chrono         : yes [2]
    - cxx11_thread_local       : yes [2]
    - cxx11_numeric_limits     : yes [2]
    - cxx11_hdr_array          : yes [2]
    - cxx11_hdr_atomic         : yes [2]
    - cxx11_allocator          : yes [2]
    - cxx11_explicit_conversion_operators : yes [2]
    - cxx14_decltype_auto      : yes [2]
    - cxx14_generic_lambdas    : yes [2]
    - cxx14_return_type_deduction : yes [2]
    - cxx14_variable_templates : yes [2]
    - long double support      : yes [2]
    - Has Large File Support   : yes [2]
    - Has attribute init_priority : no [2]
    - std_wstreambuf builds    : yes [2]
    - std_wstreambuf           : yes [2]
    - libbacktrace builds      : no [2]
    - cxx11_rvalue_references  : yes [3]
    - libbacktrace builds      : no [3]
    - addr2line builds         : no [2]
    - addr2line builds         : no [3]
    - WinDbg builds            : yes [2]
    - WinDbg builds            : yes [3]
    - WinDbgCached builds      : yes [2]
    - BOOST_COMP_GNUC >= 4.3.0 : no [2]
    - cxx11_hdr_thread         : yes [2]
    - cxx11_hdr_mutex          : yes [2]
    - cxx11_hdr_regex          : yes [2]

[1] msvc-14.3
[2] msvc-14.3/dbg/bst.l-off/bst.l-off/cxstd-ltst-iso/lnk-sttc/pythn-3.1/thrdp-wn32/thrd-mlt/vsblt-hdn
[3] msvc-14.3/dbg/bst.l-off/bst.l-off/bld-no/cxstd-ltst-iso/lnk-sttc/pythn-3.1/thrdp-wn32/thrd-mlt/vsblt-hdn

Component configuration:

    - atomic                   : building
    - charconv                 : building
    - chrono                   : building
    - cobalt                   : building
    - container                : building
    - context                  : building
    - contract                 : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - fiber                    : not building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : not building
    - headers                  : not building
    - iostreams                : building
    - json                     : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : not building
    - nowide                   : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - stacktrace               : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - type_erasure             : building
    - url                      : building
    - wave                     : building

...skipped <pD:\.conan\p\b\boostd4a06c64d0ebe\b\build-debug\boost\bin.v2\libs\python\build\msvc-14.3\dbg\cxstd-ltst-iso\lnk-sttc\pythn-3.1\thrd-mlt>libboost_numpy311.lib for lack of <pD:\.conan\p\b\boostd4a06c64d0ebe\b\build-debug\boost\bin.v2\libs\python\build\msvc-14.3\dbg\cxstd-ltst-iso\lnk-sttc\pythn-3.1\thrd-mlt>numpy\dtype.obj...
...skipped <pD:\.conan\p\b\boostd4a06c64d0ebe\p\lib>libboost_numpy311.lib for lack of <pD:\.conan\p\b\boostd4a06c64d0ebe\b\build-debug\boost\bin.v2\libs\python\build\msvc-14.3\dbg\cxstd-ltst-iso\lnk-sttc\pythn-3.1\thrd-mlt>libboost_numpy311.lib...

...failed updating 0 target...

boost/1.85.0: ERROR: 
Package '19a468e57bced05f16724c981e546d8b2b14bb03' build failed
boost/1.85.0: WARN: Build folder D:\.conan\p\b\boostd4a06c64d0ebe\b\build-debug
ERROR: boost/1.85.0: Error in build() method, line 1153
        self.run(full_command)
        ConanException: Error 1 while executing
@xiaoshenxian xiaoshenxian added the bug Something isn't working label Feb 11, 2025
@Nekto89
Copy link
Contributor

Nekto89 commented Feb 11, 2025

What version of numpy are you using? If I remember correctly, that boost isn't compatible with numpy 2+

@xiaoshenxian
Copy link
Author

@Nekto89

What version of numpy are you using? If I remember correctly, that boost isn't compatible with numpy 2+

Oh, it is indeed this problem... I downgrade my numpy from 2.2.2 to 1.26.4, then it goes well. Thank you for your help.

But why it also doesn't work if I set "boost/*:without_numpy": True to not to compile with the installed numpy 2.2.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants