Ok, what I am showing here is VERY experimental and is a sketch of how I got to the point of a working ROS on a Slackware … 14.2, because of cmake mainly.
The fully working version is covered in ROS Kinetic on Slackware 14.2, this is my trial (quite good despite messing up gazebo due to wrong qmake) on 14.1:
Honestly? Start by installing sbopkg if you by that moment don’t have one
sbopkg is in theory a gui application, but I will delibe… delibre…. debrli… by choice use it with console params. As of now, I am on a multilib 64/32bit system, but later on I will switch to a pure 64bit. Grabbing sbopkg right now is:
(root) wget https://github.com/sbopkg/sbopkg/releases/download/0.38.1/sbopkg-0.38.1-noarch-1_wsr.tgz installpkg sbopkg-0.38.1-noarch-1_wsr.tgz
Note: for an easier install you can fetch some tools from Alien repository http://www.slackware.com/~alien/slackbuilds/qt5/pkg64/14.1/, especially Qt5. Now grab the pip and start pumping ROS into your system:
(root) sbopkg -i pip pip install -U rosdep rosinstall_generator wstool rosinstall rosdep init
(user) rosdep update mkdir ~/ros_catkin_ws cd ~/ros_catkin_ws rosinstall_generator desktop_full --rosdistro kinetic --deps --wet-only --tar > kinetic-desktop-full-wet.rosinstall
Now time to donwload the packages: I went for a single download at a time with -j1 because it hanged at my first try at opencv, but if your net connection is normal you can go for -j8
wstool init -j1 src kinetic-desktop-full-wet.rosinstall
Umm, yay? Now the fun part
bash-4.2$ rosdep install --from-paths src --ignore-src --rosdistro kinetic -y ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: rosconsole: Unsupported OS [slackware] catkin: Unsupported OS [slackware] image_view: Unsupported OS [slackware] urdf: Unsupported OS [slackware] rosgraph: Unsupported OS [slackware] resource_retriever: Unsupported OS [slackware] nodelet_topic_tools: Unsupported OS [slackware] rqt_graph: Unsupported OS [slackware] qt_gui: Unsupported OS [slackware] roslib: Unsupported OS [slackware] rosbuild: Unsupported OS [slackware] rosclean: Unsupported OS [slackware] tf: Unsupported OS [slackware] convex_decomposition: Unsupported OS [slackware] roswtf: Unsupported OS [slackware] geometric_shapes: Unsupported OS [slackware] rqt_web: Unsupported OS [slackware] robot_state_publisher: Unsupported OS [slackware] rqt_py_console: Unsupported OS [slackware] rqt_topic: Unsupported OS [slackware] opencv3: Unsupported OS [slackware] rqt_top: Unsupported OS [slackware] rqt_rviz: Unsupported OS [slackware] pluginlib: Unsupported OS [slackware] rqt_msg: Unsupported OS [slackware] gl_dependency: Unsupported OS [slackware] rqt_service_caller: Unsupported OS [slackware] rosmaster: Unsupported OS [slackware] rqt_pose_view: Unsupported OS [slackware] pcl_conversions: Unsupported OS [slackware] rqt_console: Unsupported OS [slackware] depth_image_proc: Unsupported OS [slackware] python_qt_binding: Unsupported OS [slackware] laser_geometry: Unsupported OS [slackware] rviz: Unsupported OS [slackware] rqt_gui_cpp: Unsupported OS [slackware] rqt_bag: Unsupported OS [slackware] qt_gui_py_common: Unsupported OS [slackware] eigen_conversions: Unsupported OS [slackware] diagnostic_common_diagnostics: Unsupported OS [slackware] camera_calibration_parsers: Unsupported OS [slackware] rostime: Unsupported OS [slackware] rospy: Unsupported OS [slackware] rosunit: Unsupported OS [slackware] python_orocos_kdl: Unsupported OS [slackware] stage: Unsupported OS [slackware] bondcpp: Unsupported OS [slackware] rosconsole_bridge: Unsupported OS [slackware] camera_info_manager: Unsupported OS [slackware] roslz4: Unsupported OS [slackware] rqt_bag_plugins: Unsupported OS [slackware] rosmsg: Unsupported OS [slackware] turtlesim: Unsupported OS [slackware] rqt_robot_monitor: Unsupported OS [slackware] rosparam: Unsupported OS [slackware] rospack: Unsupported OS [slackware] tf2: Unsupported OS [slackware] rqt_runtime_monitor: Unsupported OS [slackware] rqt_dep: Unsupported OS [slackware] rqt_plot: Unsupported OS [slackware] rostest: Unsupported OS [slackware] cpp_common: Unsupported OS [slackware] nodelet: Unsupported OS [slackware] stage_ros: Unsupported OS [slackware] rqt_robot_steering: Unsupported OS [slackware] roslaunch: Unsupported OS [slackware] genpy: Unsupported OS [slackware] rqt_shell: Unsupported OS [slackware] roscreate: Unsupported OS [slackware] qt_dotgraph: Unsupported OS [slackware] rqt_publisher: Unsupported OS [slackware] cv_bridge: Unsupported OS [slackware] gazebo_ros: Unsupported OS [slackware] rosbag_storage: Unsupported OS [slackware] octomap: Unsupported OS [slackware] bondpy: Unsupported OS [slackware] tf2_kdl: Unsupported OS [slackware] class_loader: Unsupported OS [slackware] collada_urdf: Unsupported OS [slackware] pcl_ros: Unsupported OS [slackware] rosmake: Unsupported OS [slackware] image_proc: Unsupported OS [slackware] roscpp: Unsupported OS [slackware] collada_parser: Unsupported OS [slackware] rviz_plugin_tutorials: Unsupported OS [slackware] actionlib: Unsupported OS [slackware] qt_gui_cpp: Unsupported OS [slackware] eigen_stl_containers: Unsupported OS [slackware] librviz_tutorial: Unsupported OS [slackware] pr2_description: Unsupported OS [slackware] roslisp: Unsupported OS [slackware] message_filters: Unsupported OS [slackware] random_numbers: Unsupported OS [slackware] gazebo_plugins: Unsupported OS [slackware] tf_conversions: Unsupported OS [slackware] dynamic_reconfigure: Unsupported OS [slackware] tf2_eigen: Unsupported OS [slackware] rqt_tf_tree: Unsupported OS [slackware] rqt_logger_level: Unsupported OS [slackware] theora_image_transport: Unsupported OS [slackware] urdf_parser_plugin: Unsupported OS [slackware] orocos_kdl: Unsupported OS [slackware] rosbag: Unsupported OS [slackware]
(Kentucky voice) Damn, lady, that’s some fiiiiineeee list you got there!
Let us … ignore that for a moment and go on to the compile phase (I will be using this command CONSTANTLY):
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
No empy? Oh, right:
pip install empy
And … first catkin was ok! 1/228 !
Up to the next point of compile it was good, then:
ImportError: No module named catkin.environment_cache
Quick look at the file where the error originated from…
you are looking for catkin in install_isolated/lib ? only?
I am on the 64bit system, it was build into lib64!
ok, screw it, no time for a pretty patch, I just copied the install_isolated/lib64/python2.7/site-packages into install_isolated/lib and went on…
cd install_isolated cp -r lib64/* lib/ rm -R lib64 ln -s lib lib64 cd ..
Next one:
==> Processing catkin package: 'class_loader' Could not find a package configuration file provided by "console_bridge"
oh, ok… maybe he really NEEDS it
(as root) mkdir ~/ros_random cd ~/ros_random git clone https://github.com/ros/console_bridge cd console_bridge mkdir build && cd build && cmake ../ && make install
Ok, keep on console open with root login and in ~/ros_random, all external dependencies will be dealt with over there.
Poco was not found. Set the Poco_INCLUDE_DIR cmake cache entry to the
(as root) wget http://pocoproject.org/releases/poco-1.7.5/poco-1.7.5.tar.gz tar -xzf poco-1.7.5.tar.gz cd poco-1.7.5 ./configure && make &&make install
Cannot specify link libraries for target "test_urdf" which is not built by
git clone https://github.com/ros/urdf_parser_py cd urdf_parser_py python setup.py install
Nope? Oh, scratch the last python setup.py, we need it inside catkin:
python setup.py install --prefix /home/anil/ros_catkin/install_isolated
At this stage I read the command line options for catkin_make_isolated:
./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --from-pkg pr2_description
Much better now, you just need to redo from the last error – and most commonly, before redoing, delete the build_isolated/pr2_description or whatever the last buggy package was.
Oh, I don’t have gtest! Time to head and grab googletest:
git clone https://github.com/google/googletest cd googletest mkdir build && cd build && cmake ../ && make && make install
Could NOT find TinyXML (missing: TinyXML_LIBRARY TinyXML_INCLUDE_DIR)
… because I don’t have any? story of my life
sbopkg -i tinyxml
But be prepared – this will work for now, but tinyxml is still missing a tinyxml.pc for package configuration – you can overcome this by installing tinyxml2
sbopkg -i tinyxml
copying /usr/lib64/pkgconfig/tinyxml2.pc to tinyxml.pc and modifying the entries – a ready-made version is in the Slackware 14.2 tutorial, just FYI.
Now, this is just for reference, I fixed it earlier on, but here it was shown first:
First, you can get an error like:
---> Processing catkin package: 'python_qt_binding' TEST FAILED: /home/anil/ros_catkin/install_isolated/lib64/python2.7/site-packages/ does NOT support .pth files error: bad install directory or PYTHONPATH
You basically fix it with moving lib64 to lib and linking directories, so this is a fixed issue.
qt_gui_cpp:
ImportError: No module named PyQt5
Uff, I have qt5 (if you don’t: Alien Bob repository or sbopkg -i qt5 and lots of time), lets install the rest of the gang:
sbopkg -i "python3 python3-sip python3-pyqt5"
… and SCRATCH THAT ! Don’t do that !
I MUST build PyQt5 for python2, goddamit
so… upgrade your sip to 4.18 from slackware 14.2 (grab the file from ftp.slackware.com or whatever)
grab PyQt5 from slackbuilds for 14.2 manually – both Slackbuild and source
compile
qt_gui_cpp:
usr/share/sip/PyQt5/QtCore/qregularexpression.sip:26:32: fatal error: qregularexpression.h: No such file or directory #include
what the flipping floppery fuck? well, that’s new
oh, wait, shiboken2 and pyside2? maybe?
NOT THIS:
sbopkg -i "shiboken pyside"
I need to clone repo:
git clone http://code.qt.io/cgit/pyside/shiboken.git/ cd shiboken && mkdir build (by hand) MODIFY CMakeLists.txt and change min version of cmake from 3.0 to 2.8 cd build && cmake ../ && make && make install
yeah, dirty stuff with cmake, but … DONE!
now pyside2, same with pyside2.git, and … shit
[ 95%] Running generator for QtWebEngineWidgets... Fatal error: line=26, column=66, message=Failed to parse: 'typesystem_webchannel.xml'
ok, i fetched older version of this .xml and it went through – you basically need to comment out one line, easier to go back a version with .xml
what? another error?
qwebenginedownloaditem_wrapper.cpp: No such file or directory c++: error: /home/anil/ros_random/pyside2/build/PySide2/QtWebEngineWidgets/PySide2/QtWebEngineWidgets/qwebengineprofile_wrapper.cpp: No such file or directory
Ok, maybe:
touch qwebenginescript_wrapper.cpp touch qwebenginescript_wrapper.h ...
I touched every file he wanted and poof! i have pyside2 (will be a little bit broken and finally I don’t think I really need pyside2)
ok, now this
/usr/share/sip/PyQt5/QtCore/qregularexpression.sip:26:32: fatal error: qregularexpression.h: No such file or directory
hmm, the file is where it should be:
locate qregularexpression.h /usr/include/qt5/QtCore/qregularexpression.h
maybe qmake is bad?
Ok, for a test run I renamed qmake to qmake-qt4, linked qmake to qmake-qt5:
(as root) cd /usr/bin mv qmake qmake-qt4 ln -s qmake-qt5 qmake
and delete build_isolated/qt_gui_cpp (bad makefile, redo it)
btw. how to check if it is working?
qmake -query QT_INSTALL_HEADERS qmake-qt5 -query QT_INSTALL_HEADERS
and now you know 🙂 and it works!
… until lz4 pops up
sbopkg -i lz4 sbopkg -i fltk
ooooh, player not detected – not critical, just a slight warning in the background, I’ll ignore it
now urdfdom:
git clone https://github.com/ros/urdfdom_headers cd urdfdom_headers mkdir build && cd build && cmake ../ && make && make install
git clone https://github.com/ros/urdfdom cd urdfdom mkdir build && cd build && cmake ../ && make && make install
assimp? assimp!
sbopkg -i assimp
==> Processing catkin package: 'geometric_shapes'
Eigen3 missing? huh? /var/log/packages shows me one, so wtf? oooooh, you mean no Eigen3Config.cmake
lets work around it:
go to src/geometric_shapes/CMakeLists.txt
delete: (or comment for safety)
find_package(Eigen3 REQUIRED)
and add:
find_package( PkgConfig ) pkg_check_modules( EIGEN3 REQUIRED eigen3 ) include_directories( ${EIGEN3_INCLUDE_DIRS} )
(the last one is different from the thingie down the road in the CMakeLists.txt file: EIGEN3_INCLUDE_DIRS vs EIGEN3_INCLUDE_DIR )
sbopkg -i qhull
’nuff said
==> Processing catkin package: 'camera_calibration_parsers'
no yaml-cpp
sbopkg -i yaml-cpp
==> Processing catkin package: 'collada_parser'
sbopkg -i opencollada sbopkg -i collada-dom
still lots of errors, starting with
'stod' is not a member of 'std'
Ok, I added to robot_model/collada_parser/CMakeLists.txt: (somewhere near find_package for example)
set(CMAKE_CXX_FLAGS "-std=gnu++11")
(I thought about set(CMAKE_CXX_FLAGS “-std=c++11”) but… gnu++11 should work)
oh, still an error, a serious one… std and boost types are off? what the….?
I took a glance into /usr/local/include/urdf_model/types.h and was amazed
who the hell would do that with std types when boost will be used later on?!
looking into github history of commits at urdfdom_headers… oh, in 2015 someone switched from std to boost
brilliant
so I grabbed at this point the 0.4 branch of urdfdom_headers
git clone -b 0.4 https://github.com/ros/urdfdom_headers cd urdfdom_header mkdir build && cd build && cmake ../ && make && make install
works!
… for now, I’m suspicious I’ve broken something badly, but nevermind my doubts, the bridges had been crossed, chopped and burned to ashes
==> Processing catkin package: 'pcl_conversions'
no PCL, go figure…
hmm, PCL needs flann … but >1.7.0 (sbopkg gives you an ancient 1.2)
wget http://www.cs.ubc.ca/research/flann/uploads/FLANN/flann-1.8.4-src.zip unzip flann-1.8.4-src.zip cd flann-1.8.4-src mkdir build && cd build && cmake ../ && make && make install
git clone https://github.com/PointCloudLibrary/pcl cd pcl mkdir build && cd build && cmake ../ && make -j4 && make install
take a shitload of time, fyi, so at this point I said “screw the safety, lets go with -j4!”, or, more honestly “screw watching youtube in the background, lets max out all cores with -j4!”
no gazebo? ok, first the obvious requirements:
hg clone https://bitbucket.org/ignitionrobotics/ign-transport
oh, he needs a lot:
hg clone https://bitbucket.org/ignitionrobotics/ign-math hg clone https://bitbucket.org/ignitionrobotics/ign-msgs hg clone https://bitbucket.org/ignitionrobotics/ign-tools
and
sbopkg -i zeromq
… scratch that, zeromq from 14.1 repo is v2, i need higher (not too high since git master branch failed to compile for me):
wget https://archive.org/download/zeromq_3.2.5/zeromq-3.2.5.tar.gz tar -xzf zeromq-3.2.5.tar.gz cd zeromq-3.2.5 ./configure && make && make install
oh, not that … libzmq!
git clone git clone https://github.com/zeromq/libzmq
error?
inproc_lat.cpp.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
erm… add somewhere in CMakeLists.txt:
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
ok, compiles, make install works and let me try ign-transport
-- checking for module 'libzmq>=3.2.0' -- package 'libzmq>=3.2.0' not found -- Looking for zmq pkgconfig file - not found -- zmq not found, Please install zmq
?
ok, in libzmq/build i have a .pc file, just copy it:
cp libzmq.pc /usr/local/lib64/pkgconfig/
git clone https://github.com/zeromq/cppzmq cd cppzmq && cp *.hpp /usr/local/include/
ign-transport done… done? whatever, gazebo:
hg clone https://bitbucket.org/osrf/sdformat hg clone https://bitbucket.org/osrf/gazebo
-- BUILD WARNINGS -- HDF5 not found -- Simbody not found, for simbody physics engine option, please install libsimbody-dev. -- DART not found, for dart physics engine option, please install libdart-core4-dev. -- Failed to find OGRE's plugin directory. The build will succeed, but gazebo will likely fail to run. -- Player not found, gazebo plugin for player will not be built. -- GNU Triangulation Surface library not found - Gazebo will not have CSG support. -- Bullet > 2.82 not found, for bullet physics engine option, please install libbullet2.82-dev. -- Oculus Rift support will be disabled. -- GDAL not found, Digital elevation terrains support will be disabled. -- ronn not found, manpages won't be generated -- Graphviz not found, Model editor's schematic view will be disabled. -- OpenSource Virtual Reality (OSVR) support will be disabled. -- END BUILD WARNINGS -- BUILD ERRORS: These must be resolved before compiling. -- Missing: Unable to find FreeImage.h -- Missing: Unable to find libfreeimage -- Missing: Google Protobuf (libprotobuf-dev) -- Missing: Google Protobuf Compiler (protobuf-compiler) -- Missing: Google Protobuf Compiler Library (libprotoc-dev) -- Missing: libtar -- Missing: TBB - Threading Building Blocks -- Missing: Ignition msgs0 library. -- Missing: Ignition Transport (libignition-transport-dev) -- Missing: libqwt-dev. Required for plotting. -- END BUILD ERRORS
ooh, that’s a fine list…
sbopkg -i hdf5
git clone https://github.com/simbody/simbody/
GCC too old? >4.9? I honestly don’t think so… modify CMakeLists.txt to match 4.8.3 and go
git clone https://github.com/danfis/libccd git clone git://github.com/flexible-collision-library/fcl.git
oh, hey, fcl contains FindEigen3, might help with no eigen3 error somewhere earlier on
and… what the? still dart shouts about no fcl? oh… too new, he needs 0.4 at most, darn it
wget https://github.com/flexible-collision-library/fcl/archive/0.4.0.tar.gz tar -xzf 0.4.0.tar.gz cd fcl-0.4.0/ mkdir build && cd build && cmake ../ && make && make install
Dart dart dart, now I have:
SpecializedForAspect.hpp:61:11: internal compiler error: in use_thunk, at cp/method.c:338 virtual ~SpecializedForAspect() = default;
time to go medieval with him and change all the “virtual ~… = default;” to ” virtual … {} ”
oooh, that’s a lot of virtual defaults to change! but not enough to write a script… yet, maybe tomoroow
and then, and only then, i realised… i need older dart
git clone -b release-4.3 https://github.com/dartsim/dart
fml
The rest:
sbopkg -i OpenSceneGraph sbopkg -i tinyxml2 sbopkg -i bullet git clone https://github.com/dartsim/dart sbopkg -i ogre
ooh, errors in ogre package, i needed to download it and change the folder inside ogre.Slackbuild (should be fixed on Sbo by now)
sbopkg -i gts sbopkg -i OpenCSG sbopkg -i "proj geos gdal" sbopkg -i graphviz
now errors:
sbopkg -i FreeImage sbopkg -i libtar sbopkg -i protobuf (hey, maybe it will work without all dependencies?) sbopkg -i tbb sbopkg -i qwt
and unto the breach!…. i mean, unto the gazebo?
…. fuuuuck! wrong ign-transport2 … i should do the transport1 !
hg clone -b ign-transport1 https://bitbucket.org/ignitionrobotics/ign-transport
at last! cmake on gazebo done, now make && make install
at [100%] I got an eror:
/home/anil/ros_random/gazebo/gazebo/plugins/rest_web/RestApi.cc: In function 'void DumpRequest(const char*, FILE*, unsigned char*, size_t, char)': /home/anil/ros_random/gazebo/gazebo/plugins/rest_web/RestApi.cc:64:18: error: expected ')' before 'PRId64' "%s, %10.10" PRId64 " bytes (0x%8.8" PRIx64 ")\n", _text, s, s);
you are kiddin’ me, right?
modify
#include
to look like:
#define __STDC_FORMAT_MACROS 1 #include
catkin package gazebo_ros still complains about OGRE missing
Could not find a package configuration file provided by "OGRE" with any of the following names: OGREConfig.cmake ogre-config.cmake
huh? oh, in /usr/local/lib64/cmake/gazebo/gazebo-config.cmake he is searching for OGRE – in lib, not lib64, the line should be
set(CMAKE_MODULE_PATH "${OGRE_INSTALL_PREFIX}/share/OGRE/cmake/modules;${OGRE_INSTALL_PREFIX}/lib64/OGRE/cmake;${OGRE_INSTALL_PREFIX}/CMake;${CMAKE_MODULE_PATH}")
ok, done, gazebo_ros is starting the compilation process – and it’s done!
pcl_ros:
By not providing "FindEigen3.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Eigen3", but CMake did not find one. Could not find a package configuration file provided by "Eigen3" with any of the following names: Eigen3Config.cmake eigen3-config.cmake Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set "Eigen3_DIR" to a directory containing one of the above files. If "Eigen3" provides a separate development package or SDK, be sure it has been installed.
I have a deja-vu, the one of that sort that includes swearing in 7 different languages at once
ok, again in CMakeFiles.txt:
find_package( PkgConfig ) pkg_check_modules( EIGEN3 REQUIRED eigen3 )
At last!
<== Finished processing package [228 of 228]: 'xacro'
ok, for the bash setup on a single console:
source ~/ros_catkin/install_isolated/setup.bash
and:
mkdir -p catkin_ws/src cd catkin_ws/src catkin_init_workspace
works!
…but gazebo is broken and I think I know why – I forgot to return qmake to its former glory of Qt4 … damn