bazel run main 报错怎么破呢? ubantu 系统的linux
Just-w22 opened this issue · 1 comments
wmm@wmm-vm:~/auto_parking-main$ bazel run main
INFO: Analyzed target //:main (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/wmm/auto_parking-main/BUILD:35:10: Compiling main.cc failed: (Exit 1): gcc failed: error executing command (from target //:main) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF bazel-out/k8-fastbuild/bin/_objs/main/main.pic.d ... (remaining 25 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h:498:22: error: wrong number of template arguments (3, should be 2)
498 | absl::string_view>
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h: In function 'int absl::lts_2020_02_25::StrSplit(absl::lts_2020_02_25::strings_internal::ConvertibleToStringView, Delimiter)':
/usr/local/include/absl/strings/str_split.h:503:54: error: wrong number of template arguments (3, should be 2)
503 | absl::string_view>(
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h: At global scope:
/usr/local/include/absl/strings/str_split.h:511:16: error: wrong number of template arguments (3, should be 2)
511 | std::string>
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h: In function 'int absl::lts_2020_02_25::StrSplit(StringType&&, Delimiter)':
/usr/local/include/absl/strings/str_split.h:515:75: error: wrong number of template arguments (3, should be 2)
515 | return strings_internal::Splitter<DelimiterType, AllowEmpty, std::string>(
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h: At global scope:
/usr/local/include/absl/strings/str_split.h:522:22: error: wrong number of template arguments (3, should be 2)
522 | absl::string_view>
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h: In function 'int absl::lts_2020_02_25::StrSplit(absl::lts_2020_02_25::strings_internal::ConvertibleToStringView, Delimiter, Predicate)':
/usr/local/include/absl/strings/str_split.h:528:54: error: wrong number of template arguments (3, should be 2)
528 | absl::string_view>(
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h: At global scope:
/usr/local/include/absl/strings/str_split.h:536:16: error: wrong number of template arguments (3, should be 2)
536 | std::string>
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
In file included from main.cc:9:
/usr/local/include/absl/strings/str_split.h: In function 'int absl::lts_2020_02_25::StrSplit(StringType&&, Delimiter, Predicate)':
/usr/local/include/absl/strings/str_split.h:540:74: error: wrong number of template arguments (3, should be 2)
540 | return strings_internal::Splitter<DelimiterType, Predicate, std::string>(
| ^
In file included from /usr/local/include/absl/strings/str_split.h:48,
from main.cc:9:
external/com_google_absl/absl/strings/internal/str_split_internal.h:277:7: note: provided for 'template<class Delimiter, class Predicate> class absl::lts_2020_02_25::strings_internal::Splitter'
277 | class Splitter {
| ^~~~~~~~
main.cc: In function 'int main()':
main.cc:31:67: error: conversion from 'int' to non-scalar type 'const std::vectorabsl::lts_2020_02_25::string_view' requested
31 | const std::vectorabsl::string_view data = absl::StrSplit(buff, " ");
| ~~~~~~~~~~~~~~^~~~~~~~~~~
main.cc:34:29: warning: ignoring return value of 'bool absl::lts_2020_02_25::SimpleAtod(absl::lts_2020_02_25::string_view, double*)', declared with attribute 'nodiscard' [-Wunused-result]
34 | absl::SimpleAtod(data[0], &x);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from main.cc:10:
external/com_google_absl/absl/strings/numbers.h:88:27: note: declared here
88 | ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* out);
| ^~~~~~~~~~
main.cc:35:29: warning: ignoring return value of 'bool absl::lts_2020_02_25::SimpleAtod(absl::lts_2020_02_25::string_view, double*)', declared with attribute 'nodiscard' [-Wunused-result]
35 | absl::SimpleAtod(data[1], &y);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from main.cc:10:
external/com_google_absl/absl/strings/numbers.h:88:27: note: declared here
88 | ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* out);
| ^~~~~~~~~~
main.cc:36:29: warning: ignoring return value of 'bool absl::lts_2020_02_25::SimpleAtod(absl::lts_2020_02_25::string_view, double*)', declared with attribute 'nodiscard' [-Wunused-result]
36 | absl::SimpleAtod(data[2], &theta);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
In file included from main.cc:10:
external/com_google_absl/absl/strings/numbers.h:88:27: note: declared here
88 | ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* out);
| ^~~~~~~~~~
main.cc:41:29: warning: ignoring return value of 'bool absl::lts_2020_02_25::SimpleAtod(absl::lts_2020_02_25::string_view, double*)', declared with attribute 'nodiscard' [-Wunused-result]
41 | absl::SimpleAtod(data[0], &x1);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from main.cc:10:
external/com_google_absl/absl/strings/numbers.h:88:27: note: declared here
88 | ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* out);
| ^~~~~~~~~~
main.cc:42:29: warning: ignoring return value of 'bool absl::lts_2020_02_25::SimpleAtod(absl::lts_2020_02_25::string_view, double*)', declared with attribute 'nodiscard' [-Wunused-result]
42 | absl::SimpleAtod(data[1], &y1);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from main.cc:10:
external/com_google_absl/absl/strings/numbers.h:88:27: note: declared here
88 | ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* out);
| ^~~~~~~~~~
main.cc:43:29: warning: ignoring return value of 'bool absl::lts_2020_02_25::SimpleAtod(absl::lts_2020_02_25::string_view, double*)', declared with attribute 'nodiscard' [-Wunused-result]
43 | absl::SimpleAtod(data[2], &x2);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from main.cc:10:
external/com_google_absl/absl/strings/numbers.h:88:27: note: declared here
88 | ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* out);
| ^~~~~~~~~~
main.cc:44:29: warning: ignoring return value of 'bool absl::lts_2020_02_25::SimpleAtod(absl::lts_2020_02_25::string_view, double*)', declared with attribute 'nodiscard' [-Wunused-result]
44 | absl::SimpleAtod(data[3], &y2);
| ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from main.cc:10:
external/com_google_absl/absl/strings/numbers.h:88:27: note: declared here
88 | ABSL_MUST_USE_RESULT bool SimpleAtod(absl::string_view str, double* out);
| ^~~~~~~~~~
Target //:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.081s, Critical Path: 0.71s
INFO: 4 processes: 3 internal, 1 linux-sandbox.
FAILED: Build did NOT complete successfully
ERROR: Build failed. Not running target
You can try to upgrade your compiler or Ubuntu OS to solve the problem