hi jf,
On 3 Dec 2013, at 17:09, JF Bastien wrote:
> I can indeed reproduce the problem. We're currently working to replace libstdc++ as the default to using libc++ instead, it's LLVM's usual C++ standard library and is much more recent and standard-compliant than libstdc++ 4.6.2. Could you give it a try by passing -stdlib=libc++ to the compiler? That worked locally for me. We could also fix the libstdc++ problem, but I'm afraid that when it comes to C++11 features that's one of many, updating to a newer version would probably be more sustainable. I expect libc++ to become the default in the next few days, and to hit canary soon after.
>
> Let me know how that goes.
yes, i've tried compiling with libc++, in fact that's the one i'd prefer since we're using it on all other target platforms, but i run into the following linker error when linking to ppapi_cpp:
build/debug/pepper/llvm_ir/methcla-pnacl-tests_bc_obj/tests/methcla_tests.cpp.o: error: undefined reference to 'pp::Var::Var(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base const*)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::string::compare(std::string const&) const'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::allocator<char>::allocator()'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::string::c_str() const'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::allocator<char>::~allocator()'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::string::data() const'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::string::size() const'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::string::resize(unsigned int)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned int, std::allocator<char> const&)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::string::append(char const*)'
/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug/libppapi_cpp.a: error: undefined reference to 'std::string::length() const'
with the linker command line being:
/Users/skersten/dev/nacl_sdk/pepper_canary/toolchain/mac_pnacl/bin/pnacl-clang++ <OBJECTS> -stdlib=libc++ --pnacl-exceptions=sjlj -L/Users/skersten/dev/nacl_sdk/pepper_canary/lib/pnacl/Debug -lppapi_cpp -lppapi -lpthread -o build/debug/pepper/llvm_ir/methcla-pnacl-tests.bc
i suppose i need a version of libppapi_cpp built with libc++ instead of libstdc++?
thanks,
stefan