[asio] clang++ duplicate symbol error when compiling http server2 example
I'm building boost trunk (r64316) using clang++ on mac os x 10.6. The standing library build/install went well, but I hit this error when trying to build one of the boost::asio examples: $ cd libs/asio/example/http/server2 $ ../../../../../bjam toolset=clang [...snip...] clang-darwin.compile.c++ ../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/win_main.o clang: warning: argument unused during compilation: '-O0' In file included from win_main.cpp:13: In file included from ../../../../../boost/asio.hpp:20: In file included from ../../../../../boost/asio/basic_datagram_socket.hpp:20: In file included from ../../../../../boost/asio/basic_socket.hpp:19: In file included from ../../../../../boost/asio/basic_io_object.hpp:20: In file included from ../../../../../boost/asio/io_service.hpp:684: In file included from ../../../../../boost/asio/impl/io_service.hpp:18: ../../../../../boost/asio/detail/service_registry.hpp:38:15: warning: unknown pragma ignored [-Wunknown-pragmas] # pragma GCC visibility push (default) ^ ../../../../../boost/asio/detail/service_registry.hpp:47:15: warning: unknown pragma ignored [-Wunknown-pragmas] # pragma GCC visibility pop ^ 2 warnings generated. common.mkdir ../../../../../bin.v2/libs/thread/build/clang-darwin-2.8/debug common.mkdir ../../../../../bin.v2/libs/thread/build/clang-darwin-2.8/debug/threading-multi common.mkdir ../../../../../bin.v2/libs/thread/build/clang-darwin-2.8/debug/threading-multi/pthread clang-darwin.compile.c++ ../../../../../bin.v2/libs/thread/build/clang-darwin-2.8/debug/threading-multi/pthread/thread.o clang: warning: argument unused during compilation: '-O0' clang-darwin.compile.c++ ../../../../../bin.v2/libs/thread/build/clang-darwin-2.8/debug/threading-multi/pthread/once.o clang: warning: argument unused during compilation: '-O0' clang-darwin.link.dll ../../../../../bin.v2/libs/thread/build/clang-darwin-2.8/debug/threading-multi/libboost_thread.dylib common.mkdir ../../../../../bin.v2/libs/system/build/clang-darwin-2.8/debug common.mkdir ../../../../../bin.v2/libs/system/build/clang-darwin-2.8/debug/threading-multi clang-darwin.compile.c++ ../../../../../bin.v2/libs/system/build/clang-darwin-2.8/debug/threading-multi/error_code.o clang: warning: argument unused during compilation: '-O0' clang-darwin.link.dll ../../../../../bin.v2/libs/system/build/clang-darwin-2.8/debug/threading-multi/libboost_system.dylib clang-darwin.link ../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/server ld: duplicate symbol __ZN5boost4asio6detail14do_throw_errorERKNS_6system10error_codeE in ../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/io_service_pool.o and ../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/connection.o clang: error: linker command failed with exit code 1 (use -v to see invocation) "clang++" -o "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/server" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/connection.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/io_service_pool.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/mime_types.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/posix_main.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/reply.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/request_handler.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/request_parser.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/server.o" "../../../../../bin.v2/libs/asio/example/http/server2/clang-darwin-2.8/debug/threading-multi/win_main.o" "../../../../../bin.v2/libs/thread/build/clang-darwin-2.8/debug/threading-multi/libboost_thread.dylib" "../../../../../bin.v2/libs/system/build/clang-darwin-2.8/debug/threading-multi/libboost_system.dylib" -g Does anyone have suggestions or workarounds? Thanks, Dane
participants (1)
-
Dane Springmeyer