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.77.0: cannot build for Windows gcc x86_64 #7661

Closed Buckskin closed 2 years ago

Buckskin commented 2 years ago

Hello - A configuration for boost/1.77.0 is not available, and when I try to build it I get a ConanException: Error 1 while executing b2.exe. Please help if possible. Thank you. I also tried the most recent gcc 8.1.0 - just in case - and received the same error.

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=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]

Steps to reproduce (Include if Applicable)

$ mkdir testdir && cd testdir $ type con > conanfile.txt [requires] boost/1.77.0

[generators] cmake $ mkdir build && cd build $ conan install .. $ conan install .. --build=boost

Logs (Include/Attach if Applicable)

Click to expand log ``` Microsoft Windows [Version 10.0.18363.1801] (c) 2019 Microsoft Corporation. All rights reserved. C:\windows\system32>cd\temp C:\temp>mkdir testdir && cd testdir C:\temp\testdir>type con > conanfile.txt [requires] boost/1.77.0 [generators] cmake C:\temp\testdir>mkdir build && cd build C:\temp\testdir\build>conan install .. Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=7 os=Windows os_build=Windows [options] [build_requires] [env] boost/1.77.0: WARN: Package binary is corrupted, removing: 26dbaaaba8da289459e8e26b87c8d1b27c993041 conanfile.txt: Installing package Requirements boost/1.77.0 from 'conancenter' - Cache bzip2/1.0.8 from 'conancenter' - Cache zlib/1.2.11 from 'conancenter' - Cache Packages boost/1.77.0:26dbaaaba8da289459e8e26b87c8d1b27c993041 - Missing bzip2/1.0.8:456177cc52f814bf60d65d5b5889191eb5628935 - Cache zlib/1.2.11:42951bc9791ea38175dc6d678bd77956f88c4796 - Cache Installing (downloading, building) binaries... ERROR: Missing binary: boost/1.77.0:26dbaaaba8da289459e8e26b87c8d1b27c993041 boost/1.77.0: WARN: Can't find a 'boost/1.77.0' package for the specified settings, options and dependencies: - Settings: arch=x86_64, build_type=Release, compiler=gcc, compiler.libcxx=libstdc++11, compiler.version=7, os=Windows - Options: asio_no_deprecated=False, buildid=None, bzip2=True, debug_level=0, diagnostic_definitions=False, error_code_header_only=False, extra_b2_flags=None, filesystem_no_deprecated=False, header_only=False, i18n_backend=deprecated, i18n_backend_iconv=off, i18n_backend_icu=False, layout=system, lzma=False, magic_autolink=False, multithreading=True, namespace=boost, namespace_alias=False, numa=True, pch=True, python_executable=None, python_version=None, segmented_stacks=False, shared=False, system_no_deprecated=False, visibility=hidden, without_atomic=False, without_chrono=False, without_container=False, without_context=False, without_contract=False, without_coroutine=False, without_date_time=False, without_exception=False, without_fiber=False, without_filesystem=False, without_graph=False, without_graph_parallel=True, without_iostreams=False, without_json=False, without_locale=False, without_log=False, without_math=False, without_mpi=True, without_nowide=False, without_program_options=False, without_python=True, without_random=False, without_regex=False, without_serialization=False, without_stacktrace=False, without_system=False, without_test=False, without_thread=False, without_timer=False, without_type_erasure=False, without_wave=False, zlib=True, zstd=False, bzip2:build_executable=True, bzip2:shared=False, zlib:minizip=deprecated, zlib:shared=False - Dependencies: zlib/1.2.11, bzip2/1.0.8 - Requirements: bzip2/1.Y.Z, zlib/1.Y.Z - Package ID: 26dbaaaba8da289459e8e26b87c8d1b27c993041 ERROR: Missing prebuilt package for 'boost/1.77.0' Try to build from sources with '--build=boost' Use 'conan search --table table.html' Or read 'http://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package' C:\temp\testdir\build>conan install .. --build=boost Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=gcc compiler.libcxx=libstdc++11 compiler.version=7 os=Windows os_build=Windows [options] [build_requires] [env] boost/1.77.0: Forced build from source conanfile.txt: Installing package Requirements boost/1.77.0 from 'conancenter' - Cache bzip2/1.0.8 from 'conancenter' - Cache zlib/1.2.11 from 'conancenter' - Cache Packages boost/1.77.0:26dbaaaba8da289459e8e26b87c8d1b27c993041 - Build bzip2/1.0.8:456177cc52f814bf60d65d5b5889191eb5628935 - Cache zlib/1.2.11:42951bc9791ea38175dc6d678bd77956f88c4796 - Cache Build requirements b2/4.5.0 from 'conancenter' - Cache Build requirements packages b2/4.5.0:ca33edce272a279b24f87dc0d4cf5bbdcffbc187 - 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: C:\Users\lbrooks\.conan\data\bzip2\1.0.8\_\_\package\456177cc52f814bf60d65d5b5889191eb5628935\bin zlib/1.2.11: Already installed! boost/1.77.0: Applying build-requirement: b2/4.5.0 boost/1.77.0: WARN: Build folder is dirty, removing it: C:\.conan\4456da\1 boost/1.77.0: Building your package in C:\.conan\4456da\1 boost/1.77.0: Generator txt created conanbuildinfo.txt boost/1.77.0: Aggregating env generators boost/1.77.0: Calling build() WARN: replace_in_file didn't find pattern '/* thread_local */' in 'C:\.conan\4e2957\1\source_subfolder\boost\stacktrace\detail\libbacktrace_impls.hpp' file. WARN: replace_in_file didn't find pattern '/* static __thread */' in 'C:\.conan\4e2957\1\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 'C:\.conan\4e2957\1\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 'C:\.conan\4e2957\1\source_subfolder\tools\build\src\tools\gcc.jam' file. WARN: replace_in_file didn't find pattern ' @numa' in 'C:\.conan\4e2957\1\source_subfolder\libs\fiber\build\Jamfile.v2' file. boost/1.77.0: WARN: Patching user-config.jam boost/1.77.0: WARN: using zlib : 1.2.11 : "C:/Users/lbrooks/.conan/data/zlib/1.2.11/_/_/package/42951bc9791ea38175dc6d678bd77956f88c4796/include" "C:/Users/lbrooks/.conan/data/zlib/1.2.11/_/_/package/42951bc9791ea38175dc6d678bd77956f88c4796/lib" zlib ; using bzip2 : 1.0.8 : "C:/Users/lbrooks/.conan/data/bzip2/1.0.8/_/_/package/456177cc52f814bf60d65d5b5889191eb5628935/include" "C:/Users/lbrooks/.conan/data/bzip2/1.0.8/_/_/package/456177cc52f814bf60d65d5b5889191eb5628935/lib" bz2 ; using "gcc" : : C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/bin/g++.exe : ; boost/1.77.0: WARN: b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:\.conan\4e2957\1\source_subfolder\tools\build\user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=off --disable-iconv threading=multi visibility=hidden link=static 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-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 pch=on cxxflags="-fPIC" install --prefix=C:\.conan\f8370a\1 -j16 --abbreviate-paths -d0 --debug-configuration --build-dir="C:\.conan\4456da\1" notice: found boost-build.jam at C:/.conan/4e2957/1/source_subfolder/boost-build.jam notice: loading B2 from C:/.conan/4e2957/1/source_subfolder/tools/build/src/bootstrap.jam warning: mismatched versions of B2 engine and core warning: B2 engine (b2.exe) is 4.5.0 warning: B2 core (at C:/.conan/4e2957/1/source_subfolder/tools/build/src) is 4.6-git notice: Searching 'U:\' 'C:\Users\lbrooks' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/kernel' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/util' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/build' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/tools' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/contrib' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/.' for site-config configuration file 'site-config.jam'. notice: Configuration file 'site-config.jam' not found in 'U:\' 'C:\Users\lbrooks' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/kernel' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/util' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/build' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/tools' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/contrib' 'C:/.conan/4e2957/1/source_subfolder/tools/build/src/.'. notice: Loading explicitly specified user configuration file: C:\.conan\4e2957\1\source_subfolder\tools\build\user-config.jam notice: Searching 'C:\.conan\4e2957\1\source_subfolder\tools\build' for user-config configuration file 'user-config.jam'. notice: Loading user-config configuration file 'user-config.jam' from 'C:/.conan/4e2957/1/source_subfolder/tools/build'. notice: [zlib] Using pre-installed library notice: [zlib] Condition notice: [bzip2] Using pre-installed library notice: [bzip2] Condition notice: will use 'C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/bin/g++.exe' for gcc, condition gcc-7 notice: using gcc libraries :: gcc-7 :: C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/bin C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/lib C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/lib32 C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/lib64 notice: using gcc archiver :: gcc-7 :: C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/x86_64-w64-mingw32/bin/ar.exe notice: using gcc ranlib :: gcc-7 :: C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/x86_64-w64-mingw32/bin/ranlib.exe notice: using rc compiler :: gcc-7 :: C:\MentorGraphics\CapitalVSTARIntegrator\svx\tools\mingw32-x86_64-w64\bin\windres.exe notice: [zlib] zlib is already configured notice: [bzip2] bzip is already configured notice: iostreams: not using lzma compression notice: iostreams: not using zstd compression notice: [python-cfg] Configuring python... notice: [python-cfg] Checking interpreter command "python"... notice: [python-cfg] running command 'DIR /-C /A:S "C:\Users\lbrooks\AppData\Local\Programs\Python\Python310\python.exe" 2>&1' notice: [python-cfg] running command 'python -c "from sys import *; print('version=%d.%d\nplatform=%s\nprefix=%s\nexec_prefix=%s\nexecutable=%s' % (version_info[0],version_info[1],platform,prefix,exec_prefix,executable))" 2>&1' notice: [python-cfg] ...requested configuration matched! notice: [python-cfg] Details of this Python configuration: notice: [python-cfg] interpreter command: "python" notice: [python-cfg] include path: "C:\Users\lbrooks\AppData\Local\Programs\Python\Python310\Include" notice: [python-cfg] library path: "C:\Users\lbrooks\AppData\Local\Programs\Python\Python310\libs" notice: [python-cfg] DLL search path: "C:\Users\lbrooks\AppData\Local\Programs\Python\Python310" notice: [python-cfg] Checking for NumPy... notice: [python-cfg] running command 'python -c "import sys; sys.stderr = sys.stdout; import numpy; print(numpy.get_include())"' notice: [python-cfg] NumPy enabled Performing configuration checks - default address-model : 64-bit [1] - default architecture : x86 [1] - compiler supports SSE2 : yes [2] - compiler supports SSE4.1 : yes [2] - has synchronization.lib : no [2] - has std::atomic_ref : no [2] - has statx : no [2] - has statx syscall : no [2] - has BCrypt API : no [2] - is Windows CE : no [2] - has init_priority attribute : yes [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] - cxx11_auto_declarations : yes [2] - cxx11_constexpr : yes [2] - cxx11_defaulted_functions : yes [2] - cxx11_final : yes [2] - cxx11_hdr_mutex : no [2] - cxx11_hdr_tuple : yes [2] - cxx11_lambdas : yes [2] - cxx11_noexcept : yes [2] - cxx11_nullptr : yes [2] - cxx11_rvalue_references : yes [2] - cxx11_template_aliases : yes [2] - cxx11_thread_local : yes [2] - cxx11_variadic_templates : yes [2] - cxx11_auto_declarations : yes [3] - cxx11_constexpr : yes [3] - cxx11_defaulted_functions : yes [3] - cxx11_final : yes [3] - cxx11_hdr_mutex : no [3] - cxx11_hdr_tuple : yes [3] - cxx11_lambdas : yes [3] - cxx11_noexcept : yes [3] - cxx11_nullptr : yes [3] - cxx11_rvalue_references : yes [3] - cxx11_template_aliases : yes [3] - cxx11_thread_local : yes [3] - cxx11_variadic_templates : yes [3] - has_icu builds : no [2] - zlib : yes [4] - bzip2 : yes [4] - cxx11_decltype : yes [2] - cxx11_basic_alignas : yes [2] - native atomic int32 supported : yes [2] - has message compiler : no [2] - native syslog supported : no [2] - pthread supports robust mutexes : no [2] - compiler supports SSSE3 : yes [2] - compiler supports AVX2 : yes [2] - gcc visibility : yes [2] - sfinae_expr : yes [2] - cxx11_unified_initialization_syntax : yes [2] - cxx11_hdr_initializer_list : yes [2] - cxx11_hdr_chrono : yes [2] - cxx11_numeric_limits : yes [2] - cxx11_hdr_array : yes [2] - cxx11_hdr_atomic : yes [2] - cxx11_hdr_type_traits : yes [2] - cxx11_allocator : yes [2] - cxx11_explicit_conversion_operators : yes [2] - gcc visibility : yes [5] - cxx11_noexcept : yes [5] - cxx11_rvalue_references : yes [5] - sfinae_expr : yes [5] - cxx11_auto_declarations : yes [5] - cxx11_lambdas : yes [5] - cxx11_unified_initialization_syntax : yes [5] - cxx11_hdr_tuple : yes [5] - cxx11_hdr_initializer_list : yes [5] - cxx11_hdr_chrono : yes [5] - cxx11_thread_local : yes [5] - cxx11_constexpr : yes [5] - cxx11_nullptr : yes [5] - cxx11_numeric_limits : yes [5] - cxx11_decltype : yes [5] - cxx11_hdr_array : yes [5] - cxx11_hdr_atomic : yes [5] - cxx11_hdr_type_traits : yes [5] - cxx11_allocator : yes [5] - cxx11_explicit_conversion_operators : yes [5] - long double support : yes [5] - cxx11_static_assert : yes [2] - std::fstream is moveable and swappable : yes [2] - Has Large File Support : yes [2] - Has attribute init_priority : yes [2] - libbacktrace builds : no [2] - libbacktrace builds : no [3] - addr2line builds : no [2] - addr2line builds : no [3] - WinDbg builds : yes [2] - WinDbg builds : yes [3] - WinDbgCached builds : no [2] - WinDbgCached builds : no [3] - BOOST_COMP_GNUC >= 4.3.0 : yes [2] [1] gcc-7 [2] gcc-7/rls/bst.l-off/bst.l-off/lnk-sttc/nm-on/pythn-3.10/thrdp-wn32/thrd-mlt/vsblt-hdn [3] gcc-7/rls/bst.l-off/bst.l-off/bld-no/lnk-sttc/nm-on/pythn-3.10/thrdp-wn32/thrd-mlt/vsblt-hdn [4] lnk-sttc [5] gcc-7/rls/bst.l-off/bst.l-off/lnk-sttc/nm-on/pch-off/pythn-3.10/thrdp-wn32/thrd-mlt/vsblt-hdn Component configuration: - atomic : building - chrono : building - container : building - context : building - contract : building - coroutine : building - date_time : building - exception : building - fiber : 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 : not building - random : building - regex : building - serialization : building - stacktrace : building - system : building - test : building - thread : building - timer : building - type_erasure : building - wave : building ...failed updating 18 targets... boost/1.77.0: boost/1.77.0: ERROR: Package '26dbaaaba8da289459e8e26b87c8d1b27c993041' build failed boost/1.77.0: WARN: Build folder C:\.conan\4456da\1 ERROR: boost/1.77.0: Error in build() method, line 821 self.run(full_command, run_environment=True) ConanException: Error 1 while executing b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:\.conan\4e2957\1\source_subfolder\tools\build\user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=off --disable-iconv threading=multi visibility=hidden link=static 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-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 pch=on cxxflags="-fPIC" install --prefix=C:\.conan\f8370a\1 -j16 --abbreviate-paths -d0 --debug-configuration --build-dir="C:\.conan\4456da\1" C:\temp\testdir\build> ```
SSE4 commented 2 years ago

