【问题标题】:Boost strange failures compiling and running Firebreath增加编译和运行 Firebreath 的奇怪故障
【发布时间】:2012-04-04 23:39:15
【问题描述】:

我今天在 Firebreath 中发现了一个非常奇怪的错误。我试图编译我的项目,在我的构建目录上执行make。我得到了一个huge output 有很多错误。我尝试从头开始运行一个新项目,但出现以下错误:

alucard@hell ~/Documentos/sc/build
> make
[  1%] Built target FireBreath_Cmake
[  2%] Building CXX object boost/libs/thread/CMakeFiles/boost_thread.dir/src/tss_null.cpp.o
  In file included from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/platform.hpp:17:0,
             from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/config.hpp:20,
             from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/libs/thread/src/tss_null.cpp:7:
   /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/config/requires_threads.hpp:29:4: error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
  In file included from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/config.hpp:20:0,
             from /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/libs/thread/src/tss_null.cpp:7:
    /home/alucard/Documentos/sc/firebreath/src/3rdParty/boost/boost/thread/detail/platform.hpp:67:9: error: #error "Sorry, no boost threads are available for this platform."
make[2]:  [boost/libs/thread/CMakeFiles/boost_thread.dir/src/tss_null.cpp.o] Error 1
make[1]:  [boost/libs/thread/CMakeFiles/boost_thread.dir/all] Error 2
make:  [all] Error 2

我的系统似乎有问题,但如果我尝试以下示例,我不会收到任何错误:

#include <boost/thread.hpp>

int main(int argc, char *argv[]) {
    return 0;
}

编译:g++ test.cpp -pthread -lboost_thread

有什么想法吗?

【问题讨论】:

    标签: boost firebreath


    【解决方案1】:

    为了解决我的问题,我必须做两件事:

    1. this 补丁应用到我位于src/3rdParty/boost/boost/config/stdlib 中的libstdcpp3.hpp 文件。
    2. 删除我的构建目录并重新运行prepmake.sh

    再次感谢@taxilian 的快速而有用的回答。

    【讨论】:

      【解决方案2】:

      尝试删除您的构建目录并重新运行 prepmake.sh;鉴于有多少其他人在使用 FireBreath 而没有遇到此问题,我只能猜测它并不是真正的 firebreath 错误,因此该错误很可能与 build/ 目录中的某些损坏有关。

      【讨论】:

        猜你喜欢
        • 2012-06-07
        • 1970-01-01
        • 2012-02-22
        • 1970-01-01
        • 1970-01-01
        • 2020-08-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多