I've tried building pdfium locally to get a libpdfium.a
. I then instruct cargo to link with a build.rs like this:
fn main() {
println!("cargo:rustc-link-search=native=./");
println!("cargo:rustc-link-lib=static=pdfium");
}
And it does find my library. All good so far.
However I still get all these undefined reference errors when building. Here's a snippet of it (it filled more than my terminal could handle):
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `bool v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::Register>::RecursivelyEmitMoveChainTargets<unsigned int>(unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::Register>::GapMoveTargets&)':
./../../v8/src/maglev/maglev-code-generator.cc:(.text+0x56f): undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::PopTargets(v8::internal::XMMRegister)':
./../../buildtools/third_party/libc++/trunk/include/array:218: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `bool v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::RecursivelyEmitMoveChainTargets<v8::internal::XMMRegister>(v8::internal::XMMRegister, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets&)':
./../../v8/src/maglev/maglev-code-generator.cc:(.text+0x4e9): undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::EmitMovesFromSource(v8::internal::XMMRegister, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets const&)':
./../../buildtools/third_party/libc++/trunk/include/array:218: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&>(std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, char const*)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&>(std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, char const*)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&>(std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, char const*)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&>(std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, std::Cr::__hash_map_iterator<std::Cr::__hash_iterator<std::Cr::__hash_node<std::Cr::__hash_value_type<unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets>, void*>*> > const&, char const*)':
./../../buildtools/third_party/libc++/trunk/include/new:(.text+0x471): undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(maglev-code-generator.o): in function `bool v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::RecursivelyEmitMoveChainTargets<unsigned int>(unsigned int, v8::internal::maglev::(anonymous namespace)::ParallelMoveResolver<v8::internal::XMMRegister>::GapMoveTargets&)':
./../../v8/src/maglev/maglev-code-generator.cc:(.text+0x57a): undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `v8::internal::SharedTurboAssemblerBase<v8::internal::TurboAssembler>::F64x2ConvertLowI32x4U(v8::internal::XMMRegister, v8::internal::XMMRegister, v8::internal::Register)':
./../../buildtools/third_party/libc++/trunk/include/__string/char_traits.h:236: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `v8::internal::SharedTurboAssemblerBase<v8::internal::TurboAssembler>::I32x4TruncSatF64x2SZero(v8::internal::XMMRegister, v8::internal::XMMRegister, v8::internal::XMMRegister, v8::internal::Register)':
./../../buildtools/third_party/libc++/trunk/include/__string/char_traits.h:236: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `v8::internal::SharedTurboAssemblerBase<v8::internal::TurboAssembler>::I32x4TruncSatF64x2UZero(v8::internal::XMMRegister, v8::internal::XMMRegister, v8::internal::XMMRegister, v8::internal::Register)':
./../../buildtools/third_party/libc++/trunk/include/__string/char_traits.h:236: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o):./../../buildtools/third_party/libc++/trunk/include/__string/char_traits.h:236: more undefined references to `std::Cr::__libcpp_verbose_abort(char const*, ...)' follow
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<int, v8::internal::compiler::CallDescriptor::Flag>(int, v8::internal::compiler::CallDescriptor::Flag, char const*)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<int, v8::internal::compiler::CallDescriptor::Flag>(int, v8::internal::compiler::CallDescriptor::Flag, char const*)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<int, v8::internal::compiler::CallDescriptor::Flag>(int, v8::internal::compiler::CallDescriptor::Flag, char const*)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::CallDescriptor::Flag&>(v8::internal::compiler::CallDescriptor::Flag&)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::CallDescriptor::Flag&>(v8::internal::compiler::CallDescriptor::Flag&)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::CallDescriptor::Flag&>(v8::internal::compiler::CallDescriptor::Flag&)':
./../../v8/src/base/logging.h:141: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::operator<<(int)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::CallDescriptor::Flag&>(v8::internal::compiler::CallDescriptor::Flag&)':
./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::CallDescriptor::Flag&>(v8::internal::compiler::CallDescriptor::Flag&)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::MemoryAccessMode, v8::internal::compiler::MemoryAccessMode>(v8::internal::compiler::MemoryAccessMode, v8::internal::compiler::MemoryAccessMode, char const*)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::MemoryAccessMode, v8::internal::compiler::MemoryAccessMode>(v8::internal::compiler::MemoryAccessMode, v8::internal::compiler::MemoryAccessMode, char const*)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::MemoryAccessMode, v8::internal::compiler::MemoryAccessMode>(v8::internal::compiler::MemoryAccessMode, v8::internal::compiler::MemoryAccessMode, char const*)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::MemoryAccessMode&>(v8::internal::compiler::MemoryAccessMode&)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::MemoryAccessMode&>(v8::internal::compiler::MemoryAccessMode&)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::MemoryAccessMode&>(v8::internal::compiler::MemoryAccessMode&)':
./../../v8/src/base/logging.h:141: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::operator<<(int)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::MemoryAccessMode&>(v8::internal::compiler::MemoryAccessMode&)':
./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::MemoryAccessMode&>(v8::internal::compiler::MemoryAccessMode&)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::XMMRegister const&, v8::internal::XMMRegister const&>(v8::internal::XMMRegister const&, v8::internal::XMMRegister const&, char const*)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::XMMRegister const&, v8::internal::XMMRegister const&>(v8::internal::XMMRegister const&, v8::internal::XMMRegister const&, char const*)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::XMMRegister const&, v8::internal::XMMRegister const&>(v8::internal::XMMRegister const&, v8::internal::XMMRegister const&, char const*)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::XMMRegister const&>(v8::internal::XMMRegister const&)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::XMMRegister const&>(v8::internal::XMMRegister const&)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::XMMRegister const&>(v8::internal::XMMRegister const&)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::AtomicWidth, v8::internal::compiler::AtomicWidth>(v8::internal::compiler::AtomicWidth, v8::internal::compiler::AtomicWidth, char const*)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::AtomicWidth, v8::internal::compiler::AtomicWidth>(v8::internal::compiler::AtomicWidth, v8::internal::compiler::AtomicWidth, char const*)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::AtomicWidth, v8::internal::compiler::AtomicWidth>(v8::internal::compiler::AtomicWidth, v8::internal::compiler::AtomicWidth, char const*)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::FlagsCondition, v8::internal::compiler::FlagsCondition>(v8::internal::compiler::FlagsCondition, v8::internal::compiler::FlagsCondition, char const*)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::FlagsCondition, v8::internal::compiler::FlagsCondition>(v8::internal::compiler::FlagsCondition, v8::internal::compiler::FlagsCondition, char const*)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::FlagsCondition, v8::internal::compiler::FlagsCondition>(v8::internal::compiler::FlagsCondition, v8::internal::compiler::FlagsCondition, char const*)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::FlagsCondition&>(v8::internal::compiler::FlagsCondition&)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::FlagsCondition&>(v8::internal::compiler::FlagsCondition&)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(code-generator-x64.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::FlagsCondition&>(v8::internal::compiler::FlagsCondition&)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(unwinding-info-writer-x64.o): in function `v8::internal::compiler::UnwindingInfoWriter::BeginInstructionBlock(int, v8::internal::compiler::InstructionBlock const*)':
./../../buildtools/third_party/libc++/trunk/include/vector:1457: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(unwinding-info-writer-x64.o): in function `v8::internal::compiler::UnwindingInfoWriter::EndInstructionBlock(v8::internal::compiler::InstructionBlock const*)':
./../../v8/src/zone/zone.h:(.text+0x3a6): undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(instruction-scheduler.o): in function `v8::internal::compiler::InstructionScheduler::StressSchedulerQueue::PopBestCandidate(int)':
./../../buildtools/third_party/libc++/trunk/include/list:1708: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(instruction-scheduler.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::FlagsMode, v8::internal::compiler::FlagsMode>(v8::internal::compiler::FlagsMode, v8::internal::compiler::FlagsMode, char const*)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(instruction-scheduler.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::FlagsMode, v8::internal::compiler::FlagsMode>(v8::internal::compiler::FlagsMode, v8::internal::compiler::FlagsMode, char const*)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(instruction-scheduler.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >* v8::base::MakeCheckOpString<v8::internal::compiler::FlagsMode, v8::internal::compiler::FlagsMode>(v8::internal::compiler::FlagsMode, v8::internal::compiler::FlagsMode, char const*)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(instruction-scheduler.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::FlagsMode&>(v8::internal::compiler::FlagsMode&)':
./../../buildtools/third_party/libc++/trunk/include/ios:709: undefined reference to `std::Cr::ios_base::init(void*)'
/usr/bin/ld: .//libpdfium.a(instruction-scheduler.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::FlagsMode&>(v8::internal::compiler::FlagsMode&)':
./../../buildtools/third_party/libc++/trunk/include/sstream:230: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:231: undefined reference to `vtable for std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:766: undefined reference to `std::Cr::basic_stringbuf<char, std::Cr::char_traits<char>, std::Cr::allocator<char> >::str() const'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:864: undefined reference to `std::Cr::basic_streambuf<char, std::Cr::char_traits<char> >::~basic_streambuf()'
/usr/bin/ld: ./../../buildtools/third_party/libc++/trunk/include/sstream:866: undefined reference to `std::Cr::basic_ostream<char, std::Cr::char_traits<char> >::~basic_ostream()'
/usr/bin/ld: .//libpdfium.a(instruction-scheduler.o): in function `std::Cr::basic_string<char, std::Cr::char_traits<char>, std::Cr::allocator<char> > v8::base::detail::PrintToString<v8::internal::compiler::FlagsMode&>(v8::internal::compiler::FlagsMode&)':
./../../v8/src/base/logging.h:54: undefined reference to `std::Cr::basic_ios<char, std::Cr::char_traits<char> >::~basic_ios()'
/usr/bin/ld: .//libpdfium.a(memory-lowering.o): in function `v8::internal::compiler::MemoryLowering::AllocationGroup* v8::internal::Zone::New<v8::internal::compiler::MemoryLowering::AllocationGroup, v8::internal::compiler::Node*&, v8::internal::AllocationType&, v8::internal::compiler::Node*&, v8::internal::Zone*>(v8::internal::compiler::Node*&, v8::internal::AllocationType&, v8::internal::compiler::Node*&, v8::internal::Zone*&&)':
./../../buildtools/third_party/libc++/trunk/include/__tree:294: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(memory-lowering.o): in function `v8::internal::compiler::MemoryLowering::AllocationGroup* v8::internal::Zone::New<v8::internal::compiler::MemoryLowering::AllocationGroup, v8::internal::compiler::Node*&, v8::internal::AllocationType&, v8::internal::Zone*>(v8::internal::compiler::Node*&, v8::internal::AllocationType&, v8::internal::Zone*&&)':
./../../buildtools/third_party/libc++/trunk/include/__tree:294: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(cfx_xmldocument.o): in function `std::Cr::vector<std::Cr::unique_ptr<CFX_XMLNode, std::Cr::default_delete<CFX_XMLNode> >, std::Cr::allocator<std::Cr::unique_ptr<CFX_XMLNode, std::Cr::default_delete<CFX_XMLNode> > > >::back[abi:v16000]()':
./../../buildtools/third_party/libc++/trunk/include/vector:563: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(cfx_xmldocument.o): in function `void std::Cr::advance[abi:v16000]<std::Cr::move_iterator<std::Cr::__wrap_iter<std::Cr::unique_ptr<CFX_XMLNode, std::Cr::default_delete<CFX_XMLNode> >*> >, long, long, void>(std::Cr::move_iterator<std::Cr::__wrap_iter<std::Cr::unique_ptr<CFX_XMLNode, std::Cr::default_delete<CFX_XMLNode> >*> >&, long)':
./../../buildtools/third_party/libc++/trunk/include/__iterator/advance.h:64: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(cfx_xmlelement.o): in function `std::Cr::__tree_node_base<void*>* std::Cr::__tree_leaf[abi:v16000]<std::Cr::__tree_node_base<void*>*>(std::Cr::__tree_node_base<void*>*)':
./../../buildtools/third_party/libc++/trunk/include/__tree:223: undefined reference to `std::Cr::__libcpp_verbose_abort(char const*, ...)'
/usr/bin/ld: .//libpdfium.a(cfx_xmlparser.o):./../../buildtools/third_party/libc++/trunk/include/__iterator/advance.h:64: more undefined references to `std::Cr::__libcpp_verbose_abort(char const*, ...)' follow
collect2: error: ld returned 1 exit status
= help: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: could not compile `internal` due to previous error
Any ideas how I might fix this? Any help would be greatly appreciated.