hard to say, can you build with -o boost:debug_level=1 or higher?

Buckskin commented 2 years ago

Hi - Thanks a ton. When I build with the debug_level I do see a bunch of compilation errors - they are all the same however:

error: 'mutex' in namespace 'std' does not name a type std::mutex m_mutex; ^~~~~

and:

error: 'mutex' is not a member of 'std' std::lock_guard l(m_mutex); ^~~~~

(after a quick web search...) I wonder if I need to install a different MingW setup with a different threading model (like pthreads instead of win32?). Hmmm ...

Here is the more detailed log:

Logs (Include/Attach if Applicable)

Click to expand log ``` [SNIP] gcc.compile.c++ C:\.conan\4456da\1\boost\bin.v2\libs\math\build\gcc-7\rls\lnk-sttc\nm-on\pch-off\thrd-mlt\vsblt-hdn\erfc.o In file included from ./boost/math/special_functions/bernoulli.hpp:16:0, from ./boost/math/special_functions/gamma.hpp:35, from ./boost/math/special_functions/erf.hpp:15, from libs\math\build\..\src\tr1\erfc.cpp:11: ./boost/math/special_functions/detail/bernoulli_details.hpp:559:9: error: 'mutex' in namespace 'std' does not name a type std::mutex m_mutex; ^~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp: In member function 'OutputIterator boost::math::detail::bernoulli_numbers_cache::copy_bernoulli_numbers(OutputIterator, std::size_t, std::size_t, const Policy&)': ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: error: 'mutex' is not a member of 'std' std::lock_guard l(m_mutex); ^~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: error: 'mutex' is not a member of 'std' ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:395:36: error: template argument 1 is invalid std::lock_guard l(m_mutex); ^ ./boost/math/special_functions/detail/bernoulli_details.hpp:395:40: error: 'm_mutex' was not declared in this scope std::lock_guard l(m_mutex); ^~~~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:395:40: note: suggested alternative: 'm_counter' std::lock_guard l(m_mutex); ^~~~~~~ m_counter ./boost/math/special_functions/detail/bernoulli_details.hpp: In member function 'OutputIterator boost::math::detail::bernoulli_numbers_cache::copy_tangent_numbers(OutputIterator, std::size_t, std::size_t, const Policy&)': ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: error: 'mutex' is not a member of 'std' std::lock_guard l(m_mutex); ^~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: error: 'mutex' is not a member of 'std' ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:507:36: error: template argument 1 is invalid std::lock_guard l(m_mutex); ^ ./boost/math/special_functions/detail/bernoulli_details.hpp:507:40: error: 'm_mutex' was not declared in this scope std::lock_guard l(m_mutex); ^~~~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:507:40: note: suggested alternative: 'm_counter' std::lock_guard l(m_mutex); ^~~~~~~ m_counter In file included from ./boost/math/special_functions/polygamma.hpp:15:0, from ./boost/math/special_functions/gamma.hpp:36, from ./boost/math/special_functions/erf.hpp:15, from libs\math\build\..\src\tr1\erfc.cpp:11: ./boost/math/special_functions/detail/polygamma.hpp: In function 'T boost::math::detail::poly_cot_pi(int, T, T, const Policy&, const char*)': ./boost/math/special_functions/detail/polygamma.hpp:410:18: error: 'mutex' in namespace 'std' does not name a type static std::mutex m; ^~~~~ ./boost/math/special_functions/detail/polygamma.hpp:411:27: error: 'mutex' is not a member of 'std' std::lock_guard l(m); ^~~~~ ./boost/math/special_functions/detail/polygamma.hpp:411:27: note: suggested alternative: 'quoted' std::lock_guard l(m); ^~~~~ quoted ./boost/math/special_functions/detail/polygamma.hpp:411:27: error: 'mutex' is not a member of 'std' ./boost/math/special_functions/detail/polygamma.hpp:411:27: note: suggested alternative: 'quoted' std::lock_guard l(m); ^~~~~ quoted ./boost/math/special_functions/detail/polygamma.hpp:411:32: error: template argument 1 is invalid std::lock_guard l(m); ^ ./boost/math/special_functions/detail/polygamma.hpp:411:36: error: 'm' was not declared in this scope std::lock_guard l(m); ^ "C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/bin/g++.exe" -fvisibility-inlines-hidden -m64 -mthreads -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fPIC -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_USE_NUMA -DNDEBUG -D_GLIBCXX_USE_CXX11_ABI=1 -I"." -I"libs\math\src\tr1" -c -o "C:\.conan\4456da\1\boost\bin.v2\libs\math\build\gcc-7\rls\lnk-sttc\nm-on\pch-off\thrd-mlt\vsblt-hdn\erfc.o" "libs\math\build\..\src\tr1\erfc.cpp" ...failed gcc.compile.c++ C:\.conan\4456da\1\boost\bin.v2\libs\math\build\gcc-7\rls\lnk-sttc\nm-on\pch-off\thrd-mlt\vsblt-hdn\erfc.o... gcc.compile.c++ C:\.conan\4456da\1\boost\bin.v2\libs\math\build\gcc-7\rls\lnk-sttc\nm-on\pch-off\thrd-mlt\vsblt-hdn\erf.o In file included from ./boost/math/special_functions/bernoulli.hpp:16:0, from ./boost/math/special_functions/gamma.hpp:35, from ./boost/math/special_functions/erf.hpp:15, from libs\math\build\..\src\tr1\erf.cpp:11: ./boost/math/special_functions/detail/bernoulli_details.hpp:559:9: error: 'mutex' in namespace 'std' does not name a type std::mutex m_mutex; ^~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp: In member function 'OutputIterator boost::math::detail::bernoulli_numbers_cache::copy_bernoulli_numbers(OutputIterator, std::size_t, std::size_t, const Policy&)': ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: error: 'mutex' is not a member of 'std' std::lock_guard l(m_mutex); ^~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: error: 'mutex' is not a member of 'std' ./boost/math/special_functions/detail/bernoulli_details.hpp:395:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:395:36: error: template argument 1 is invalid std::lock_guard l(m_mutex); ^ ./boost/math/special_functions/detail/bernoulli_details.hpp:395:40: error: 'm_mutex' was not declared in this scope std::lock_guard l(m_mutex); ^~~~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:395:40: note: suggested alternative: 'm_counter' std::lock_guard l(m_mutex); ^~~~~~~ m_counter ./boost/math/special_functions/detail/bernoulli_details.hpp: In member function 'OutputIterator boost::math::detail::bernoulli_numbers_cache::copy_tangent_numbers(OutputIterator, std::size_t, std::size_t, const Policy&)': ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: error: 'mutex' is not a member of 'std' std::lock_guard l(m_mutex); ^~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: error: 'mutex' is not a member of 'std' ./boost/math/special_functions/detail/bernoulli_details.hpp:507:31: note: suggested alternative: 'quoted' std::lock_guard l(m_mutex); ^~~~~ quoted ./boost/math/special_functions/detail/bernoulli_details.hpp:507:36: error: template argument 1 is invalid std::lock_guard l(m_mutex); ^ ./boost/math/special_functions/detail/bernoulli_details.hpp:507:40: error: 'm_mutex' was not declared in this scope std::lock_guard l(m_mutex); ^~~~~~~ ./boost/math/special_functions/detail/bernoulli_details.hpp:507:40: note: suggested alternative: 'm_counter' std::lock_guard l(m_mutex); ^~~~~~~ m_counter In file included from ./boost/math/special_functions/polygamma.hpp:15:0, from ./boost/math/special_functions/gamma.hpp:36, from ./boost/math/special_functions/erf.hpp:15, from libs\math\build\..\src\tr1\erf.cpp:11: ./boost/math/special_functions/detail/polygamma.hpp: In function 'T boost::math::detail::poly_cot_pi(int, T, T, const Policy&, const char*)': ./boost/math/special_functions/detail/polygamma.hpp:410:18: error: 'mutex' in namespace 'std' does not name a type static std::mutex m; ^~~~~ ./boost/math/special_functions/detail/polygamma.hpp:411:27: error: 'mutex' is not a member of 'std' std::lock_guard l(m); ^~~~~ ./boost/math/special_functions/detail/polygamma.hpp:411:27: note: suggested alternative: 'quoted' std::lock_guard l(m); ^~~~~ quoted ./boost/math/special_functions/detail/polygamma.hpp:411:27: error: 'mutex' is not a member of 'std' ./boost/math/special_functions/detail/polygamma.hpp:411:27: note: suggested alternative: 'quoted' std::lock_guard l(m); ^~~~~ quoted ./boost/math/special_functions/detail/polygamma.hpp:411:32: error: template argument 1 is invalid std::lock_guard l(m); ^ ./boost/math/special_functions/detail/polygamma.hpp:411:36: error: 'm' was not declared in this scope std::lock_guard l(m); ^ "C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/mingw32-x86_64-w64/bin/g++.exe" -fvisibility-inlines-hidden -m64 -mthreads -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fPIC -fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_USE_NUMA -DNDEBUG -D_GLIBCXX_USE_CXX11_ABI=1 -I"." -I"libs\math\src\tr1" -c -o "C:\.conan\4456da\1\boost\bin.v2\libs\math\build\gcc-7\rls\lnk-sttc\nm-on\pch-off\thrd-mlt\vsblt-hdn\erf.o" "libs\math\build\..\src\tr1\erf.cpp" ...failed [SNIP] ```
SSE4 commented 2 years ago

seems like it needs C++11, try settings cppstd=11 in your profile

Buckskin commented 2 years ago

seems like it needs C++11, try settings cppstd=11 in your profile

Same error. I will now try to install the most recent mingw-64 -- and make sure to select the posix threading model. Let's see ...

SSE4 commented 2 years ago

not sure if it's still accurate: https://stackoverflow.com/a/66601034 seems like they do not fully support C++11 in some modes (at least it was so in MinGW 5.3.0)

SSE4 commented 2 years ago

one workaround could be to disable threading, if you don't need it (BOOST_DISABLE_THREADS): https://www.boost.org/doc/libs/1_76_0/libs/config/doc/html/index.html#boost_config.configuring_boost_for_your_platform.user_settable_options alternatively, you can build without boost::math, if it's not needed (-o boost:without_math=True option)

Buckskin commented 2 years ago

I will now try to install the most recent mingw-64 -- and make sure to select the posix threading model. Let's see ...

I tried the most recent mingw-64: x86_64-8.1.0-posix-seh-rt_v6-rev0.

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

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=8.1
compiler.libcxx=libstdc++11
compiler.exception=seh
compiler.threads=posix
build_type=Release
[options]
[build_requires]
[env]

It solved the mutex errors but now I get a new error.

gcc.compile.c++ C:.conan\55fe32\1\boost\bin.v2\libs\fiber\build\gcc-8\rls\lnk-sttc\nm-on\thrd-mlt\vsblt-hdn\numa\windows\pin_thread.o libs\fiber\src\numa\windows\pin_thread.cpp: In function 'void boost::fibers::numa::pin_thread(uint32_t)': libs\fiber\src\numa\windows\pin_thread.cpp:26:42: error: invalid conversion from 'HANDLE' {aka 'void*'} to 'std::thread::native_handle_type' {aka 'long long unsigned int'} [-fpermissive] pin_thread( cpuid, ::GetCurrentThread() );



> alternatively, you can build without boost::math, if it's not needed (-o boost:without_math=True option)

Gives me this error: 

`ERROR: There are invalid packages (packages that cannot exist for this configuration):
boost/1.77.0: Invalid ID: graph requires ['math', 'random', 'regex', 'serialization']: math is disabled
`

Is there a way to find a list of '-o boost' options? I am trying to learn how to set 'BOOST_DISABLE_THREADS'.
Buckskin commented 2 years ago

error: invalid conversion from 'HANDLE' {aka 'void*'} to 'std:🧵:native_handle_type' {aka 'long long unsigned int'}

This seems related but I am not sure how to set 'numa=on':

https://github.com/boostorg/fiber/issues/172

Buckskin commented 2 years ago

This seems related but I am not sure how to set 'numa=on':

Found it: '-o boost:numa=True'

But received the same error.

SSE4 commented 2 years ago

This seems related but I am not sure how to set 'numa=on': there is an option for it, it's called numa

Is there a way to find a list of '-o boost' options? I am trying to learn how to set 'BOOST_DISABLE_THREADS'. you may use conan inspect:

$ conan inspect boost/1.77.0@ -a options

there is also super-useful (especially for testing) option called extra_b2_flags which allows to propagate arbitrary b2 flags, e.g.:

-o boost:extra_b2_flags="numa=on"

or

-o boost:extra_b2_flags="defines=BOOST_DISABLE_THREADS"
SpaceIm commented 2 years ago

Might be the same issue than https://github.com/conan-io/conan-center-index/issues/4764

Workaround: disable fiber (-o boost:without_fiber=True) https://github.com/conan-io/conan-center-index/issues/4764#issuecomment-845807588

SSE4 commented 2 years ago

reading boostorg/fiber#172, it seems like setting numa=off is the solution (the opposite) at least, the same NUMA sources are used for Windows: https://github.com/boostorg/fiber/blob/develop/build/Jamfile.v2#L118 and these sources use Win32 API casting std::thread::native_handle_t to HANDLE: https://github.com/boostorg/fiber/blob/develop/src/numa/windows/pin_thread.cpp#L40 regardless of thread API (so I think setting threadapi will have no effect).

Buckskin commented 2 years ago

reading boostorg/fiber#172, it seems like setting numa=off is the solution (the opposite) at least, the same NUMA sources are used for Windows: https://github.com/boostorg/fiber/blob/develop/build/Jamfile.v2#L118 and these sources use Win32 API casting std::thread::native_handle_t to HANDLE: https://github.com/boostorg/fiber/blob/develop/src/numa/windows/pin_thread.cpp#L40 regardless of thread API (so I think setting threadapi will have no effect).

Yes, it seems so. I have tried both numa=on and numa=off to no effect.

Buckskin commented 2 years ago

-o boost:extra_b2_flags="defines=BOOST_DISABLE_THREADS"

This moved the error. (I used 'define' instead of 'defines'). Now I get:

Logs (Include/Attach if Applicable)

Click to expand log ``` [SNIP] gcc.compile.c++ C:\.conan\012ab9\1\boost\bin.v2\libs\locale\build\gcc-8\rls\lnk-sttc\nm-on\thrd-mlt\vsblt-hdn\shared\date_time.o In file included from ./boost/thread/detail/platform.hpp:17, from ./boost/thread/detail/config.hpp:13, from ./boost/thread/lock_algorithms.hpp:10, from ./boost/thread/locks.hpp:10, from libs\locale\src\shared\date_time.cpp:11: ./boost/config/requires_threads.hpp:29:4: error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" # error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" ^~~~~ "C:/MentorGraphics/CapitalVSTARIntegrator/svx/tools/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/g++.exe" -fvisibility-inlines-hidden -m64 -mthreads -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -fPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_DISABLE_THREADS -DBOOST_LOCALE_NO_POSIX_BACKEND=1 -DBOOST_THREAD_NO_LIB=1 -DBOOST_USE_NUMA -DNDEBUG -D_GLIBCXX_USE_CXX11_ABI=1 -I"." -c -o "C:\.conan\012ab9\1\boost\bin.v2\libs\locale\build\gcc-8\rls\lnk-sttc\nm-on\thrd-mlt\vsblt-hdn\shared\date_time.o" "libs\locale\src\shared\date_time.cpp" ...failed gcc.compile.c++ C:\.conan\012ab9\1\boost\bin.v2\libs\locale\build\gcc-8\rls\lnk-sttc\nm-on\thrd-mlt\vsblt-hdn\shared\date_time.o... [SNIP] ...failed updating 3 targets... ...updated 415 targets... boost/1.77.0: boost/1.77.0: ERROR: Package '81afc6c04a6b431a324c582c358e796fe6483791' build failed boost/1.77.0: WARN: Build folder C:\.conan\012ab9\1 ERROR: boost/1.77.0: Error in build() method, line 821 self.run(full_command, run_environment=True) ConanException: Error 1 while executing b2.exe -q numa=on target-os=windows architecture=x86 address-model=64 binary-format=pe abi=ms --layout=system --user-config=C:\.conan\4e2957\1\source_subfolder\tools\build\user-config.jam -sNO_ZLIB=0 -sNO_BZIP2=0 -sNO_LZMA=1 -sNO_ZSTD=1 boost.locale.icu=off --disable-icu boost.locale.iconv=off --disable-iconv threading=multi visibility=hidden link=static 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-random --with-regex --with-serialization --with-stacktrace --with-system --with-test --with-thread --with-timer --with-type_erasure --with-wave toolset=gcc define=_GLIBCXX_USE_CXX11_ABI=1 pch=on cxxflags="-fPIC" define=BOOST_DISABLE_THREADS install --prefix=C:\.conan\a4b16c\1 -j16 --abbreviate-paths -d1 --debug-configuration --build-dir="C:\.conan\012ab9\1" ```

