Melodic Python3源码编译问题

ROS Melodic在源码编译的时候,需要log4cxx支持,但是没有可以用pip3,apt-get直接安装的方法,只能编译安装,过程中遇到问题,记录如下:

最开始直接下载最新版:0.12,安装好(安装方法:http://www.360doc.com/content/11/0209/14/116188_91579102.shtml),编译Melodic时,遇到如下错误:

[ 50%] Building CXX object CMakeFiles/rosconsole_log4cxx.dir/src/rosconsole/impl/rosconsole_log4cxx.cpp.o
/data/ros_catkin_full/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp: In function ‘void ros::console::impl::initialize()’:
/data/ros_catkin_full/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp:171:50: error: no matching function for call to ‘log4cxx::Logger::addAppender(ros::console::impl::ROSConsoleStdioAppender*)’
   logger->addAppender(new ROSConsoleStdioAppender);
                                                  ^
In file included from /usr/local/include/log4cxx/spi/loggingevent.h:28:0,
                 from /usr/local/include/log4cxx/layout.h:29,
                 from /usr/local/include/log4cxx/appenderskeleton.h:28,
                 from /data/ros_catkin_full/src/rosconsole/src/rosconsole/impl/rosconsole_log4cxx.cpp:42:
/usr/local/include/log4cxx/logger.h:144:16: note: candidate: virtual void log4cxx::Logger::addAppender(log4cxx::AppenderPtr)
   virtual void addAppender(const AppenderPtr newAppender);
                ^~~~~~~~~~~

由于安装的log4cxx版本不对,需要安装0.10.的。

编译0.10的版本时,提示下面的错误(Jetson Xavier NX核心板):

./configure --prefix=/usr/local --with-apr=/usr/local --with-apr-util=/usr/local  --with-charset=utf-8 --with-logchar=utf-8 --build=
checking build system type... ./config.guess: unable to guess system type

This script, last modified 2005-08-03, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
and
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2005-08-03

根据提示,下载最新的config.guess和config.sub就好了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值