小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
cartorgrapher编译失败
-
jyy@jyy-Lenovo-XiaoXinPro-14ACH-2021:~/cartographer_ws$ catkin_make_isolated --install --use-ninja
Base path: /home/jyy/cartographer_ws
Source space: /home/jyy/cartographer_ws/src
Build space: /home/jyy/cartographer_ws/build_isolated
Devel space: /home/jyy/cartographer_ws/devel_isolated
Install space: /home/jyy/cartographer_ws/install_isolated~~ traversing 4 packages in topological order: ~~ - cartographer (plain cmake) ~~ - cartographer_ros_msgs ~~ - cartographer_ros ~~ - cartographer_rviz
The packages or cmake arguments have changed, forcing cmake invocation
==> Processing plain cmake package: 'cartographer'
==> Creating build directory: 'build_isolated/cartographer/install'
==> cmake /home/jyy/cartographer_ws/src/cartographer -DCMAKE_INSTALL_PREFIX=/home/jyy/cartographer_ws/install_isolated -G Ninja in '/home/jyy/cartographer_ws/build_isolated/cartographer/install'
-- The C compiler identification is GNU 9.4.0
-- The CXX compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: Release
文件 /home/jyy/cartographer_ws/build_isolated/cartographer/install/AllFiles.cmake 和 - 不同
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found GMock: /usr/lib/x86_64-linux-gnu/libgmock_main.a;/usr/lib/x86_64-linux-gnu/libgmock.a;/usr/lib/x86_64-linux-gnu/libgtest.a;-lpthread
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0") found components: iostreams
-- Found installed version of Eigen: /usr/lib/cmake/eigen3
-- Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3
-- Found required Ceres dependency: glog
-- Found installed version of gflags: /usr/lib/x86_64-linux-gnu/cmake/gflags
-- Detected gflags version: 2.2.2
-- Found required Ceres dependency: gflags
-- Found Ceres version: 1.13.0 installed in: /usr/local with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations, OpenMP]
-- Found Lua: /usr/lib/x86_64-linux-gnu/liblua5.3.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.3.3")
-- Found Protobuf: /usr/local/lib/libprotobuf.a;-lpthread (found suitable version "3.4.0", minimum required is "3.0.0")
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for one of the modules 'cairo>=1.12.16'
-- Found Sphinx: /usr/bin/sphinx-build
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jyy/cartographer_ws/build_isolated/cartographer/install
==> ninja -j16 -l16 in '/home/jyy/cartographer_ws/build_isolated/cartographer/install'
[43/381] Building documentation.
Running Sphinx v1.8.5
making output directory...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 6 source files that are out of date
updating environment: 6 added, 0 changed, 0 removed
reading sources... [ 16%] configuration
reading sources... [ 33%] cost_functions
reading sources... [ 50%] evaluation
reading sources... [ 66%] index
reading sources... [ 83%] pbstream_migration
reading sources... [100%] terminologylooking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 16%] configuration
writing output... [ 33%] cost_functions
writing output... [ 50%] evaluation
writing output... [ 66%] index
writing output... [ 83%] pbstream_migration
writing output... [100%] terminologygenerating indices... genindex
writing additional pages... search
copying images... [ 50%] autogenerate_groundtruth.png
copying images... [100%] high_level_system_overview.pngcopying static files... done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded.The HTML pages are in html.
[49/381] Building CXX object CMakeFiles...trajectory_connectivity_state_test.cc.o
FAILED: CMakeFiles/cartographer.mapping.internal.trajectory_connectivity_state_test.dir/cartographer/mapping/internal/trajectory_connectivity_state_test.cc.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DGFLAGS_IS_A_DLL=0 -I/home/jyy/cartographer_ws/src/cartographer/cartographer -I. -I/home/jyy/cartographer_ws/src/cartographer -isystem /usr/include/eigen3 -isystem /usr/include/lua5.3 -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -MD -MT CMakeFiles/cartographer.mapping.internal.trajectory_connectivity_state_test.dir/cartographer/mapping/internal/trajectory_connectivity_state_test.cc.o -MF CMakeFiles/cartographer.mapping.internal.trajectory_connectivity_state_test.dir/cartographer/mapping/internal/trajectory_connectivity_state_test.cc.o.d -o CMakeFiles/cartographer.mapping.internal.trajectory_connectivity_state_test.dir/cartographer/mapping/internal/trajectory_connectivity_state_test.cc.o -c /home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/trajectory_connectivity_state_test.cc
In file included from /home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/trajectory_connectivity_state.h:21,
from /home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/trajectory_connectivity_state_test.cc:17:
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:29: error: expected ‘;’ at end of member declaration
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:46: error: ‘lock_’ has not been declared
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:51: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:49:56: error: expected ‘;’ at end of member declaration
49 | void Connect(int trajectory_id_a, int trajectory_id_b) LOCKS_EXCLUDED(lock_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:49:73: error: ‘lock_’ has not been declared
49 | void Connect(int trajectory_id_a, int trajectory_id_b) LOCKS_EXCLUDED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:49:78: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
49 | void Connect(int trajectory_id_a, int trajectory_id_b) LOCKS_EXCLUDED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:49:58: error: ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’ cannot be overloaded with ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
49 | void Connect(int trajectory_id_a, int trajectory_id_b) LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:31: note: previous declaration ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:55:70: error: expected ‘;’ at end of member declaration
55 | bool TransitivelyConnected(int trajectory_id_a, int trajectory_id_b)
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:56:22: error: ‘lock_’ has not been declared
56 | LOCKS_EXCLUDED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:56:27: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
56 | LOCKS_EXCLUDED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:56:7: error: ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’ cannot be overloaded with ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
56 | LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:31: note: previous declaration ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:61:63: error: expected ‘;’ at end of member declaration
61 | int ConnectionCount(int trajectory_id_a, int trajectory_id_b)
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:62:22: error: ‘lock_’ has not been declared
62 | LOCKS_EXCLUDED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:62:27: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
62 | LOCKS_EXCLUDED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:62:7: error: ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’ cannot be overloaded with ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
62 | LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:31: note: previous declaration ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:65:44: error: expected ‘;’ at end of member declaration
65 | std::vector<std::vector<int>> Components() LOCKS_EXCLUDED(lock_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:65:61: error: ‘lock_’ has not been declared
65 | std::vector<std::vector<int>> Components() LOCKS_EXCLUDED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:65:66: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
65 | std::vector<std::vector<int>> Components() LOCKS_EXCLUDED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:65:46: error: ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’ cannot be overloaded with ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
65 | std::vector<std::vector<int>> Components() LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:31: note: previous declaration ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:69:50: error: expected ‘;’ at end of member declaration
69 | std::vector<int> GetComponent(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:69:67: error: ‘lock_’ has not been declared
69 | std::vector<int> GetComponent(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:69:72: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
69 | std::vector<int> GetComponent(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:69:52: error: ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’ cannot be overloaded with ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
69 | std::vector<int> GetComponent(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:44:31: note: previous declaration ‘int cartographer::mapping::ConnectedComponents::LOCKS_EXCLUDED(int)’
44 | void Add(int trajectory_id) LOCKS_EXCLUDED(lock_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:73:32: error: expected ‘;’ at end of member declaration
73 | int FindSet(int trajectory_id) EXCLUSIVE_LOCKS_REQUIRED(lock_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:73:59: error: ‘lock_’ has not been declared
73 | int FindSet(int trajectory_id) EXCLUSIVE_LOCKS_REQUIRED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:73:64: error: ISO C++ forbids declaration of ‘EXCLUSIVE_LOCKS_REQUIRED’ with no type [-fpermissive]
73 | int FindSet(int trajectory_id) EXCLUSIVE_LOCKS_REQUIRED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:74:54: error: expected ‘;’ at end of member declaration
74 | void Union(int trajectory_id_a, int trajectory_id_b)
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:75:32: error: ‘lock_’ has not been declared
75 | EXCLUSIVE_LOCKS_REQUIRED(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:75:37: error: ISO C++ forbids declaration of ‘EXCLUSIVE_LOCKS_REQUIRED’ with no type [-fpermissive]
75 | EXCLUSIVE_LOCKS_REQUIRED(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:75:7: error: ‘int cartographer::mapping::ConnectedComponents::EXCLUSIVE_LOCKS_REQUIRED(int)’ cannot be overloaded with ‘int cartographer::mapping::ConnectedComponents::EXCLUSIVE_LOCKS_REQUIRED(int)’
75 | EXCLUSIVE_LOCKS_REQUIRED(lock_);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:73:34: note: previous declaration ‘int cartographer::mapping::ConnectedComponents::EXCLUSIVE_LOCKS_REQUIRED(int)’
73 | int FindSet(int trajectory_id) EXCLUSIVE_LOCKS_REQUIRED(lock_);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:80:22: error: expected ‘;’ at end of member declaration
80 | std::map<int, int> forest_ GUARDED_BY(lock_);
| ^~~~~~~
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:80:41: error: ‘lock_’ is not a type
80 | std::map<int, int> forest_ GUARDED_BY(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:80:46: error: ISO C++ forbids declaration of ‘GUARDED_BY’ with no type [-fpermissive]
80 | std::map<int, int> forest_ GUARDED_BY(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:82:38: error: expected ‘;’ at end of member declaration
82 | std::map<std::pair<int, int>, int> connection_map_ GUARDED_BY(lock_);
| ^~~~~~~~~~~~~~~
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:82:65: error: ‘lock_’ is not a type
82 | std::map<std::pair<int, int>, int> connection_map_ GUARDED_BY(lock_);
| ^~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:82:70: error: ISO C++ forbids declaration of ‘GUARDED_BY’ with no type [-fpermissive]
82 | std::map<std::pair<int, int>, int> connection_map_ GUARDED_BY(lock_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:82:54: error: ‘int cartographer::mapping::ConnectedComponents::GUARDED_BY(int)’ cannot be overloaded with ‘int cartographer::mapping::ConnectedComponents::GUARDED_BY(int)’
82 | std::map<std::pair<int, int>, int> connection_map_ GUARDED_BY(lock_);
| ^~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/internal/connected_components.h:80:30: note: previous declaration ‘int cartographer::mapping::ConnectedComponents::GUARDED_BY(int)’
80 | std::map<int, int> forest_ GUARDED_BY(lock_);
| ^~~~~~~~~~
[57/381] Building CXX object CMakeFiles...tographer/mapping/map_builder_test.cc.o
FAILED: CMakeFiles/cartographer.mapping.map_builder_test.dir/cartographer/mapping/map_builder_test.cc.o
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DGFLAGS_IS_A_DLL=0 -I/home/jyy/cartographer_ws/src/cartographer/cartographer -I. -I/home/jyy/cartographer_ws/src/cartographer -isystem /usr/include/eigen3 -isystem /usr/include/lua5.3 -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -MD -MT CMakeFiles/cartographer.mapping.map_builder_test.dir/cartographer/mapping/map_builder_test.cc.o -MF CMakeFiles/cartographer.mapping.map_builder_test.dir/cartographer/mapping/map_builder_test.cc.o.d -o CMakeFiles/cartographer.mapping.map_builder_test.dir/cartographer/mapping/map_builder_test.cc.o -c /home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/map_builder_test.cc
In file included from /home/jyy/cartographer_ws/src/cartographer/cartographer/common/thread_pool.h:28,
from /home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/map_builder.h:22,
from /home/jyy/cartographer_ws/src/cartographer/cartographer/mapping/map_builder_test.cc:17:
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:41:18: error: expected ‘;’ at end of member declaration
41 | State GetState() LOCKS_EXCLUDED(mutex_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:41:35: error: ‘mutex_’ has not been declared
41 | State GetState() LOCKS_EXCLUDED(mutex_);
| ^~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:41:41: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
41 | State GetState() LOCKS_EXCLUDED(mutex_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:44:45: error: expected ‘;’ at end of member declaration
44 | void SetWorkItem(const WorkItem& work_item) LOCKS_EXCLUDED(mutex_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:44:62: error: ‘mutex_’ has not been declared
44 | void SetWorkItem(const WorkItem& work_item) LOCKS_EXCLUDED(mutex_);
| ^~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:44:68: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
44 | void SetWorkItem(const WorkItem& work_item) LOCKS_EXCLUDED(mutex_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:44:47: error: ‘int cartographer::common::Task::LOCKS_EXCLUDED(int)’ cannot be overloaded with ‘int cartographer::common::Task::LOCKS_EXCLUDED(int)’
44 | void SetWorkItem(const WorkItem& work_item) LOCKS_EXCLUDED(mutex_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:41:20: note: previous declaration ‘int cartographer::common::Task::LOCKS_EXCLUDED(int)’
41 | State GetState() LOCKS_EXCLUDED(mutex_);
| ^~~~~~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:48:52: error: expected ‘;’ at end of member declaration
48 | void AddDependency(std::weak_ptr<Task> dependency) LOCKS_EXCLUDED(mutex_);
| ^
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:48:69: error: ‘mutex_’ has not been declared
48 | void AddDependency(std::weak_ptr<Task> dependency) LOCKS_EXCLUDED(mutex_);
| ^~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:48:75: error: ISO C++ forbids declaration of ‘LOCKS_EXCLUDED’ with no type [-fpermissive]
48 | void AddDependency(std::weak_ptr<Task> dependency) LOCKS_EXCLUDED(mutex_);
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:48:54: error: ‘int cartographer::common::Task::LOCKS_EXCLUDED(int)’ cannot be overloaded with ‘int cartographer::common::Task::LOCKS_EXCLUDED(int)’-
- 列表
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:65:58: error: ‘mutex_’ has not been declared
65 | ThreadPoolInterface* thread_pool_to_notify_ GUARDED_BY(mutex_) = nullptr;
| ^~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:65:75: error: invalid pure specifier (only ‘= 0’ is allowed) before ‘;’ token
65 | ThreadPoolInterface* thread_pool_to_notify_ GUARDED_BY(mutex_) = nullptr;
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:65:75: error: ISO C++ forbids declaration of ‘GUARDED_BY’ with no type [-fpermissive]
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:65:47: error: ‘int cartographer::common::Task::GUARDED_BY(int)’ cannot be overloaded with ‘int cartographer::common::Task::GUARDED_BY(int)’
65 | ThreadPoolInterface* thread_pool_to_notify_ GUARDED_BY(mutex_) = nullptr;
| ^~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:64:23: note: previous declaration ‘int cartographer::common::Task::GUARDED_BY(int)’
64 | WorkItem work_item_ GUARDED_BY(mutex_);
| ^~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:66:9: error: expected ‘;’ at end of member declaration
66 | State state_ GUARDED_BY(mutex_) = NEW;
| ^~~~~~
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:66:27: error: ‘mutex_’ has not been declared
66 | State state_ GUARDED_BY(mutex_) = NEW;
| ^~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:66:40: error: invalid pure specifier (only ‘= 0’ is allowed) before ‘;’ token
66 | State state_ GUARDED_BY(mutex_) = NEW;
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:66:40: error: ISO C++ forbids declaration of ‘GUARDED_BY’ with no type [-fpermissive]
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:66:16: error: ‘int cartographer::common::Task::GUARDED_BY(int)’ cannot be overloaded with ‘int cartographer::common::Task::GUARDED_BY(int)’
66 | State state_ GUARDED_BY(mutex_) = NEW;
| ^~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:64:23: note: previous declaration ‘int cartographer::common::Task::GUARDED_BY(int)’
64 | WorkItem work_item_ GUARDED_BY(mutex_);
| ^~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:67:16: error: expected ‘;’ at end of member declaration
67 | unsigned int uncompleted_dependencies_ GUARDED_BY(mutex_) = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:67:53: error: ‘mutex_’ has not been declared
67 | unsigned int uncompleted_dependencies_ GUARDED_BY(mutex_) = 0;
| ^~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:67:63: error: ISO C++ forbids declaration of ‘GUARDED_BY’ with no type [-fpermissive]
67 | unsigned int uncompleted_dependencies_ GUARDED_BY(mutex_) = 0;
| ^
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:67:42: error: ‘int cartographer::common::Task::GUARDED_BY(int)’ cannot be overloaded with ‘int cartographer::common::Task::GUARDED_BY(int)’
67 | unsigned int uncompleted_dependencies_ GUARDED_BY(mutex_) = 0;
| ^~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:64:23: note: previous declaration ‘int cartographer::common::Task::GUARDED_BY(int)’
64 | WorkItem work_item_ GUARDED_BY(mutex_);
| ^~~~~~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:68:19: error: expected ‘;’ at end of member declaration
68 | std::set<Task*> dependent_tasks_ GUARDED_BY(mutex_);
| ^~~~~~~~~~~~~~~~
| ;
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:68:47: error: ‘mutex_’ has not been declared
68 | std::set<Task*> dependent_tasks_ GUARDED_BY(mutex_);
| ^~~~~~
/home/jyy/cartographer_ws/src/cartographer/cartographer/common/task.h:68:53: error: ISO C++ forbids declaration of ‘GUARDED_BY’ with no type [-fpermissive]but does not override
38 | LOCKS_EXCLUDED(mutex_) override;
| ^~~~~~~~~~~~~~
ninja: build stopped: subcommand failed.
<== Failed to process package 'cartographer':
Command '['ninja', '-j16', '-l16']' returned non-zero exit status 1.
- 列表
Reproduce this error by running:
==> cd /home/jyy/cartographer_ws/build_isolated/cartographer && ninja -j16 -l16Command failed, exiting.
jyy@jyy-Lenovo-XiaoXinPro-1 -
-
ubuntu20.04上编译遇到了同样的问题,想问下解决了吗