您的位置:首页 > 其它

ros-kinetic 编译向nvidia px2

2017-04-18 14:29 225 查看
这篇文章是我编译时遇到的所以问题及解决办法: 

   git clone https://github.com/stapelberg/libxcb.git
   configure: error: XCB requires xsltproc.   
sudo apt-get install xsltproc

    5  ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=/ope/ros/kinetic/ -j6

    6  sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=/opt/ros/kinetic/ -j6

    7  mv src/opencv3 src-pkg/

    8  sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=/opt/ros/kinetic/ -j6

    9  sudo apt-get install oracle-java8-installer

   10* sudo apt-get install oracle-jav

   11  sudo add-apt-repository ppa:webupd8team/java

   12  sudo apt-get update

   13  sudo apt-get install oracle-java8-installer

   14  java -v

   20  sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=/opt/ros/kinetic/ -j6

   21  vi /opt/ros/kinetic/share/rqt_common_plugins/package.xml

   22  vi /opt/ros/kinetic/share/rqt_common_plugins/package.xml 

   33  cd qt-everywhere-opensource-src-5.7.0/

   35  sudo apt-get install libcb-deb

   38  git clone https://github.com/stapelberg/libxcb.git
   47  configure: error: XCB requires xsltproc.

   48  sudo apt-get install xsltproc

   56  sudo apt-get install libxml2-dev

   57  sudo apt-get install libxml-dev

   70  git clone https://github.com/stapelberg/xcb-proto.git
   72  cd xcb-proto/

编译boost:

./bootstrap.sh

sudo ./b2 --with-python install

sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev

error:

3rdparty/xkbcommon/src/x11/x11-keymap.c:758:5: error: unknown type name ‘xcb_xkb_sym_interpret_iterator_t’
https://github.com/xkbcommon/libxkbcommon
python configure.py --qmake /usr/lib/aarch64-linux-gnu/qt5/bin/qmake --sip-incdir ../sip-4.19.1/siplib

nvidia@tegra-ubuntu:~/lib/ros_full/lib/pcl-master/build$ cmake -DCMAKE_BUILD_TYPE=None -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON ..

sudo apt-get install cmake python-empy

sudo apt-get install libyaml-cpp-dev

sudo apt-get install python3-pyqt5

sudo apt-get install libassimp-dev //3d模型

sudo apt-get install libqhull-dev   //https://launchpad.net/ubuntu/+source/qhull/2015.2-2

sudo apt-get install qtconnectivity5-dev qtbase5-dev qtbase5-dev qtbase5-dev qttools5-dev qttools5-dev qtbase5-dev qttools5-dev qtmultimedia5-dev qtbase5-dev qtconnectivity5-dev libqt5opengl5-dev qtpositioning5-dev qtbase5-dev qtdeclarative5-dev qtdeclarative5-dev
qtdeclarative5-dev qtdeclarative5-dev qtdeclarative5-dev qtscript5-dev qtscript5-dev libqt5sensors5-dev libqt5serialport5-dev qtbase5-dev libqt5svg5-dev qtbase5-dev qttools5-dev libqt5webkit5-dev qtbase5-dev libqt5x11extras5-dev qtbase5-dev libqt5xmlpatterns5-dev

sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=./install -j6

1.frist error:

 "console_bridge", but CMake did not find one.

git clone https://github.com/ros/console_bridge.git
2:
Unable to find the requested Boost libraries
apt-get install python-dev libicu-dev mpi-default-dev libbz2-dev
./bootstrap.sh --prefix=./install
sudo ./b2 --with-python install

3:
/usr/local/include/ or c:\poco\include\poco-1.3.2

sudo apt-get install python-pip python-dev build-essential

pip install python-qt5

#!/bin/sh

while [ "1" = "1" ]

do
pip install python-qt5 

done

sudo apt-get install libx11-dev

sudo apt-get install libfltk1.3-dev

4.
sudo dpkg -i libtinyxml-dev_2.6.2-3_arm64.deb
sudo apt-get -f install

5

    from PyQt5 import QtCore

ImportError: No module named PyQt5

6:
-- Could NOT find CURL (missing:  CURL_LIBRARY CURL_INCLUDE_DIR) 

7.
<== Failed to process package 'roslz4': 
sudo apt-get install liblz4

8.

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):

  Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR)

apt-get install libjpeg-dev libpng-dev

9.

Scanning dependencies of target lasernoise
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmMap'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmCloseOnce'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmUnmap'
/usr/lib/gcc/aarch64-linux-gnu/5/../../../aarch64-linux-gnu/libGL.so: undefined reference to `drmOpenOnce'

sudo apt-get install libdrm-dev

10.
CMake Error at test/CMakeLists.txt:4 (target_link_libraries):

  Cannot specify link libraries for target "image_geometry-utest" which is

  not built by this project.

nvidia@tegra-ubuntu:~/ros_catkin_ws/src/vision_opencv/image_geometry$ vi CMakeLists.txt 

11. no file ffi.h

  sudo apt-get install libffi-dev

  pip install -U supernova
pip install -U python-novaclient

12.
sudo apt-get install python-dev python-cffi libxml2-dev libxslt1-dev python-lxml python-cryptography python-openssl python-certifi python-defusedxml

13.
sudo apt-get install liblog4cxx10-dev

14:
<== Finished processing package [154 of 228]: 'camera_calibration_parsers'

==> Processing catkin package: 'nodelet'

==> Building with env: '/home/nvidia/ros_catkin_ws/install/env.sh'

Makefile exists, skipping explicit cmake invocation...

==> make cmake_check_build_system in '/home/nvidia/ros_catkin_ws/build_isolated/nodelet'

-- Using CATKIN_DEVEL_PREFIX: /home/nvidia/ros_catkin_ws/devel_isolated/nodelet

 Scanning dependencies of target nodeletlib

[ 75%] Building CXX object CMakeFiles/nodeletlib.dir/src/loader.cpp.o

[ 79%] Linking CXX shared library /home/nvidia/ros_catkin_ws/devel_isolated/nodelet/lib/libnodeletlib.so

/usr/bin/ld: /usr/local/lib/libboost_thread.a(thread.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `__stack_chk_guard@@GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/local/lib/libboost_thread.a(thread.o)(.text+0xc): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17'

