On Fri, 2020-08-14 at 19:24 -0400, Robert Kudyba wrote:


Great to hear.

For questions like this, you should really post on https://answers.ros.org and https://answers.gazebosim.org. I think this list is intended more for discussion than support.

Yes I did on the latter, no response.

The ROS answers site sees around 10x more activity, maybe you'll have better luck with your ROS questions there.

Now another failure in the next step. "Build the code in the workspace" I'm getting the pthreads error, which I've seen 

I had to specify a couple variables to get the catkin_make_isolated command to run so I got this:
./src/catkin/bin/catkin_make_isolated -DPYTHON_EXECUTABLE=/usr/local/bin/anaconda3/bin/python -DPYTHON_INCLUDE_DIR=/usr/local/bin/anaconda3/include/python3.7m  --install -DCMAKE_BUILD_TYPE=Release

<== Failed to process package 'gl_dependency':
  Command '['/root/ros_catkin_ws/install_isolated/env.sh', 'cmake', '/root/ros_catkin_ws/src/gl_dependency', '-DCATKIN_DEVEL_PREFIX=/root/ros_catkin_ws/devel_isolated/gl_dependency', '-DCMAKE_INSTALL_PREFIX=/root/ros_catkin_ws/install_isolated', '-DPYTHON_EXECUTABLE=/usr/local/bin/anaconda3/bin/python', '-DPYTHON_INCLUDE_DIR=/usr/local/bin/anaconda3/include/python3.7m', '-DCMAKE_BUILD_TYPE=Release', '-G', 'Unix Makefiles']' returned non-zero exit status 1.

Reproduce this error by running:
==> cd /root/ros_catkin_ws/build_isolated/gl_dependency && /root/ros_catkin_ws/install_isolated/env.sh cmake /root/ros_catkin_ws/src/gl_dependency -DCATKIN_DEVEL_PREFIX=/root/ros_catkin_ws/devel_isolated/gl_dependency -DCMAKE_INSTALL_PREFIX=/root/ros_catkin_ws/install_isolated -DPYTHON_EXECUTABLE=/usr/local/bin/anaconda3/bin/python -DPYTHON_INCLUDE_DIR=/usr/local/bin/anaconda3/include/python3.7m -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles'
Command failed, exiting.

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /root/ros_catkin_ws/build_isolated/gl_dependency/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_a7185/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_a7185.dir/build.make CMakeFiles/cmTC_a7185.dir/build
gmake[1]: Entering directory '/root/ros_catkin_ws/build_isolated/gl_dependency/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a7185.dir/CheckFunctionExists.c.o
/usr/bin/cc   -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_a7185.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_a7185
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a7185.dir/link.txt --verbose=1
/usr/bin/cc  -DCHECK_FUNCTION_EXISTS=pthread_create    -rdynamic CMakeFiles/cmTC_a7185.dir/CheckFunctionExists.c.o  -o cmTC_a7185  -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_a7185.dir/build.make:107: cmTC_a7185] Error 1
gmake[1]: Leaving directory '/root/ros_catkin_ws/build_isolated/gl_dependency/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:141: cmTC_a7185/fast] Error 2

Is there some workaround changing out the pthread? I just don't know where to look.

First we should clarify that you're now switching to ROS 1 stuff. Catkin is the buildsystem and build tool for ROS 1, you'd use ament and colcon in ROS 2.
ROS 1 and ROS 2 packages are generally not interchangeable. Many packages have branches for supporting both ROS 1 and ROS 2, but you can't generally drop a ROS 1 package into a ROS 2 build environment and expect it to work.

Assuming you're now building a separate ROS 1 distribution from the ROS 2 build you were discussing earlier:
The gl_dependency package only appears to be used in ROS 1, and it's really only a dummy CMake package to make sure some depenencies are installed. You're probably seeing a generic compiler verification check fail in CMake.
We could try skipping the compiler check since the gl_dependency package doesn't really need it, but this really indicates that theres something wrong with your build environment. I'm skeptical that you'll get any of the C/C++ packages to compile correctly, not just gl_dependency.
To be honest, the error doesn't even really seem related to ROS at all.

Just a hunch, but you might try ensuring that glibc-devel and boost-devel are installed, and CMake is up-to-date. Then remove your build and install directories and start again.

Again, this is the type of thing that is typcally handled on answers.ros.org...