How to build cpp files using g++ instead of gcc ?
./compile.sh build -s
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO: ./compile.sh build /path/to/bazel
🍃 Building Bazel from scratch............
🍃 Building Bazel with Bazel.
.WARNING: Output base '/home/manju/.cache/bazel/_bazel_manju/aedf5e168c01725aab52e5a7df274b64' is on NFS. This may lead to surprising failures and undetermined behavior.
Extracting Bazel installation...
Sending SIGTERM to previous Bazel server (pid=12121)... done.
.......
WARNING: Sandboxed execution is not supported on your system and thus hermeticity of actions cannot be guaranteed. See http://bazel.io/docs/bazel-user-manual.html#sandboxing for more information. You can turn off this warning via --ignore_unsupported_sandboxing.
INFO: Found 1 target...
INFO: From Linking src/main/tools/build-runfiles:
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `main':
build-runfiles.cc:(.text+0x139): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text+0x15c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
build-runfiles.cc:(.text+0x16b): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text+0x25b): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text+0x27b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
build-runfiles.cc:(.text+0x2d2): undefined reference to `std::string::operator=(std::string&&)'
build-runfiles.cc:(.text+0x2e1): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x2f0): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x2ff): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x30e): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text+0x31d): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text+0x340): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
build-runfiles.cc:(.text+0x368): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x377): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text+0x3cd): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x3f9): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text+0x413): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x427): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x43b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x44f): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text+0x46b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text+0x47f): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text+0x4a2): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::RunfilesCreator(std::string const&)':
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x20): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x2c): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x4a): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x56): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0xa0): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x107): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x16f): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x199): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x1ae): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreatorC2ERKSs[_ZN15RunfilesCreatorC5ERKSs]+0x1ba): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `FileInfo::FileInfo()':
build-runfiles.cc:(.text._ZN8FileInfoC2Ev[_ZN8FileInfoC5Ev]+0x18): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `FileInfo::~FileInfo()':
build-runfiles.cc:(.text._ZN8FileInfoD2Ev[_ZN8FileInfoD5Ev]+0x18): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `FileInfo::FileInfo(FileInfo const&)':
build-runfiles.cc:(.text._ZN8FileInfoC2ERKS_[_ZN8FileInfoC5ERKS_]+0x33): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::pair<std::string, FileInfo>::pair<std::string&, FileInfo&, void>(std::string&&&, FileInfo&&&)':
build-runfiles.cc:(.text._ZNSt4pairISs8FileInfoEC1IRSsRS0_vEEOT_OT0_[_ZNSt4pairISs8FileInfoEC1IRSsRS0_vEEOT_OT0_]+0x2f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
build-runfiles.cc:(.text._ZNSt4pairISs8FileInfoEC1IRSsRS0_vEEOT_OT0_[_ZNSt4pairISs8FileInfoEC1IRSsRS0_vEEOT_OT0_]+0x5f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::pair<std::string, FileInfo>::~pair()':
build-runfiles.cc:(.text._ZNSt4pairISs8FileInfoED2Ev[_ZNSt4pairISs8FileInfoED5Ev]+0x24): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `FileInfo::FileInfo(FileInfo&&)':
build-runfiles.cc:(.text._ZN8FileInfoC2EOS_[_ZN8FileInfoC5EOS_]+0x33): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string&&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::pair<std::string const, FileInfo>::pair<std::string, FileInfo, void>(std::pair<std::string, FileInfo>&&)':
build-runfiles.cc:(.text._ZNSt4pairIKSs8FileInfoEC1ISsS1_vEEOS_IT_T0_E[_ZNSt4pairIKSs8FileInfoEC1ISsS1_vEEOS_IT_T0_E]+0x2a): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string&&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::ReadManifest(std::string const&, bool, bool)':
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x46): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0xc6): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0xd8): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x149): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x1c5): undefined reference to `std::string::c_str() const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o:build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x2b6): more undefined references to `std::string::c_str() const' follow
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::ReadManifest(std::string const&, bool, bool)':
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x61c): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x650): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x65f): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x7b0): undefined reference to `std::string::operator=(char const*)'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x7e4): undefined reference to `std::string::rfind(char, unsigned long) const'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x81a): undefined reference to `std::string::erase(unsigned long, unsigned long)'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x8b0): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x951): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0x963): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0xa1e): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator12ReadManifestERKSsbb[_ZN15RunfilesCreator12ReadManifestERKSsbb]+0xa5d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::CreateRunfiles()':
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x1d): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x9f): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0xae): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x116): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x12d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x14c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x158): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x174): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x187): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x1f5): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x204): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x217): undefined reference to `std::string::c_str() const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o:build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x226): more undefined references to `std::string::c_str() const' follow
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::CreateRunfiles()':
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x297): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator14CreateRunfilesEv[_ZN15RunfilesCreator14CreateRunfilesEv]+0x2a8): undefined reference to `std::allocator<char>::~allocator()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::SetupOutputBase()':
build-runfiles.cc:(.text._ZN15RunfilesCreator15SetupOutputBaseEv[_ZN15RunfilesCreator15SetupOutputBaseEv]+0x1d): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator15SetupOutputBaseEv[_ZN15RunfilesCreator15SetupOutputBaseEv]+0x4b): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator15SetupOutputBaseEv[_ZN15RunfilesCreator15SetupOutputBaseEv]+0xbd): undefined reference to `std::string::c_str() const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::ScanTreeAndPrune(std::string const&)':
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x3d): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0xa9): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x138): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x154): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x183): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x338): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x3bc): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x42d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x442): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x46f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator16ScanTreeAndPruneERKSs[_ZN15RunfilesCreator16ScanTreeAndPruneERKSs]+0x488): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::CreateFiles()':
build-runfiles.cc:(.text._ZN15RunfilesCreator11CreateFilesEv[_ZN15RunfilesCreator11CreateFilesEv]+0x7b): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator11CreateFilesEv[_ZN15RunfilesCreator11CreateFilesEv]+0xe7): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator11CreateFilesEv[_ZN15RunfilesCreator11CreateFilesEv]+0x151): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator11CreateFilesEv[_ZN15RunfilesCreator11CreateFilesEv]+0x1c7): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator11CreateFilesEv[_ZN15RunfilesCreator11CreateFilesEv]+0x23b): undefined reference to `std::string::c_str() const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o:build-runfiles.cc:(.text._ZN15RunfilesCreator11CreateFilesEv[_ZN15RunfilesCreator11CreateFilesEv]+0x256): more undefined references to `std::string::c_str() const' follow
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::ReadLinkOrDie(std::string const&, std::string*)':
build-runfiles.cc:(.text._ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs[_ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs]+0x12b): undefined reference to `std::allocator<char>::allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs[_ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs]+0x151): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, unsigned long, std::allocator<char> const&)'
build-runfiles.cc:(.text._ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs[_ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs]+0x16a): undefined reference to `std::string::swap(std::string&)'
build-runfiles.cc:(.text._ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs[_ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs]+0x179): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs[_ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs]+0x188): undefined reference to `std::allocator<char>::~allocator()'
build-runfiles.cc:(.text._ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs[_ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs]+0x1ab): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs[_ZN15RunfilesCreator13ReadLinkOrDieERKSsPSs]+0x1bf): undefined reference to `std::allocator<char>::~allocator()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::EnsureDirReadAndWritePerms(std::string const&)':
build-runfiles.cc:(.text._ZN15RunfilesCreator26EnsureDirReadAndWritePermsERKSs[_ZN15RunfilesCreator26EnsureDirReadAndWritePermsERKSs]+0x81): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator26EnsureDirReadAndWritePermsERKSs[_ZN15RunfilesCreator26EnsureDirReadAndWritePermsERKSs]+0xf0): undefined reference to `std::string::c_str() const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::DelTree(std::string const&, FileType)':
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x26): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x8d): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x10a): undefined reference to `std::string::c_str() const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o:build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x173): more undefined references to `std::string::c_str() const' follow
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::DelTree(std::string const&, FileType)':
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x25c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x2aa): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x32b): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x39c): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x403): undefined reference to `std::string::c_str() const'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x46b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreator7DelTreeERKSs8FileType[_ZN15RunfilesCreator7DelTreeERKSs8FileType]+0x47f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `RunfilesCreator::~RunfilesCreator()':
build-runfiles.cc:(.text._ZN15RunfilesCreatorD2Ev[_ZN15RunfilesCreatorD5Ev]+0x28): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreatorD2Ev[_ZN15RunfilesCreatorD5Ev]+0x38): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
build-runfiles.cc:(.text._ZN15RunfilesCreatorD2Ev[_ZN15RunfilesCreatorD5Ev]+0x44): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `__gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type std::operator==<char>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
build-runfiles.cc:(.text._ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_[_ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_]+0x1b): undefined reference to `std::string::size() const'
build-runfiles.cc:(.text._ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_[_ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_]+0x2a): undefined reference to `std::string::size() const'
build-runfiles.cc:(.text._ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_[_ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_]+0x3b): undefined reference to `std::string::size() const'
build-runfiles.cc:(.text._ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_[_ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_]+0x4a): undefined reference to `std::string::data() const'
build-runfiles.cc:(.text._ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_[_ZSteqIcEN9__gnu_cxx11__enable_ifIXsrSt9__is_charIT_E7__valueEbE6__typeERKSbIS3_St11char_traitsIS3_ESaIS3_EESC_]+0x59): undefined reference to `std::string::data() const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)':
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_]+0x24): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_]+0x37): undefined reference to `std::string::append(char const*)'
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_PKS3_]+0x48): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `bool std::operator==<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char const*)':
build-runfiles.cc:(.text._ZSteqIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_EPKS3_[_ZSteqIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_EPKS3_]+0x1f): undefined reference to `std::string::compare(char const*) const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::_Rb_tree_const_iterator<std::pair<std::string const, FileInfo> >::operator++()':
build-runfiles.cc:(.text._ZNSt23_Rb_tree_const_iteratorISt4pairIKSs8FileInfoEEppEv[_ZNSt23_Rb_tree_const_iteratorISt4pairIKSs8FileInfoEEppEv]+0x17): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, char)':
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S3_]+0x25): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S3_]+0x3a): undefined reference to `std::string::append(unsigned long, char)'
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_ERKS6_S3_]+0x4b): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, char const*)':
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_PKS3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_PKS3_]+0x23): undefined reference to `std::string::append(char const*)'
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_PKS3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_PKS3_]+0x3d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string&&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, char)':
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_S3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_S3_]+0x26): undefined reference to `std::string::append(unsigned long, char)'
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_S3_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_S3_]+0x40): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string&&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_RKS6_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_RKS6_]+0x23): undefined reference to `std::string::append(std::string const&)'
build-runfiles.cc:(.text._ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_RKS6_[_ZStplIcSt11char_traitsIcESaIcEESbIT_T0_T1_EOS6_RKS6_]+0x3d): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string&&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJRS1_EESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_':
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE22_M_emplace_hint_uniqueIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE22_M_emplace_hint_uniqueIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_]+0xdf): undefined reference to `__cxa_begin_catch'
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE22_M_emplace_hint_uniqueIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE22_M_emplace_hint_uniqueIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_]+0xfc): undefined reference to `__cxa_end_catch'
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE22_M_emplace_hint_uniqueIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE22_M_emplace_hint_uniqueIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_]+0x10c): undefined reference to `__cxa_rethrow'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `bool std::operator< <char, std::char_traits<char>, std::allocator<char> >(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
build-runfiles.cc:(.text._ZStltIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_[_ZStltIcSt11char_traitsIcESaIcEEbRKSbIT_T0_T1_ES8_]+0x1f): undefined reference to `std::string::compare(std::string const&) const'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJRS1_EESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_':
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_]+0x85): undefined reference to `__cxa_end_catch'
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_]+0x98): undefined reference to `__cxa_begin_catch'
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIRKSt21piecewise_construct_tSt5tupleIIRS1_EESE_IIEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_]+0xb0): undefined reference to `__cxa_rethrow'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::_Rb_tree<std::string, std::pair<std::string const, FileInfo>, std::_Select1st<std::pair<std::string const, FileInfo> >, std::less<std::string>, std::allocator<std::pair<std::string const, FileInfo> > >::_M_insert_node(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node<std::pair<std::string const, FileInfo> >*)':
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E]+0x8c): 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&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::_Rb_tree_iterator<std::pair<std::string const, FileInfo> > std::_Rb_tree<std::string, std::pair<std::string const, FileInfo>, std::_Select1st<std::pair<std::string const, FileInfo> >, std::less<std::string>, std::allocator<std::pair<std::string const, FileInfo> > >::_M_insert_<std::pair<std::string, FileInfo> >(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<std::string, FileInfo>&&)':
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE10_M_insert_IS0_ISsS2_EEESt17_Rb_tree_iteratorIS3_EPSt18_Rb_tree_node_baseSF_OT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE10_M_insert_IS0_ISsS2_EEESt17_Rb_tree_iteratorIS3_EPSt18_Rb_tree_node_baseSF_OT_]+0xc4): 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&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::_Rb_tree_iterator<std::pair<std::string const, FileInfo> >::operator++()':
build-runfiles.cc:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKSs8FileInfoEEppEv[_ZNSt17_Rb_tree_iteratorISt4pairIKSs8FileInfoEEppEv]+0x17): undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::_Rb_tree<std::string, std::pair<std::string const, FileInfo>, std::_Select1st<std::pair<std::string const, FileInfo> >, std::less<std::string>, std::allocator<std::pair<std::string const, FileInfo> > >::_M_erase_aux(std::_Rb_tree_const_iterator<std::pair<std::string const, FileInfo> >)':
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS3_E[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS3_E]+0x23): undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::pair<std::string const, FileInfo>::~pair()':
build-runfiles.cc:(.text._ZNSt4pairIKSs8FileInfoED2Ev[_ZNSt4pairIKSs8FileInfoED5Ev]+0x24): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `std::_Rb_tree_iterator<std::pair<std::string const, FileInfo> >::operator--()':
build-runfiles.cc:(.text._ZNSt17_Rb_tree_iteratorISt4pairIKSs8FileInfoEEmmEv[_ZNSt17_Rb_tree_iteratorISt4pairIKSs8FileInfoEEmmEv]+0x17): undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIJS0_ISsS2_EEEEPSt13_Rb_tree_nodeIS3_EDpOT_':
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIS0_ISsS2_EEEEPSt13_Rb_tree_nodeIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIS0_ISsS2_EEEEPSt13_Rb_tree_nodeIS3_EDpOT_]+0x58): undefined reference to `__cxa_end_catch'
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIS0_ISsS2_EEEEPSt13_Rb_tree_nodeIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIS0_ISsS2_EEEEPSt13_Rb_tree_nodeIS3_EDpOT_]+0x6b): undefined reference to `__cxa_begin_catch'
build-runfiles.cc:(.text._ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIS0_ISsS2_EEEEPSt13_Rb_tree_nodeIS3_EDpOT_[_ZNSt8_Rb_treeISsSt4pairIKSs8FileInfoESt10_Select1stIS3_ESt4lessISsESaIS3_EE14_M_create_nodeIIS0_ISsS2_EEEEPSt13_Rb_tree_nodeIS3_EDpOT_]+0x83): undefined reference to `__cxa_rethrow'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::string const, FileInfo> > >::deallocate(std::_Rb_tree_node<std::pair<std::string const, FileInfo> >*, unsigned long)':
build-runfiles.cc:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSs8FileInfoEEE10deallocateEPS6_m[_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSs8FileInfoEEE10deallocateEPS6_m]+0x1c): undefined reference to `operator delete(void*)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::string const, FileInfo> > >::allocate(unsigned long, void const*)':
build-runfiles.cc:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSs8FileInfoEEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSs8FileInfoEEE8allocateEmPKv]+0x2c): undefined reference to `std::__throw_bad_alloc()'
build-runfiles.cc:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSs8FileInfoEEE8allocateEmPKv[_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSs8FileInfoEEE8allocateEmPKv]+0x4a): undefined reference to `operator new(unsigned long)'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o: In function `_ZNSt4pairIKSs8FileInfoEC1IJRS0_EJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE':
build-runfiles.cc:(.text._ZNSt4pairIKSs8FileInfoEC2IIRS0_EILm0EEIEIEEERSt5tupleIIDpT_EERS5_IIDpT1_EESt12_Index_tupleIIXspT0_EEESE_IIXspT2_EEE[_ZNSt4pairIKSs8FileInfoEC5IIRS0_EILm0EEIEIEEERSt5tupleIIDpT_EERS5_IIDpT1_EESt12_Index_tupleIIXspT0_EEESE_IIXspT2_EEE]+0x37): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
build-runfiles.cc:(.text._ZNSt4pairIKSs8FileInfoEC2IIRS0_EILm0EEIEIEEERSt5tupleIIDpT_EERS5_IIDpT1_EESt12_Index_tupleIIXspT0_EEESE_IIXspT2_EEE[_ZNSt4pairIKSs8FileInfoEC5IIRS0_EILm0EEIEIEEERSt5tupleIIDpT_EERS5_IIDpT1_EESt12_Index_tupleIIXspT0_EEESE_IIXspT2_EEE]+0x6f): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
bazel-out/local_linux-fastbuild/bin/src/main/tools/_objs/build-runfiles/src/main/tools/build-runfiles.pic.o:(.data.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0): undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status
ERROR: /lvol/manju/bazel/src/main/tools/BUILD:26:1: Linking of rule '//src/main/tools:build-runfiles' failed: gcc failed: error executing command /lvol/manju/gcc-4.8.2/bin/gcc -o bazel-out/local_linux-fastbuild/bin/src/main/tools/build-runfiles '-Wl,-rpath,/lvol/manju/gcc-4.8.2/lib64 -L/lvol/manju/gcc-4.8.2/lib64 -lstdc++' -B/usr/bin/ ... (remaining 7 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Target //src:bazel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 5.316s, Critical Path: 1.73s
Building output/bazel
undefined references are usually a sign of that you are missing a dependency somewhere. Also, what makes you think it is building C++ code with gcc rather than g++?
It looks like the bootstrap succeeded (Building Bazel from scratch............), so on the plus side you should have a binary in output/bazel if you just want to get started.
To help us debug why the bootstrap (building Bazel using Bazel) is failing, could you run:
output/bazel build -s //src/main/tools/build-runfiles(this will fail, but please paste the output here).which gccls /lvol/manju/gcc-4.8.2/lib64/libstd*
I fixed the issue by changing the C compiler from gcc to g++ in CROSSTOOL. But it threw up further errors that the C files had some issues. Those were easy enough to fix. Here is the diff.
diff -ur bazel.gold/src/main/tools/namespace-sandbox.c bazel.built/src/main/tools/namespace-sandbox.c
--- bazel.gold/src/main/tools/namespace-sandbox.c 2015-11-25 05:15:05.000000000 -0600
+++ bazel.built/src/main/tools/namespace-sandbox.c 2015-11-30 08:06:27.000000000 -0600
@@ -83,7 +83,7 @@
pid_t pid;
// Allocate stack for child.
- stack = malloc(stackSize);
+ stack = (char *)malloc(stackSize);
if (stack == NULL) {
DIE("malloc failed\n");
}
@@ -159,14 +159,14 @@
}
if (source != NULL) {
if (opt->num_mounts >= opt->mount_map_sizes - 1) {
- opt->mount_sources = realloc(opt->mount_sources,
+ opt->mount_sources = (char **)realloc(opt->mount_sources,
opt->mount_map_sizes * sizeof(char *) * 2);
if (opt->mount_sources == NULL) {
DIE("realloc failed\n");
}
memset(opt->mount_sources + opt->mount_map_sizes, 0,
opt->mount_map_sizes * sizeof(char *));
- opt->mount_targets = realloc(opt->mount_targets,
+ opt->mount_targets = (char **)realloc(opt->mount_targets,
opt->mount_map_sizes * sizeof(char *) * 2);
if (opt->mount_targets == NULL) {
DIE("realloc failed\n");
@@ -189,7 +189,7 @@
DIE("opening argument file %s failed\n", filename);
}
size_t sub_argv_size = 20;
- char **sub_argv = malloc(sizeof(char *) * sub_argv_size);
+ char **sub_argv = (char **)malloc(sizeof(char *) * sub_argv_size);
sub_argv[0] = "";
int sub_argc = 1;
@@ -223,7 +223,7 @@
}
if (sub_argv_size == sub_argc + 1) {
sub_argv_size *= 2;
- sub_argv = realloc(sub_argv, sizeof(char *) * sub_argv_size);
+ sub_argv = (char **)realloc(sub_argv, sizeof(char *) * sub_argv_size);
}
sub_argv[sub_argc++] = strdup(argument);
}
@@ -513,7 +513,7 @@
// The file is mounted to a custom location inside the sandbox.
// Create a user-friendly string for the sandboxed path and show it.
char *user_friendly_mount_target =
- malloc(strlen("<sandbox>") + strlen(opt->mount_targets[i]) + 1);
+ (char *)malloc(strlen("<sandbox>") + strlen(opt->mount_targets[i]) + 1);
strcpy(user_friendly_mount_target, "<sandbox>");
strcat(user_friendly_mount_target, opt->mount_targets[i]);
PRINT_DEBUG("mount: %s -> %s\n", opt->mount_sources[i],
@@ -523,7 +523,7 @@
}
char *full_sandbox_path =
- malloc(strlen(opt->sandbox_root) + strlen(opt->mount_targets[i]) + 1);
+ (char *)malloc(strlen(opt->sandbox_root) + strlen(opt->mount_targets[i]) + 1);
strcpy(full_sandbox_path, opt->sandbox_root);
strcat(full_sandbox_path, opt->mount_targets[i]);
CHECK_CALL(CreateTarget(full_sandbox_path, S_ISDIR(sb.st_mode)));
@@ -664,12 +664,12 @@
int main(int argc, char *const argv[]) {
struct Options opt;
memset(&opt, 0, sizeof(opt));
- opt.mount_sources = calloc(argc, sizeof(char *));
- opt.mount_targets = calloc(argc, sizeof(char *));
+ opt.mount_sources = (char **)calloc(argc, sizeof(char *));
+ opt.mount_targets = (char **)calloc(argc, sizeof(char *));
opt.mount_map_sizes = argc;
// Reserve two extra slots for homedir_from_env and homedir.
- opt.create_dirs = calloc(argc + 2, sizeof(char *));
+ opt.create_dirs = (char **)calloc(argc + 2, sizeof(char *));
ParseCommandLine(argc, argv, &opt);
if (opt.args == NULL) {
diff -ur bazel.gold/src/main/tools/process-tools.c bazel.built/src/main/tools/process-tools.c
--- bazel.gold/src/main/tools/process-tools.c 2015-11-25 05:15:05.000000000 -0600
+++ bazel.built/src/main/tools/process-tools.c 2015-11-30 08:06:27.000000000 -0600
@@ -82,7 +82,8 @@
}
void HandleSignal(int sig, void (*handler)(int)) {
- struct sigaction sa = {.sa_handler = handler};
+ struct sigaction sa;
+ sa.sa_handler = handler;
CHECK_CALL(sigemptyset(&sa.sa_mask));
CHECK_CALL(sigaction(sig, &sa, NULL));
}
@@ -100,7 +101,8 @@
if (i == SIGKILL || i == SIGSTOP) {
continue;
}
- struct sigaction sa = {.sa_handler = SIG_DFL};
+ struct sigaction sa;
+ sa.sa_handler = SIG_DFL;
CHECK_CALL(sigemptyset(&sa.sa_mask));
// Ignore possible errors, because we might not be allowed to set the
// handler for certain signals, but we still want to try.
@@ -116,10 +118,11 @@
double int_val, fraction_val;
fraction_val = modf(timeout_secs, &int_val);
- struct itimerval timer = {.it_interval.tv_sec = 0,
- .it_interval.tv_usec = 0,
- .it_value.tv_sec = (long)int_val,
- .it_value.tv_usec = (long)(fraction_val * 1e6)};
+ struct itimerval timer;
+ timer.it_interval.tv_sec = 0;
+ timer.it_interval.tv_usec = 0;
+ timer.it_value.tv_sec = (long)int_val;
+ timer.it_value.tv_usec = (long)(fraction_val * 1e6);
CHECK_CALL(setitimer(ITIMER_REAL, &timer, NULL));
}