首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Linux操作系统下boost光纤库的交叉编译

Linux操作系统下boost光纤库的交叉编译
EN

Stack Overflow用户
提问于 2019-03-17 08:29:30
回答 1查看 291关注 0票数 0

我正在以以下方式构建boost库:

我的~/user-config.jam是:

代码语言:javascript
复制
using gcc : : /mxe/usr/bin/x86_64-w64-mingw32.static.posix-g++ : <compileflags>-W <compileflags>-Wall <compileflags>-std=c++11 <compileflags>-pedantic ;

使用以下标志启动生成过程:

代码语言:javascript
复制
./b2 --user-config=/home/cuser/user-config.jam variant=release link=static threading=multi define=BOOST_LOG_USE_COMPILER_TLS threadapi=win32 target-os=windows architecture=x86 address-model=64 abi=ms binary-format=pe  cxxflags=-std=c++11 --without-python --debug-building

这可以很好地构建大多数库,但是光纤库并不是因此而构建的。相关产出:

代码语言:javascript
复制
...........
                 Building target './fiber-for-install'
                     Build request: object(property-set)@2258 <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on
                     Command line free features: <cxxflags>-std=c++11 <define>BOOST_LOG_USE_COMPILER_TLS
                     Target requirements: <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.handle-static-runtime <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-address-model <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-architecture <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%threadapi-feature.detect <define>BOOST_ALL_NO_LIB=1 <include>. <relevant>define:<relevant>toolset <relevant>link:<relevant>toolset <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <xsl:param>boost.defaults=Boost

                     Common properties:  <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <cxxflags>-std=c++11 <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <define>BOOST_ALL_NO_LIB=1 <define>BOOST_LOG_USE_COMPILER_TLS <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>linux <include>. <inlining>full <install-dependencies>off <link>static <local-visibility>hidden <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <relevant>define:<relevant>toolset <relevant>link:<relevant>toolset <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <user-interface>console <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <xsl:param>boost.defaults=Boost
                     building project Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>  ('object(project-target)@765') with <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on

                         Building target 'libs/fiber/build/boost_fiber'
                             Build request: object(property-set)@2258 <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on
                             Command line free features: <cxxflags>-std=c++11 <define>BOOST_LOG_USE_COMPILER_TLS

                    Target requirements: <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.handle-static-runtime <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-address-model <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-architecture <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%threadapi-feature.detect <define>BOOST_ALL_NO_LIB=1 <include>. <relevant>define:<relevant>toolset <relevant>link:<relevant>toolset <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <xsl:param>boost.defaults=Boost

                     Common properties:  <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <cxxflags>-std=c++11 <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <define>BOOST_ALL_NO_LIB=1 <define>BOOST_LOG_USE_COMPILER_TLS <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>linux <include>. <inlining>full <install-dependencies>off <link>static <local-visibility>hidden <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <relevant>define:<relevant>toolset <relevant>link:<relevant>toolset <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <user-interface>console <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <xsl:param>boost.defaults=Boost
                     building project Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>  ('object(project-target)@765') with <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on

                         Building target 'libs/fiber/build/boost_fiber'
                             Build request: object(property-set)@2258 <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on
                             Command line free features: <cxxflags>-std=c++11 <define>BOOST_LOG_USE_COMPILER_TLS
                             Target requirements: <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@798.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@799.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@800.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@801.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@802.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@803.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@804.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@805.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@806.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@807.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@808.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@809.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@810.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.handle-static-runtime <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-address-model <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-architecture <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%threadapi-feature.detect <define>BOOST_ALL_NO_LIB=1 <define>BOOST_FIBERS_SOURCE <implicit-dependency>/boost//headers <include>. <library>/boost/context//boost_context <library>/boost/filesystem//boost_filesystem <link>shared:<define>BOOST_FIBERS_DYN_LINK=1 <link>shared:<library>/workspace/3rdparty/boost_1_69_0/libs/context/build//boost_context <relevant>build:<relevant>address-model <relevant>build:<relevant>architecture <relevant>build:<relevant>cxxstd <relevant>build:<relevant>cxxstd-dialect <relevant>build:<relevant>target-os <relevant>build:<relevant>toolset <relevant>build:<relevant>toolset-gcc:version <relevant>cxxflags:<relevant>segmented-stacks <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>target-os <relevant>define:<relevant>toolset <relevant>library:<relevant>link <relevant>link:<relevant>toolset <relevant>linkflags:<relevant>target-os <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <target-os>solaris:<linkflags>-llgrp <target-os>windows:<define>_WIN32_WINNT=0x0601 <threading>multi <toolset>clang,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS <toolset>clang,<segmented-stacks>on:<cxxflags>-fsplit-stack <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS <toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack <xsl:param>boost.defaults=Boost

.....
                         Building target 'libs/fiber/build/boost_fiber_numa'
                             Build request: object(property-set)@2258 <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <context-impl>fcontext <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <exception-handling>on <extern-c-nothrow>off <inlining>full <link>static <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on
                             Command line free features: <cxxflags>-std=c++11 <define>BOOST_LOG_USE_COMPILER_TLS
                             Target requirements: <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>.numa <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@843.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@844.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@845.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@846.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@847.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@848.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@849.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@850.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@851.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@852.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@853.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@854.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0/libs/fiber/build>%object(check-target-builds-worker)@855.check <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.handle-static-runtime <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-address-model <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%boostcpp.deduce-architecture <conditional>@Jamfile</workspace/3rdparty/boost_1_69_0>%threadapi-feature.detect <define>BOOST_ALL_NO_LIB=1 <define>BOOST_FIBERS_SOURCE <implicit-dependency>/boost//headers <include>. <library>/boost/context//boost_context <library>/boost/filesystem//boost_filesystem <link>shared:<define>BOOST_FIBERS_DYN_LINK=1 <relevant>build:<relevant>address-model <relevant>build:<relevant>architecture <relevant>build:<relevant>cxxstd <relevant>build:<relevant>cxxstd-dialect <relevant>build:<relevant>target-os <relevant>build:<relevant>toolset <relevant>build:<relevant>toolset-gcc:version <relevant>cxxflags:<relevant>segmented-stacks <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>target-os <relevant>define:<relevant>toolset <relevant>link:<relevant>toolset <relevant>linkflags:<relevant>target-os <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <target-os>solaris:<linkflags>-llgrp <target-os>windows:<define>_WIN32_WINNT=0x0601 <threading>multi <toolset>clang,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS <toolset>clang,<segmented-stacks>on:<cxxflags>-fsplit-stack <toolset>como-linux:<define>_GNU_SOURCE=1 <toolset>como:<link>static <toolset>gcc,<segmented-stacks>on:<cxxflags>-DBOOST_USE_SEGMENTED_STACKS <toolset>gcc,<segmented-stacks>on:<cxxflags>-fsplit-stack <xsl:param>boost.defaults=Boost

                             Common properties:  <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <build>no <context-impl>fcontext <cxxflags>-std=c++11 <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <define>BOOST_ALL_NO_LIB=1 <define>BOOST_FIBERS_SOURCE <define>BOOST_LOG_USE_COMPILER_TLS <define>NDEBUG <define>_WIN32_WINNT=0x0601 <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>linux <implicit-dependency>/boost//headers <include>. <inlining>full <install-dependencies>off <library>/boost/context//boost_context <library>/boost/filesystem//boost_filesystem <link>static <local-visibility>hidden <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <relevant>build:<relevant>address-model <relevant>build:<relevant>architecture <relevant>build:<relevant>cxxstd <relevant>build:<relevant>cxxstd-dialect <relevant>build:<relevant>target-os <relevant>build:<relevant>toolset <relevant>build:<relevant>toolset-gcc:version <relevant>cxxflags:<relevant>segmented-stacks <relevant>cxxflags:<relevant>toolset <relevant>define:<relevant>link <relevant>define:<relevant>target-os <relevant>define:<relevant>toolset <relevant>link:<relevant>toolset <relevant>linkflags:<relevant>target-os <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <user-interface>console <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <xsl:param>boost.defaults=Boost

                     Usage requirements for fiber-for-install:  <build>no
                     Build properties:  <abi>ms <address-model>64 <architecture>x86 <asynch-exceptions>off <binary-format>pe <build>no <context-impl>fcontext <cxxflags>-std=c++11 <debug-symbols>off <deduced-address-model>64 <deduced-architecture>x86 <define>BOOST_ALL_NO_LIB=1 <define>BOOST_LOG_USE_COMPILER_TLS <define>NDEBUG <exception-handling>on <extern-c-nothrow>off <hardcode-dll-paths>true <host-os>linux <include>. <inlining>full <install-dependencies>off <link>static <local-visibility>hidden <optimization>speed <os>LINUX <pch>on <preserve-test-targets>on <profiling>off <python-debugging>off <python>2.7 <relevant>define:<relevant>toolset <relevant>link:<relevant>toolset <rtti>on <runtime-debugging>off <runtime-link>shared <stdlib>native <strip>off <suppress-import-lib>false <symlink-location>project-relative <tag>@Jamfile</workspace/3rdparty/boost_1_69_0>%Jamfile</workspace/3rdparty/boost_1_69_0>.tag <target-os>windows <testing.execute>on <threadapi>win32 <threading>multi <toolset-gcc:version>5.5.0 <toolset>gcc <user-interface>console <variant>release <vectorize>off <visibility>hidden <warnings-as-errors>off <warnings>on <xsl:param>boost.defaults=Boost
                     Usage requirements from fiber-for-install:  <build>no <include>.

........


gcc.compile.c++ bin.v2/libs/log/build/gcc-5.5.0/release/link-static/target-os-windows/threadapi-win32/threading-multi/visibility-hidden/exceptions.o
?building
    - context                  : building
    - contract                 : building
    - coroutine                : building
    - date_time                : building
    - exception                : building
    - fiber                    : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - log                      : building
    - math                     : building
    - mpi                      : 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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-03-17 17:01:02

似乎这是报告的构建错误:https://svn.boost.org/trac10/ticket/12520

如果取消了对光纤的c++11要求(但不对numa!),则纤维交叉编译很好

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55205199

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档