The following tutorial gets you started with compiling ROS from source on Arch Linux. It combines information from http://wiki.ros.org/jade/Installation/Arch and http://wiki.ros.org/jade/Installation/Source.
I tried this on a fresh archlinux vm using vagrant
vagrant init terrywang/archlinux; vagrant up --provider virtualbox
I needed to edit the Vagrantfile to give some more memory to make roscpp compile. Uncomment the following part
config.vm.provider "virtualbox" do |vb|
# Customize the amount of memory on the VM:
vb.memory = "2048"
end
then refresh the vm from the config
vagrant reload
and finally login
vagrant ssh
Inside the vm we first install some base dependencies and make sure that during building ROS packages from source the correct python version is found.
sudo pacman -Sy yaourt python2-pip
yaourt --noconfirm -S python2-rosdep python2-rosinstall-generator
sudo rosdep init
rosdep update
pip2 install --user -U wstool catkin-tools
export PATH=$HOME/.local/bin:$PATH
cd ~/.local/bin && ln -s /usr/bin/python2 python && cd -
Now we install the ros_base
meta package using the package manager. This seems to be the best way to install all dependencies. In general, rosdep
is a tool meant to install dependencies, but it seems that on Arch not all rosdep rules are up to date.
yaourt --noconfirm -Sy ros-jade-ros-base
Now we ignore the system-wide install, and download the same packages again from source manually and build them in a catkin workspace.
mkdir ~/ws && cd ~/ws
rosinstall_generator ros_base --rosdistro jade --deps --wet-only --tar > jade-ros-base-wet.rosinstall
wstool init -j4 src jade-ros-base-wet.rosinstall
catkin init
catkin config -DCMAKE_BUILD_TYPE=Release
catkin build
Now src
contains all the 77 packages that comprise ros_base
, whereas build
contains all the cmake build directories.