4

私は、clang++ 3.1 で Boost 1.50.0 をビルドしようとしています。デフォルトの darwin ツールセットを使用して Boost.Build をインストールしようとしましたが、コンパイラ エラーが発生します。

これを行う特定の方法はありますか?

graeme graeme-pc 13:35:14 /usr/local/boost_1_50_0
$ sudo /usr/local/bin/b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++"

Building the Boost C++ Libraries.


Performing configuration checks

    - has_icu builds           : no
warning: Graph library does not contain MPI-based parallel components.
note: to enable them, add "using mpi ;" to your user-config.jam
    - iconv (libc)             : no
    - iconv (separate)         : yes
    - icu                      : no
    - icu (lib64)              : no
    - gcc visibility           : yes
    - long double support      : yes
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.

Component configuration:

    - chrono                   : building
    - date_time                : building
    - exception                : building
    - filesystem               : building
    - graph                    : building
    - graph_parallel           : building
    - iostreams                : building
    - locale                   : building
    - math                     : building
    - mpi                      : building
    - program_options          : building
    - python                   : building
    - random                   : building
    - regex                    : building
    - serialization            : building
    - signals                  : building
    - system                   : building
    - test                     : building
    - thread                   : building
    - timer                    : building
    - wave                     : building

...patience...
...patience...
...patience...
...patience...
...found 8583 targets...
...updating 6 targets...
clang-darwin.compile.c++ bin.v2/libs/signals/build/clang-darwin-4.2.1/release/threading-multi/named_slot_map.o
libs/signals/src/named_slot_map.cpp:105:12: error: call to member function 'erase' is ambiguous
    groups.erase(group);
    ~~~~~~~^~~~~
/usr/bin/../lib/c++/v1/map:964:14: note: candidate function
    iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
             ^
/usr/bin/../lib/c++/v1/map:966:15: note: candidate function
    size_type erase(const key_type& __k)
              ^
/usr/bin/../lib/c++/v1/map:969:15: note: candidate function not viable: requires 2 arguments, but 1 was provided
    iterator  erase(const_iterator __f, const_iterator __l)
              ^
libs/signals/src/named_slot_map.cpp:128:26: error: call to member function 'erase' is ambiguous
    if (empty(g)) groups.erase(g++);
                  ~~~~~~~^~~~~
/usr/bin/../lib/c++/v1/map:964:14: note: candidate function
    iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
             ^
/usr/bin/../lib/c++/v1/map:966:15: note: candidate function
    size_type erase(const key_type& __k)
              ^
/usr/bin/../lib/c++/v1/map:969:15: note: candidate function not viable: requires 2 arguments, but 1 was provided
    iterator  erase(const_iterator __f, const_iterator __l)
              ^
2 errors generated.

    "clang++" -x c++ -O3 -std=c++11 -stdlib=libc++ -O3 -finline-functions -Wno-inline -Wall -DBOOST_ALL_NO_LIB=1 -DBOOST_SIGNALS_DYN_LINK=1 -DBOOST_SIGNALS_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/signals/build/clang-darwin-4.2.1/release/threading-multi/named_slot_map.o" "libs/signals/src/named_slot_map.cpp"

...failed clang-darwin.compile.c++ bin.v2/libs/signals/build/clang-darwin-4.2.1/release/threading-multi/named_slot_map.o...
...skipped <pstage/lib>libboost_signals.dylib for lack of <pbin.v2/libs/signals/build/clang-darwin-4.2.1/release/threading-multi>named_slot_map.o...
clang-darwin.compile.c++ bin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi/named_slot_map.o
libs/signals/src/named_slot_map.cpp:105:12: error: call to member function 'erase' is ambiguous
    groups.erase(group);
    ~~~~~~~^~~~~
/usr/bin/../lib/c++/v1/map:964:14: note: candidate function
    iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
             ^
/usr/bin/../lib/c++/v1/map:966:15: note: candidate function
    size_type erase(const key_type& __k)
              ^
/usr/bin/../lib/c++/v1/map:969:15: note: candidate function not viable: requires 2 arguments, but 1 was provided
    iterator  erase(const_iterator __f, const_iterator __l)
              ^
libs/signals/src/named_slot_map.cpp:128:26: error: call to member function 'erase' is ambiguous
    if (empty(g)) groups.erase(g++);
                  ~~~~~~~^~~~~
/usr/bin/../lib/c++/v1/map:964:14: note: candidate function
    iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
             ^
/usr/bin/../lib/c++/v1/map:966:15: note: candidate function
    size_type erase(const key_type& __k)
              ^
/usr/bin/../lib/c++/v1/map:969:15: note: candidate function not viable: requires 2 arguments, but 1 was provided
    iterator  erase(const_iterator __f, const_iterator __l)
              ^
2 errors generated.

    "clang++" -x c++ -O3 -std=c++11 -stdlib=libc++ -O3 -finline-functions -Wno-inline -Wall -DBOOST_ALL_NO_LIB=1 -DBOOST_SIGNALS_NO_LIB=1 -DNDEBUG -I"." -c -o "bin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi/named_slot_map.o" "libs/signals/src/named_slot_map.cpp"

...failed clang-darwin.compile.c++ bin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi/named_slot_map.o...
...skipped <pbin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi>libboost_signals.a(clean) for lack of <pbin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi>named_slot_map.o...
...skipped <pbin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi>libboost_signals.a for lack of <pbin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi>named_slot_map.o...
...skipped <pstage/lib>libboost_signals.a for lack of <pbin.v2/libs/signals/build/clang-darwin-4.2.1/release/link-static/threading-multi>libboost_signals.a...
...failed updating 2 targets...
...skipped 4 targets...
4

1 に答える 1

7

C++11がオンになっているclang++およびBoost1.50での既知のビルドの問題のようです

信号を作成しないことで問題を回避できます。次の手順でうまくいきました。

$ cd /usr/local/boost_1_50_0
$ sudo ./bootstrap.sh --with-toolset=clang
$ sudo ./b2 toolset=clang cxxflags="-std=c++11 -stdlib=libc++" linkflags="-stdlib=libc++" --without-signals
于 2012-08-18T14:29:22.957 に答える