cartographer编译失败

2024-01-26 15:20
文章标签 编译 失败 cartographer

本文主要是介绍cartographer编译失败,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

                         cartographer编译失败

cartographer在编译的过程中,报错:multiple rules generate CMakeFiles/ ,提示编译pb.cc 文件冲突;把ninja换成1.8版本。报错消失。

Base path: /home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws
Source space: /home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/src
Build space: /home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/build_isolated
Devel space: /home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/devel_isolated
Install space: /home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/install_isolated
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~  traversing 4 packages in topological order:
~~  - cartographer (plain cmake)
~~  - cartographer_ros_msgs
~~  - cartographer_ros
~~  - cartographer_rviz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

==> Processing plain cmake package: 'cartographer'
build.ninja exists, skipping explicit cmake invocation...
==> ninja build.ninja in '/home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/build_isolated/cartographer/install'
ninja: warning: bad deps log signature or version; starting over
[0/1] Re-running CMake...
-- Build type: Release
-- 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, C++11, OpenMP]
20220222 I can find Sphinx
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/build_isolated/cartographer/install
ninja: no work to do.
==> ninja -j24 -l24 in '/home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/build_isolated/cartographer/install'
ninja: error: '/home/sukai/workspace/cartographer/cartographer_ws/src/cartographer/scripts/protobuf/build/libprotobuf.a', needed by 'cartographer_pbstream', missing and no known rule to make it
<== Failed to process package 'cartographer': 
  Command '['ninja', '-j24', '-l24']' returned non-zero exit status 1.

Reproduce this error by running:
==> cd /home/sukai/workspace/0/137/cartographer_noetic/cartographer2022-07-11/cartographer_ws/build_isolated/cartographer && ninja -j24 -l24

Command failed, exiting.

解决:换ninja-1.8版

ubuntu 安装ninja

1.安装依赖re2c
root@ubuntu:~# apt-get install re2c
root@ubuntu:~# re2c --version
re2c 1.0.1
2.下载ninja (1.8版本,1.12版本也会报同样错误,其它版本自己试
git clone https://github.com/ninja-build/ninja.git

3.编译ninja
cd ninja
./configure.py --bootstrap  
4.安装ninja
cp ./ninja  /usr/bin 
ninja --version

5.打开控制台进入自己的项目

cd /home/sukai/cartographer_ws/src/cartographer/

依次执行:

protoc cartographer/cloud/proto/*.proto --cpp_out=.
protoc cartographer/common/proto/*.proto --cpp_out=.
protoc cartographer/ground_truth/proto/*.proto --cpp_out=.
protoc cartographer/mapping/proto/*.proto --cpp_out=.
protoc cartographer/mapping/proto/pose_graph/*.proto --cpp_out=.
protoc cartographer/mapping/proto/scan_matching/*.proto --cpp_out=.
protoc cartographer/sensor/proto/*.proto --cpp_out=.
protoc cartographer/transform/proto/*.proto --cpp_out=.
protoc cartographer/kalman_filter/proto/*.proto --cpp_out=.

然后

cd /home/sukai/cartographer_ws

编译:

catkin_make_isolated --install --use-ninja 
source ~/home/sukai/cartographer_ws/install_isolated/setup.bash

这篇关于cartographer编译失败的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/647232

相关文章

maven 编译构建可以执行的jar包

💝💝💝欢迎莅临我的博客,很高兴能够在这里和您见面!希望您在这里可以感受到一份轻松愉快的氛围,不仅可以获得有趣的内容和知识,也可以畅所欲言、分享您的想法和见解。 推荐:「stormsha的主页」👈,「stormsha的知识库」👈持续学习,不断总结,共同进步,为了踏实,做好当下事儿~ 专栏导航 Python系列: Python面试题合集,剑指大厂Git系列: Git操作技巧GO

ORACLE 11g 创建数据库时 Enterprise Manager配置失败的解决办法 无法打开OEM的解决办法

在win7 64位系统下安装oracle11g,在使用Database configuration Assistant创建数据库时,在创建到85%的时候报错,错误如下: 解决办法: 在listener.ora中增加对BlueAeri-PC或ip地址的侦听,具体步骤如下: 1.启动Net Manager,在“监听程序”--Listener下添加一个地址,主机名写计

STM32 ADC+DMA导致写FLASH失败

最近用STM32G070系列的ADC+DMA采样时,遇到了一些小坑记录一下; 一、ADC+DMA采样时进入死循环; 解决方法:ADC-dma死循环问题_stm32 adc dma死机-CSDN博客 将ADC的DMA中断调整为最高,且增大ADCHAL_ADC_Start_DMA(&hadc1, (uint32_t*)adc_buffer, ADC_Buffer_Size); 的ADC_Bu

Windows环境利用VS2022编译 libvpx 源码教程

libvpx libvpx 是一个开源的视频编码库,由 WebM 项目开发和维护,专门用于 VP8 和 VP9 视频编码格式的编解码处理。它支持高质量的视频压缩,广泛应用于视频会议、在线教育、视频直播服务等多种场景中。libvpx 的特点包括跨平台兼容性、硬件加速支持以及灵活的接口设计,使其可以轻松集成到各种应用程序中。 libvpx 的安装和配置过程相对简单,用户可以从官方网站下载源代码

Golang test编译使用

创建文件my_test.go package testsimport "testing"func TestMy(t *testing.T) {t.Log("TestMy")} 通常用法: $ go test -v -run TestMy my_test.go=== RUN TestMyTestMy: my_test.go:6: TestMy--- PASS: TestMy (0.

C++/《C/C++程序编译流程》

程序的基本流程如图:   1.预处理        预处理相当于根据预处理指令组装新的C/C++程序。经过预处理,会产生一个没有宏定义,没有条件编译指令,没有特殊符号的输出文件,这个文件的含义同原本的文件无异,只是内容上有所不同。 读取C/C++源程序,对其中的伪指令(以#开头的指令)进行处理将所有的“#define”删除,并且展开所有的宏定义处理所有的条件编译指令,如:“#if”、“

编译linux内核出现 arm-eabi-gcc: error: : No such file or directory

external/e2fsprogs/lib/ext2fs/tdb.c:673:29: warning: comparison between : In function 'max2165_set_params': -。。。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。 。。。。。。。。 host asm: libdvm <= dalvik/vm/mterp/out/Inte

QT 编译报错:C3861: ‘tr‘ identifier not found

问题: QT 编译报错:C3861: ‘tr’ identifier not found 原因 使用tr的地方所在的类没有继承自 QObject 类 或者在不在某一类中, 解决方案 就直接用类名引用 :QObject::tr( )

cartographer+turtlebot+hokuyo|安装配置

cartographer+turtlebot+hokuyo|安装配置 系统:ubuntu 14.04+ros indigo 或 ubuntu 16.04+ros kinetic 平台:turtlebot2 传感器:hokuyo UTM-30LX laser 本文假设已经成功安装ubuntu,ros,以及各种与turtlebot相关的ros package等。本文主要介绍,怎么安装配car

hector_quadrotor编译总结 | ubuntu 16.04 ros-kinetic版本

hector_quadrotor编译总结 | ubuntu 16.04 ros-kinetic版本 基于Ubuntu 16.04 LTS系统所用ROS版本为 Kinetic hector_quadrotor ROS包主要用于四旋翼无人机的建模、控制和仿真。 1.安装依赖库 所需系统及依赖库 Ubuntu 16.04|ros-kinetic|Gazebo|gazebo_ros_pkgs|ge