error building moveit workspace: cannot find __main__ module
I installed ROS noetic according to doc http://wiki.ros.org/noetic/Installati... from ros repos. Then I added MOVEIT along the tutorial https://moveit.ros.org/install/source/.
When I build the workspace with catkin build, I always get following error:
/usr/bin/python3: can't find '__main__' module in '/opt/ros/noetic/lib/python3/dist-packages/em'
CMake Error at /opt/ros/noetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/KubuntuDaten/ws_catkin/build/catkin_tools_prebuild/catkin_generated/env_cached.sh
"/usr/bin/python3" "/opt/ros/noetic/lib/python3/dist-packages/em"
"--raw-errors" "-F"
"/KubuntuDaten/ws_catkin/build/catkin_tools_prebuild/catkin_generated/pkg.develspace.context.pc.py"
"-o"
"/KubuntuDaten/ws_catkin/devel/.private/catkin_tools_prebuild/lib/pkgconfig/catkin_tools_prebuild.pc"
"/opt/ros/noetic/share/catkin/cmake/em/pkg.pc.em") returned error code 1
Call Stack (most recent call first):
/opt/ros/noetic/share/catkin/cmake/em_expand.cmake:25 (safe_execute_process)
/opt/ros/noetic/share/catkin/cmake/catkin_package.cmake:327 (em_expand)
/opt/ros/noetic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
CMakeLists.txt:7 (catkin_package)
I tried already to reinstall module empy, but without any success. Any ideas, what to to try next?
CMakerror.log added:
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /KubuntuDaten/ws_moveit/build/catkin_tools_prebuild/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_cc0d0/fast && /usr/bin/make -f CMakeFiles/cmTC_cc0d0.dir/build.make CMakeFiles/cmTC_cc0d0.dir/build
make[1]: Verzeichnis „/KubuntuDaten/ws_moveit/build/catkin_tools_prebuild/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_cc0d0.dir/src.c.o
/usr/lib/ccache/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_cc0d0.dir/src.c.o -c /KubuntuDaten/ws_moveit/build/catkin_tools_prebuild/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_cc0d0
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cc0d0.dir/link.txt --verbose=1
/usr/lib/ccache/cc -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_cc0d0.dir/src.c.o -o cmTC_cc0d0
/usr/bin/ld: CMakeFiles/cmTC_cc0d0.dir/src.c.o: in function `main':
src.c:(.text+0x46): undefined reference to `pthread_create'
/usr/bin/ld: src.c:(.text+0x52): undefined reference to `pthread_detach'
/usr/bin/ld: src.c:(.text+0x63): undefined reference to `pthread_join'
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_cc0d0.dir/build.make:87: cmTC_cc0d0] Fehler 1
make[1]: Verzeichnis „/KubuntuDaten/ws_moveit/build/catkin_tools_prebuild/CMakeFiles/CMakeTmp“ wird verlassen
make: *** [Makefile:121: cmTC_cc0d0/fast] Fehler 2
Source file was:
#include <pthread.h>
void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /KubuntuDaten/ws_moveit/build/catkin_tools_prebuild/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_bbc34/fast && /usr/bin/make -f CMakeFiles/cmTC_bbc34.dir/build.make CMakeFiles/cmTC_bbc34.dir/build
make[1]: Verzeichnis „/KubuntuDaten/ws_moveit/build/catkin_tools_prebuild/CMakeFiles/CMakeTmp“ wird betreten
Building C object CMakeFiles/cmTC_bbc34.dir/CheckFunctionExists.c.o
/usr/lib/ccache/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_bbc34.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c
Linking C ...
The above link mentions this for ROS Neotic -
Note August 2020 For Noetic there is currently an issue with
catkin_tools
and the workaround is:Did you check that?
Yes, I did. There was another issue with ros-noetic-fcl, which I installed from the ros-testing repo.
Can you please check if you have all the dependencies installed? See this question.
I repeated the check & installation of dependencies with rosdep, according to the installation doc and @gvdhoorn, repeated the catkin config. Still have the same errror.
In Cmake logs I found errors and add them above. Because I am not deep enough in these software packages I am not shure what they mean.