Build errors on Linux: undefined reference to std::

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Build errors on Linux: undefined reference to std::

Postby leha2000 » Tue Sep 01, 2015 2:05 am

I'm compiling JCEF with CEF 3.2454.1317.gc22b77d on Ubuntu Linux 64x
and have a lot of errors
Code: Select all
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): error: undefined reference to 'std::string::insert(unsigned long, char const*, unsigned long)'
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): error: undefined reference to 'std::string::append(char const*, unsigned long)'
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): error: undefined reference to 'std::string::_Rep::_M_dispose(std::allocator<char> const&)'
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): error: undefined reference to 'std::string::insert(unsigned long, char const*, unsigned long)'
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): error: undefined reference to 'std::string::insert(unsigned long, char const*, unsigned long)'
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
out/Release/obj.target/third_party/cef/linux64/libcef_dll_wrapper.a(out/Release/obj.target/third_party/cef/linux64/../../../libcef_dll_wrapper/third_party/cef/linux64/libcef_dll/wrapper/cef_message_router.o):cef_message_router.cc:function (anonymous namespace)::CefMessageRouterRendererSideImpl::V8HandlerImpl::Execute(CefStringBase<CefStringTraitsUTF16> const&, CefRefPtr<CefV8Value>, std::vector<CefRefPtr<CefV8Value>, std::allocator<CefRefPtr<CefV8Value> > > const&, CefRefPtr<CefV8Value>&, CefStringBase<CefStringTraitsUTF16>&): 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&)'
collect2: error: ld returned 1 exit status
make: *** [out/Release/jcef_helper] Error 1


I configured gcc by
Code: Select all
export CXX="gcc -B/usr/bin/ld.gold -std=c++11"

before running
Code: Select all
gclient runhooks


checked Makefile. It contains
Code: Select all
CXX.target ?= gcc -B/usr/bin/ld.gold -std=c++11


Code: Select all
leha@leha-ubuntu:/mnt/user/projects/jcef-src/src/tools$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
leha2000
Newbie
 
Posts: 8
Joined: Mon Aug 31, 2015 2:23 pm

Re: Build errors on Linux: undefined reference to std::

Postby leha2000 » Tue Sep 01, 2015 3:17 am

leha2000 wrote:I configured gcc by
Code: Select all
export CXX="gcc -B/usr/bin/ld.gold -std=c++11"


I changed this to
Code: Select all
export CXX="g++ -B/usr/bin/ld.gold -std=gnu++11"

and copied libffmpegsumo.so to third_party/cef/linux64/Release from the old binary release and was able to build
leha2000
Newbie
 
Posts: 8
Joined: Mon Aug 31, 2015 2:23 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 58 guests