Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Boost strange failures compiling and running Firebreath

I found a very strange bug with Firebreath today. I was trying to compile my project, doing a make over my build directory. I got a huge output with a lot errors. I tried running a new project from the scratch and I got these errors:

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

Seems a problem with my system, but if I try the following example, I don't get any error:

#include <boost/thread.hpp>

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

Compile with: g++ test.cpp -pthread -lboost_thread.

Any idea?

like image 653
Gabriel Muñumel Avatar asked Feb 21 '23 22:02

Gabriel Muñumel


1 Answers

To solve my problem, I had to do two things:

  1. Applied this patch to my libstdcpp3.hpp file located in src/3rdParty/boost/boost/config/stdlib.
  2. Delete my build directory and rerun the prepmake.sh.

Thanks to @taxilian again for the fast and useful answer.

like image 197
Gabriel Muñumel Avatar answered Feb 25 '23 06:02

Gabriel Muñumel