简体   繁体   English

从github编译c ++ boost库时出错

[英]Error compiling c++ boost libraries from github

I have been trying to compile the c++ boost libraries downloaded from the boostorg github repo and I get the following error. 我一直在尝试编译从boostorg github repo下载的c ++ boost库,我收到以下错误。

...updating 968 targets...

darwin.compile.c++ bin.v2/libs/atomic/build/darwin-4.2.1/release/threading-multi/lockpool.o
libs/atomic/src/lockpool.cpp:31: error: expected unqualified-id before numeric constant
libs/atomic/src/lockpool.cpp:31: error: expected `)' before numeric constant
libs/atomic/src/lockpool.cpp:55: error: expected `}' at end of input
libs/atomic/src/lockpool.cpp:55: error: expected `}' at end of input
libs/atomic/src/lockpool.cpp:55: error: expected `}' at end of input
libs/atomic/src/lockpool.cpp:55: error: expected `}' at end of input

    "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -dynamic -gdwarf-2 -fexceptions -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_ATOMIC_SOURCE -DNDEBUG  -I"." -c -o "bin.v2/libs/atomic/build/darwin-4.2.1/release/threading-multi/lockpool.o" "libs/atomic/src/lockpool.cpp"

...failed darwin.compile.c++ bin.v2/libs/atomic/build/darwin-4.2.1/release/threading-multi/lockpool.o...
...skipped <pstage/lib>libboost_atomic.dylib for lack of <pbin.v2/libs/atomic/build/darwin-4.2.1/release/threading-multi>lockpool.o...
darwin.compile.c++ bin.v2/libs/system/build/darwin-4.2.1/release/threading-multi/error_code.o
darwin.link.dll stage/lib/libboost_system.dylib
darwin.compile.c++ bin.v2/libs/chrono/build/darwin-4.2.1/release/threading-multi/chrono.o
In file included from /usr/local/include/boost/mpl/or.hpp:43,
                 from /usr/local/include/boost/mpl/logical.hpp:17,
                 from /usr/local/include/boost/chrono/duration.hpp:40,
                 from /usr/local/include/boost/chrono/chrono.hpp:11,
                 from /usr/local/include/boost/chrono/detail/inlined/chrono.hpp:13,
                 from libs/chrono/src/chrono.cpp:14:
/usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:90: error: boost/mpl/aux_/preprocessed/gcc/or.hpp: No such file or directory
In file included from /usr/local/include/boost/mpl/and.hpp:42,
                 from /usr/local/include/boost/mpl/logical.hpp:18,
                 from /usr/local/include/boost/chrono/duration.hpp:40,
                 from /usr/local/include/boost/chrono/chrono.hpp:11,
                 from /usr/local/include/boost/chrono/detail/inlined/chrono.hpp:13,
                 from libs/chrono/src/chrono.cpp:14:
/usr/local/include/boost/mpl/aux_/include_preprocessed.hpp:37:90: error: boost/mpl/aux_/preprocessed/gcc/and.hpp: No such file or directory
In file included from /usr/local/include/boost/chrono/chrono.hpp:11,
                 from /usr/local/include/boost/chrono/detail/inlined/chrono.hpp:13,
                 from libs/chrono/src/chrono.cpp:14:
/usr/local/include/boost/chrono/duration.hpp:442: error: ‘and_’ is not a member of ‘boost::mpl’

This is exactly how I am doing it: 这正是我的做法:

git clone https://github.com/boostorg/boost.git
cd boost
git submodule init
git submodule update
./boostrap.sh
./b2

Any idea of what I am missing? 知道我错过了什么吗?

That github repository seems to be part of an in-progress effort to modularize boost into separate git repositories. 该github存储库似乎是正在进行的将模块化模块化为单独的git存储库的努力的一部分。 It appears to still have some issues. 它似乎仍有一些问题。 If you want to build the very latest development code, I would use the official svn trunk: 如果你想构建最新的开发代码,我会使用官方的svn trunk:

svn co http://svn.boost.org/svn/boost/trunk boost

If you just want the latest release (1.54) source though, you can download that here 如果您只想要最新版本(1.54)源代码,可以在此处下载

But if you specifically need a git mirror, this seems to be an up to date mirror of boost trunk. 但是如果你特别需要一个git镜像, 似乎是一个最新的增强中继镜像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM