Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

catkin_make errors with cmake regarding PY_em/PY_EM/empy/em #2

Closed
trevoravant opened this issue Sep 11, 2019 · 4 comments
Closed

catkin_make errors with cmake regarding PY_em/PY_EM/empy/em #2

trevoravant opened this issue Sep 11, 2019 · 4 comments

Comments

@trevoravant
Copy link

I am having the same error as this comment on the ros-melodic-catkin package's AUR page. Unfortunately, I have not been able to resolve it. I'm posting it here because the AUR page suggested opening issues on Github rather than as comments on the AUR page.

I installed ros-melodic-ros-base using yay: yay -S ros-melodic-ros-base. I wasn't able to install it using pikaur (see this issue) as was suggested by ROS's install instructions. The installation with yay took awhile but seemed to complete successfully.

I then completed the rest of the steps on the ROS install instructions page. Next, I tried doing the first ROS tutorial, but catkin_make gave me the following error:

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/
$ catkin_make
Base path: /home/trevor/catkin_ws
Source space: /home/trevor/catkin_ws/src
Build space: /home/trevor/catkin_ws/build
Devel space: /home/trevor/catkin_ws/devel
Install space: /home/trevor/catkin_ws/install
Creating symlink "/home/trevor/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/melodic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/trevor/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/trevor/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/trevor/catkin_ws/install -G Unix Makefiles" in "/home/trevor/catkin_ws/build"
####
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 9.1.0
-- The CXX compiler identification is GNU 9.1.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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/trevor/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.16", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using default Python package layout
-- Could NOT find PY_em (missing: PY_EM) 
CMake Error at /opt/ros/melodic/share/catkin/cmake/empy.cmake:29 (message):
  Unable to find either executable 'empy' or Python module 'em'...  try
  installing the package 'python-empy'
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/all.cmake:163 (include)
  /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:56 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/trevor/catkin_ws/build/CMakeFiles/CMakeOutput.log".
Invoking "cmake" failed

Here is the CMakeOutput.log file: CMakeOutput.log

Any help would be appreciated.

Thanks

@bionade24
Copy link
Member

bionade24 commented Sep 12, 2019

You ran in the empy executable problem, which isn't a problem of our packaging. You should ask such questions on https://aswers.ros.org, instead of here (It's already answered there). But you could ask me if you want on freenode, mail or elsewhere, too.
Solution: If you want to use python2, install python2-empy, otherwise you have to tell cmake to use python3.

@acxz
Copy link
Member

acxz commented Sep 29, 2019

Since I had also ran into this issue ros-melodic-arch/ros-melodic-ros-base#2. I decided to edit the ROS Tutorial Page so that the information on building catkin workspaces in somewhere more visible.

@seth814
Copy link

seth814 commented Feb 7, 2021

In my case, catkin was looking at my python version installed in anaconda.
I just catkin make -DPYTHON_EXECUTABLE=/usr/bin/python3 like it says on the page acxz posted.
Install was able to find python3-empy now and continue.

@bionade24
Copy link
Member

In my case, catkin was looking at my python version installed in anaconda.
I just catkin make -DPYTHON_EXECUTABLE=/usr/bin/python3 like it says on the page acxz posted.
Install was able to find python3-empy now and continue.

Yes, that's necessary and also covered in Arch Wiki.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants