程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

Setting boost compilation options in conanfile.py

发布于2024-12-08 09:58     阅读(427)     评论(0)     点赞(22)     收藏(2)


I've got the following structure of conanfile.py for the purpose of installing boost in my macOS build machine. Apparently some boost components are not supported in this platform and should be omitted according to this post. Thus I need to apply the following settings. However, this is how they are configured in conanfile.txt, and I'm already working with conanfile.py, so I need to find the equivalent python code to this settings :

[options]
boost/*:with_stacktrace_backtrace=False
boost/*:without_locale=True

and here's my attempt to apply this configuration in conanfile.py.

from conan2 import ConanFile

class BoostExampleConan(ConanFile):
    name = "BoostExample"
    version = "1.0"
    settings = "os", "compiler", "build_type", "arch"
    requires = "boost/1.83.0"  
    generators = "CMakeDeps", "CMakeToolchain"
    default_options = {
        "boost:header_only": False
-->     "boost:with_stacktrace_backtrace"=False
-->     "boost:without_locale"=True
    }

    def layout(self):
        self.folders.source = "."
        self.folders.build = "build"

However, I still get the following error :

boost/1.83.0: WARN: Boost component 'locale' is missing libraries. Try building boost with '-o boost:without_locale'. (Option is not guaranteed to exist)
boost/1.83.0: WARN: Boost component 'stacktrace_addr2line' is missing libraries. Try building boost with '-o boost:without_stacktrace_addr2line'. (Option is not guaranteed to exist)
boost/1.83.0: WARN: Boost component 'stacktrace_backtrace' is missing libraries. Try building boost with '-o boost:without_stacktrace_backtrace'. (Option is not guaranteed to exist)
ERROR: boost/1.83.0: Error in package_info() method, line 2011
    raise ConanException(f"These libraries were expected to be built, but were not built: {non_built}")
    ConanException: These libraries were expected to be built, but were not built: {'boost_locale', 'boost_stacktrace_backtrace', 'boost_stacktrace_addr2line'}

解决方案


暂无回答



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:https://www.pythonheidong.com/blog/article/2046420/823f3ef03ad417d42e15/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

22 0
收藏该文
已收藏

评论内容:(最多支持255个字符)