I then tried to disable date_time, but it complained that other features I need depend on it. I will try your other suggestions.

Buckskin commented 2 years ago

Workaround: disable fiber (-o boost:without_fiber=True) #4764 (comment)

SUCCESS! Thanks so much. However, now I get a linker error in the package that depends on this. I doubt it is related to the 'without_fiber=True' workaround, but just in case someone knows ... here is the linker error:

undefined reference to `_beginthreadex'

This seems to be related also to posix support. So, I went back and tried the 'without_fiber=True' workaround with the gcc MinGW compiler with win32 threading model, and landed back into the first mutex issue that was solved going to the posix mingw. Sigh. :-)

Buckskin commented 2 years ago

Hello again. Can you please tell me the protocol for closing an issue?

For this issue, the community has been very helpful and kind with their time. Should we close it? Although I am not out of the woods, a reasonable workaround was provided (-o boost:without_fiber=True). I cannot tell at this point whether my downstream issues are because of the workaround - but, I doubt they are. The next issue in my journey here is #7665 (same configuration).

By the way, my project end goal here is to use the fmi4cpp package that depends on these other packages I am trying to build. I am restricted to the GCC MinGW 64 tools.

Thanks again all!

SSE4 commented 2 years ago

Hello again. Can you please tell me the protocol for closing an issue?

there is no protocol except common sense. if you fill there is no problem in recipe, you may close the issue.

undefined reference to `_beginthreadex'

_beginthreadex is a CRT function: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/beginthread-beginthreadex?view=msvc-160

Buckskin commented 2 years ago

Hello everyone, thanks again for the help. I want to update a new finding and summarize the solution here before I close this issue.

The update is: I needed to upgrade the compiler version because of another dependency in the ultimate library I am trying to build (fmi4cpp). The related issue is: #7665. When I did this, another issue in the boost library build emerged and I had to remove another feature using -o boost:without_stacktrace=True.

Here is the working conan install command:

conan install .. --build=missing -o boost:without_fiber=True -o boost:without_stacktrace=True

Here is the working profile for gcc version 11.2.0 (MinGW-W64 x86_64-ucrt-posix-seh) installed at C:\winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2\mingw64\bin.

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

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
[options]
[conf]
[build_requires]
[env]
PATH=['C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2/mingw64/bin']
CC=C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2/mingw64/bin/gcc.exe
CXX=C:/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64ucrt-9.0.0-r2/mingw64/bin/gcc.exe