2017-05-03 107 views
-1

我想建立提升纤维库,我不知道什么命令行参数传递给./b2。如何建立提升纤维库的分段堆栈支持

./b2 --reconfigure CXXFLAGS = “ - STD = C++ 14” 线程=多变种=释放连杆=共享--toolset = GCC横纹堆栈=上 执行配置检查

- 32-bit     : no 
- 64-bit     : yes 
- arm      : no 
- mips1     : no 
- power     : no 
- sparc     : no 
- x86      : yes 

构建Boost C++库。

- symlinks supported  : yes 
- C++11 mutex    : yes 
- lockfree boost::atomic_flag : yes 
- Boost.Config Feature Check: cxx11_auto_declarations : yes 
- Boost.Config Feature Check: cxx11_constexpr : yes 
- Boost.Config Feature Check: cxx11_defaulted_functions : yes 
- Boost.Config Feature Check: cxx11_final : yes 
- Boost.Config Feature Check: cxx11_hdr_tuple : yes 
- Boost.Config Feature Check: cxx11_lambdas : yes 
- Boost.Config Feature Check: cxx11_noexcept : yes 
- Boost.Config Feature Check: cxx11_nullptr : yes 
- Boost.Config Feature Check: cxx11_rvalue_references : yes 
- Boost.Config Feature Check: cxx11_template_aliases : yes 
- Boost.Config Feature Check: cxx11_thread_local : yes 
- Boost.Config Feature Check: cxx11_variadic_templates : yes 
- has_icu builds   : yes 

警告:图形库不包含基于MPI并行组件。 注意:要启用它们,请添加“使用mpi;”你的用户config.jam中 - zlib的:是 - bzip2的:没有 - 的iconv(libc中):是 - ICU:是 - 原生原子INT32支持:是 - 并行线程,支持稳健,互斥:是 - 编译器支持能见度:是 - 编译器的支持,SSSE3:是 - 编译器支持-AVX2:是 - GCC的知名度:是 - 长双支撑:是 警告:跳过可选的消息传递接口(MPI)库。 注意:要启用MPI支持,请添加“using mpi;”到user-config.jam。 注意:要抑制此消息,请将“--without-mpi”传递给bjam。 注意:否则,您可以放心地忽略此消息。

组件配置:

- atomic     : building 
- chrono     : building 
- container    : building 
- context     : building 
- coroutine    : building 
- coroutine2    : building 
- date_time    : building 
- exception    : building 
- fiber     : building 
- filesystem    : building 
- graph     : building 
- graph_parallel   : building 
- iostreams    : building 
- locale     : building 
- log      : building 
- math      : building 
- metaparse    : building 
- mpi      : building 
- program_options   : building 
- python     : building 
- random     : building 
- regex     : building 
- serialization   : building 
- signals     : building 
- system     : building 
- test      : building 
- thread     : building 
- timer     : building 
- type_erasure    : building 
- wave      : building 

gcc.link.dll bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/libboost_fiber.so.1.62.0 
/usr/bin/ld: bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/algo/algorithm.o: relocation R_X86_64_PC32 against undefined symbol `__morestack' can not be used when making a shared object; recompile with -fPIC 
/usr/bin/ld: final link failed: Bad value 
collect2: error: ld returned 1 exit status 

    "g++" -o "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/libboost_fiber.so.1.62.0" -Wl,-h -Wl,libboost_fiber.so.1.62.0 -shared -Wl,--start-group "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/algo/algorithm.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/algo/round_robin.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/algo/shared_work.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/barrier.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/condition_variable.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/context.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/fiber.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/future.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/mutex.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/properties.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/recursive_mutex.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/recursive_timed_mutex.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/timed_mutex.o" "bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/scheduler.o" "bin.v2/libs/context/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/libboost_context.so.1.62.0" -Wl,-Bstatic -Wl,-Bdynamic -lrt -Wl,--end-group -pthread -m64 

...failed gcc.link.dll bin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi/libboost_fiber.so.1.62.0... 
...skipped <pstage/lib>libboost_fiber.so.1.62.0 for lack of <pbin.v2/libs/fiber/build/gcc-5.4.0/release/segmented-stacks-on/threading-multi>libboost_fiber.so.1.62.0... 
...skipped <pstage/lib>libboost_fiber.so for lack of <pstage/lib>libboost_fiber.so.1.62.0... 

回答

0
因为 '链接=共享' 你需要添加 'LINKFLAGS = -lgcc'

(libgcc中含有分裂,堆栈相关的功能)