/usr/bin/ld: final link failed: Bad value

collect2: error: ld returned 1 exit status

CMakeFiles/nodeletlib.dir/build.make:203: recipe for target '/home/nvidia/ros_catkin_ws/devel_isolated/nodelet/lib/libnodeletlib.so' failed

make[2]: *** [/home/nvidia/ros_catkin_ws/devel_isolated/nodelet/lib/libnodeletlib.so] Error 1

CMakeFiles/Makefile2:845: recipe for target 'CMakeFiles/nodeletlib.dir/all' failed

make[1]: *** [CMakeFiles/nodeletlib.dir/all] Error 2

Makefile:138: recipe for target 'all' failed

make: *** [all] Error 2

<== Failed to process package 'nodelet': 

  Command '['/home/nvidia/ros_catkin_ws/install/env.sh', 'make', '-j6']' returned non-zero exit status 2

Reproduce this error by running:

==> cd /home/nvidia/ros_catkin_ws/build_isolated/nodelet && /home/nvidia/ros_catkin_ws/install/env.sh make -j6

Command failed, exiting.

解决办法:加上-mcmodel=large编译选项

[root@localhost stream]# ls

Makefile stream.c

[root@localhost stream]# cat Makefile

CC = gcc

CFLAGS= -O2 -mcmodel=large
http://blog.csdn.net/lzshlzsh/article/details/50110771
解决方法: 

编辑tools/build/v2/tools/gcc.jam

在linux环境下,使用静态方式编译boost时,bjam没有添加-fPIC, 解决办法如下:

 编辑tools/build/v2/tools/gcc.jam文件,将第391行的

if( $link ) = shared 注释掉,如下图:

nvidia@tegra-ubuntu:~/ros_catkin_ws$ sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space=./install -j6

15.

  CMake Error at CMakeLists.txt:6 (find_package):

  By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has

  asked CMake to find a package configuration file provided by "PCL", but

  CMake did not find one.

16.

ImportError: No module named numpy

CMake Error at src/CMakeLists.txt:25 (message):

  Could not determine the NumPy include directory, verify that NumPy was

  installed correctly.

pip install numpy

17.

Scanning dependencies of target extract_images

[ 41%] Building CXX object CMakeFiles/extract_images.dir/src/nodes/extract_images.cpp.o

/home/nvidia/ros_catkin_ws/src/image_pipeline/image_view/src/nodelets/image_nodelet.cpp:46:21: fatal error: gtk/gtk.h: No such file or directory

sudo apt-get install libgtk2.0-dev 

18.

CMake Error at CMakeLists.txt:26 (find_package):

  By not providing "Findgazebo.cmake" in CMAKE_MODULE_PATH this project has

  asked CMake to find a package configuration file provided by "gazebo", but

  CMake did not find one.
http://www.linuxidc.com/Linux/2017-03/141506.htm 更新资源列表
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/Ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
添加密钥
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
更新安装包
sudo apt-get update
更新Gazebo(官网在2017.1.31发布了Gazebo8,但是ubuntu的软件仓库里还没有添加,所以以更新Gazebo7为例)
sudo apt-get install libgazebo7
sudo apt-get install gazebo7-common
sudo apt-get install gazebo7
在终端下输入
gazebo

19.
ignition-msg
ignition-trstmoert

20.

--   No package 'ogg' found

CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):

  A required package was not found
not find ogg module
sudo apt-get install libogg-dev

21.

--   No package 'theora' found

CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):

  A required package was not found

  sudo apt-get install libtheora-devliblua5.1-0-dev liblua50-dev liblualib50-dev liblivemedia-dev libogg-dev libmad0-dev libfaad-dev liba52-dev libflac-dev

  sudo apt-get install libmpeg2-4-dev

22.

  By not providing "FindCOLLADA_DOM.cmake" in CMAKE_MODULE_PATH this project

  has asked CMake to find a package configuration file provided by

  "COLLADA_DOM", but CMake did not find one.

  Could not find a package configuration file provided by "COLLADA_DOM"

  (requested version 2.3) with any of the following names

sudo apt-get install libcollada-dom2.4-dp-dev

23. can not find  urdfom
liburdf0d liburdfdom0.4-dbg liburdfdom-headers-dev liburdfdom-model-state0.4  liburdfdom-tools liburdf-parser-plugin-dev
liburdf-dev liburdfdom-dev liburdfdom-model0.4 liburdfdom-sensor0.4 liburdfdom-world0.4 
sudo apt-get install liburdf*

24.

/usr/local/include/urdf_model/pose.h: In member function ‘void urdf::Vector3::init(const string&)’:

/usr/local/include/urdf_model/pose.h:78:25: error: ‘stod’ is not a member of ‘std’

           xyz.push_back(std::stod(pieces[i]));

set(CMAKE_CXX_CFLAGE "$(CMAKE_CXX_CFLAGE) -std=gnu++0x")

25>

g++ boost.cpp /usr/local/lib/libboost_program_options.a -I /opt/local/include/ -g
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: