ApolloAuto / apollo-platform

Collections of Apollo Platform Software
733 stars 386 forks source link

Fail to run catkin_make #55

Open wqqn opened 6 years ago

wqqn commented 6 years ago

In apollo docker, I followed the ros tutorial, run: $ mkdir -p ~/catkin_ws/src $ cd ~/catkin_ws/ $ catkin_make

Then I met error:

nian@in_dev_docker:~/catkin_ws$ catkin_make Base path: /home/nian/catkin_ws Source space: /home/nian/catkin_ws/src Build space: /home/nian/catkin_ws/build Devel space: /home/nian/catkin_ws/devel Install space: /home/nian/catkin_ws/install Creating symlink "/home/nian/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/indigo/share/catkin/cmake/toplevel.cmake"

Running command: "cmake /home/nian/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/nian/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/nian/catkin_ws/install -G Unix Makefiles" in "/home/nian/catkin_ws/build"

-- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.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 -- 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 CMake Error at CMakeLists.txt:20 (message): Search for 'catkin' in workspace failed (catkin_find_pkg catkin /home/nian/catkin_ws/src): Traceback (most recent call last):

File "/usr/local/bin/catkin_find_pkg", line 9, in <module>
  load_entry_point('catkin-pkg==0.3.6', 'console_scripts', 'catkin_find_pkg')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
  return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
  return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
  entry = __import__(self.module_name, globals(),globals(), ['__name__'])

ImportError: No module named cli.find_pkg

Does anyone have a clue? Thanks!

fengqikai1414 commented 6 years ago

In dev docker, the path of ros is "/home/tmp/ros", but in the log you provided,

Creating symlink "/home/nian/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/indigo/share/catkin/cmake/toplevel.cmake"

ros path maybe incorrect. Before running "catkin_make", go to folder "/apollo" , try to run " source ./scripts/apollo_base.sh" first.