catkin build can't find catkinconfig.cmake during cross compile to raspberry pi 3

asked 2019-05-27 07:06:54 -0600

simchanu gravatar image

updated 2019-05-27 07:12:34 -0600

Hi,

I've followed this tutorial to set up a cross compilation chain to a raspberry pi 3B on Ubuntu Mate 16.04. I've got to the step of the first compilation with catkin build.

When I compile from a clean workspace and freshly extended (catkin clean && unset CMAKE_PREFIX_PATH && catkin config --extend $PWD/arm_raspberry/opt/ros/kinetic). This is the error I get :

CMake Error at /home/user/catkin_ws/arduino-robot/CMakeLists.txt:10 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "catkin", but CMake did not find one.

  Could not find a package configuration file provided by "catkin" with any of the following names:

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set "catkin_DIR" to a directory containing one of the above files.  If "catkin" provides a separate development package or SDK, be sure it has been installed.

And here is the complete log of the build (unrelevant path are deleted as well) :

user@hostname:/home/user/catkin_ws/$ catkin build -j4 --cmake-args -DCMAKE_TOOLCHAIN_FILE=$PWD/raspberrytoolchain.cmake -DCMAKE_CROSS_COMPILE_PREFIX=$PWD/arm_raspberry
python: can't open file '/share/rosjava_build_tools/generate_environment_variables.py': [Errno 2] No such file or directory
python: can't open file '/share/rosjava_build_tools/generate_environment_variables.py': [Errno 2] No such file or directory
python: can't open file '/share/rosjava_build_tools/generate_environment_variables.py': [Errno 2] No such file or directory
-------------------------------------------------------------------------------------------------------------
Profile:                     default
Extending:        [explicit] /home/user/catkin_ws/arm_raspberry/opt/ros/kinetic
Workspace:                   /home/user/catkin_ws
-------------------------------------------------------------------------------------------------------------
Build Space:        [exists] /home/user/catkin_ws/build
Devel Space:        [exists] /home/user/catkin_ws/devel
Install Space:      [unused] /home/user/catkin_ws/install
Log Space:         [missing] /home/user/catkin_ws/logs
Source Space:       [exists] /home/user/catkin_ws/src
DESTDIR:            [unused] None
-------------------------------------------------------------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-------------------------------------------------------------------------------------------------------------
Additional CMake Args:       -DCMAKE_TOOLCHAIN_FILE=/home/user/catkin_ws/raspberrytoolchain.cmake -DCMAKE_CROSS_COMPILE_PREFIX=/home/user/catkin_ws/arm_raspberry
Additional Make Args:        -j4
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-------------------------------------------------------------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-------------------------------------------------------------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
-------------------------------------------------------------------------------------------------------------
[build] Found '18' packages in 0.0 seconds.                                                                 
[build] Updating package table.                                                                             
Starting  >>> catkin_tools_prebuild                                                                         
Finished  <<< catkin_tools_prebuild                [ 5.0 seconds ]                                          
Starting  >>> arduino-robot                                                                               
Starting  >>> auv-autopilot                                                                                 
Starting  >>> ev-attopilot                                                                                  
Starting  >>> ev-carriage                                                                                   
____________________________________________________________________________________________________________
Errors     << ev-carriage:cmake /home/user/catkin_ws/logs/ev-carriage/build.cmake.000.log
CMake Error at /home/user/catkin_ws/src/EVs/ev-carriage/CMakeLists.txt:15 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "catkin", but
  CMake did not find one.

  Could not find a package configuration file provided by "catkin" with any
  of the following names:

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
  "catkin_DIR" to a directory containing one of the above files.  If "catkin"
  provides a separate development package or SDK, be sure it has been
  installed.


cd /home/user/catkin_ws/build/ev-carriage; catkin build --get-env ev-carriage | catkin env -si  /usr/bin/cmake /home/user ...
(more)
edit retag flag offensive close merge delete

Comments

try to create the package with all required dependencies with catkin_create_pkg.

KrishKannan_007 gravatar imageKrishKannan_007 ( 2019-05-29 02:21:23 -0600 )edit