mozart/mozart2

build mozart2 on ubunut14.10 with gcc4.9 error

jiamo opened this issue · 2 comments

I follow this http://askubuntu.com/questions/26498/choose-gcc-and-g-version to install gcc 4.8 gcc4.9 in my ubuntu14.10. When setting to gcc 4.8. And build the mozart2 project It still include the gcc 4.9 header files, something like:

In file included from /home/ikfb/mozart2/mozart2/vm/boostenv/main/boostenv.hh:32:  
In file included from /home/ikfb/mozart2/mozart2/vm/boostenv/main/boostenv-decl.hh:35:  
In file included from /usr/include/boost/thread.hpp:13:  
In file included from /usr/include/boost/thread/thread.hpp:12:  
In file included from /usr/include/boost/thread/thread_only.hpp:12: 
In file included from /usr/include/boost/thread/detail/platform.hpp:14: 
In file included from /usr/include/boost/config.hpp:40:  
In file included from /usr/include/boost/config/select_stdlib_config.hpp:18:  
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cstddef:51:11: error: no member named 'max_align_t' in the global namespace  
  using ::max_align_t;

Is there similar way to set include file auto choose to /usr/lib/gcc/x86_64-linux-gnu/4.8
My cmake is:

  cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_DIR=../builds/llvm-release/                     
  -DGTEST_BUILD_DIR=../gtest-debug -DLLVM_SRC_DIR=../../externals/llvm/                             
  -DGTEST_SRC_DIR=../../externals/gtest -DCLANG_SRC_DIR=../../externals/llvm/tools/clang/     
  ../../mozart2

Hello (sorry for late answer),

This is a problem with old versions of LLVM and new GCC ones... Since Mozart don't compile easily with LLVM > 3.4, a good workaround for now is to apply this patch (which provide the definition) manually in the clang sources : http://reviews.llvm.org/rL201729 .

jiamo commented

Thanks. Soved my problem.