lucasw / ros_from_src

Build ros from source without using a PPA in a github action. Probably just copy what archlinux is doing. See also https://github.com/ros-o/ros-o
BSD 3-Clause "New" or "Revised" License
102 stars 16 forks source link

Ubuntu 24.04 Noble Numbat ROS1 build #42

Open lucasw opened 7 months ago

lucasw commented 7 months ago

Upgrade 23.10 to 24.04

Follows #39

Wasn't able to apt upgrade at first

The following packages have been kept back:
  liblog4cxx-dev liblog4cxx15 libruby3.1 ruby3.1
sudo apt purge liblog4cxx-dev
sudo apt purge libaprutil1
sudo apt autoremove

That seemed to clear out the conflicts (by uninstalling most of the debian ros packages and others), now this is running

sudo do-release-upgrade -d  # update- don't do this, wait for it to work without -d

-> That didn't work too well, didn't have working audio and the networking seemed off- did a full fresh install instead and now looks to be fully working.

lucasw commented 7 months ago

It looks like a bunch of apt packages that were available earlier in 24.04 are now unavailable? The docker file fails the same as a desktop install. Maybe try again in a few days.

E: Package 'liborocos-bfl-dev' has no installation candidate

Follow these suggestions: https://askubuntu.com/questions/1493000/how-do-i-find-out-why-a-package-gpac-has-been-removed-from-ubuntu

For now build more things from source, update those instructions as needed.

Could build https://github.com/orocos/orocos-bayesian-filtering from source but skipping any package that uses it for now (people_tracking_filter)

touch ./other/people/people_tracking_filter/CATKIN_IGNORE
lucasw commented 7 months ago
Starting  >>> catkin_tools_prebuild                                                                                                                                                                                          
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________
Errors     << catkin_tools_prebuild:cmake /home/lucasw/ros/ros1/ros_from_src_2404_ws/logs/catkin_tools_prebuild/build.cmake.000.log                                                                                          
CMake Error at CMakeLists.txt:12 (message):
  The catkin CMake module was not found, but it is required to build a linked
  workspace.  To resolve this, please do one of the following, and try
  building again.

Try building catkin_tools manually

Need to replace distutils

sudo apt install python3-setuptools

https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html

No it isn't catkin tools, it's regular catkin?

git clone git@github.com:ros/catkin
lucasw commented 7 months ago

Wasn't this working fine in 23.10- what's different now?

Errors     << vdb_mapping:cmake /home/lucasw/ros/ros1/ros_from_src_2404_ws/logs/vdb_mapping/build.cmake.002.log                                                                                                           
CMake Error at CMakeModules/FindTBB.cmake:270 (file):
  file failed to open for reading (No such file or directory):

    /usr/include/tbb/tbb_stddef.h
Call Stack (most recent call first):
  CMakeLists.txt:17 (find_package)

https://github.com/SteveMacenski/slam_toolbox/issues/469

-> git rm CMakeModules/FindTBB.cmake (but need backwards compatibility)

lucasw commented 7 months ago

A built from source rospack doesn't work for anything except system installed packages, after building and source deve/setup.bash it can't find anything in workspace

rospack list
octomap /usr/share/octomap
osrf_pycommon /usr/share/osrf_pycommon
urdfdom /usr/share/urdfdom

Probably because devel/setup.bash isn't setting ROS_PACKAGE_PATH? rospack adds /usr/share itself https://github.com/lucasw/rospack/commit/2ea310d3021e068495db9a0e99746666aa9c0522

Where is ROS_PACKAGE_PATH appended to- are there files inside devel that do it (when they are functioning)


The above is for a devel build, try an install - nope no better


https://github.com/ros/ros_environment ? don't have this installed at all, probably should start over and install it from source following the older ros from src instructions.

lucasw commented 7 months ago

The rospack failure causes this to fail

Errors     << nmea_navsat_driver:make /home/lucasw/ros/ros1/ros_from_src_2404_ws/logs/nmea_navsat_driver/build.make.001.log                                                                                               
[rospack] Error: package 'catkin_virtualenv' not found
find: ‘’: No such file or directory
WARNING: cannot load logging configuration file, logging is disabled

Can skip for now by not enabling testing

catkin config -DCATKIN_ENABLE_TESTING=False
lucasw commented 7 months ago

https://launchpad.net/ubuntu/+source/ros-metapackages - no noble entries

https://tracker.debian.org/pkg/ros-metapackages

Migration status: Blocked. Can't migrate due to a non-migratable dependency. Check status below. Blocked by: ros-rviz

This leads to https://tracker.debian.org/pkg/ros-ros-comm

Blocked by: boost1.83

That's the boost I have installed though

lucasw commented 7 months ago

Look around in recent versions of debian docker images, and make some Dockerfiles here for installing other ros packages

https://hub.docker.com/_/debian

Start with debian:trixie

# or bookworm
ARG IMAGE=debian:trixie
FROM ${IMAGE}
ARG IMAGE
RUN echo ${IMAGE}

ENV DEBIAN_FRONTEND="noninteractive"

RUN apt-get update -yqq
RUN apt-get upgrade -yqq

RUN apt-get update && apt-cache search ros-core-dev
RUN apt-get update && apt-cache search "Robot OS"

RUN apt-get install -yqq `apt-cache search "Robot OS" | awk '{print $1}' | xargs | sed 's/\n/ /g'`

bookworm has ros-core-dev, trixie doesn't

But roscore still works, other packages look reasonable (and as mentioned elsewhere libapriltags is a version that works with cmake).


double check right debian version:

cat /etc/os-release
lucasw commented 7 months ago

Current process to get base ros running using https://github.com/lucasw/ros_from_src/tree/ubuntu2404:

mkdir -p ~/ros/ros1/full_ros_from_src
cd ~/ros
git clone https://github.com/lucasw/ros_from_src --branch ubuntu2404
cd ~/ros/ros1/full_ros_from_src
~/ros/ros_from_src/git_clone.sh
~/ros/ros_from_src/build.sh
cd ~/ros/ros1/full_ros_from_src
source ~/ros/ros_from_src/env.sh
source catkin_ws/install/setup.bash

After that roscore, rostopic etc. will work


The latest changes break in python3.8, maybe create both site-packages and dist-packages or detect which is needed

+ ls -l '/home/runner/work/ros_from_src/ros_from_src/staging/ros/local/lib/python3.8/dist-packages//catkin_pkg*'
ls: cannot access '/home/runner/work/ros_from_src/ros_from_src/staging/ros/local/lib/python3.8/dist-packages//catkin_pkg*': No such file or directory

Next overlay the whole 2404 base_repos.yaml - some of them may be redundant but don't bother screen those out now

lucasw commented 7 months ago

Add these repos to the ros_from_src git_clone.sh

repositories:
  actionlib:
    type: git
    url: git@github.com:ros/actionlib.git
    version: noetic-devel
  angles:
    type: git
    url: git@github.com:ros/angles.git
    version: master
  bond_core:
    type: git
    url: git@github.com:ros-o/bond_core.git
    version: obese-devel
  geometry:
    type: git
    url: git@github.com:ros-o/geometry.git
    version: obese-devel
  interactive_markers:
    type: git
    url: git@github.com:ros-visualization/interactive_markers.git
    version: noetic-devel
  kdl_parser:
    type: git
    url: git@github.com:ros/kdl_parser.git
    version: noetic-devel
  nodelet_core:
    type: git
    url: git@github.com:ros/nodelet_core.git
    version: noetic-devel
  resource_retriever:
    type: git
    url: git@github.com:ros/resource_retriever.git
    version: kinetic-devel
  rosconsole_bridge:
    type: git
    url: git@github.com:ros/rosconsole_bridge.git
    version: kinetic-devel
  urdf:
    type: git
    url: git@github.com:ros/urdf.git
    version: melodic-devel
lucasw commented 7 months ago

Update git_clone.sh with ros-o repos, roscpp_core is the ros/ one

lucasw commented 7 months ago

https://discourse.ubuntu.com/t/changes-to-ros-debian-science-support-packages/44497

With the upcoming Ubuntu 24.04 LTS release, we’re adjusting our approach to the ROS Debian Science packages. Specifically, we will no longer include these packages in the Ubuntu Universe repository, starting with 24.04.

Looks like they are taking those packages out because some of them aren't compatible with the ROS2 binary installation.

lucasw commented 6 months ago
[E] [1716418271.777 /terrain/pcl_manager ...uginlib/./class_loader_imp.hpp:262]: Skipped loading plugin with error: XML Document '/home/lucasw/ros/ros1/install/overlay_2404_ws/install/share/test_nodelet_topic_tools/test/test_nodelets.xml' has no Root Element. This likely means the XML is malformed or missing..

Don't want to install these

touch src/was_in_apt/nodelet_core/test_nodelet_topic_tools/CATKIN_IGNORE
touch src/was_in_apt/nodelet_core/test_nodelet/CATKIN_IGNORE
lucasw commented 4 months ago

The action docker build is failing with

#23 2.888 Starting >>> build_type_condition                                              
#23 2.888 Starting >>> catkin_pkg_cmake_err                                              
#23 2.888 Starting >>> catkin_pkg_cmake_warn                                             
#23 2.888 [build 2.1 s] [1/132 complete] [4/4 jobs] [31 queued] [genmsg:loadenv - 0.0]   
[build 2.2 s] [1/132 complete] [4/4 jobs] [30 queued] [genmsg:cmake - 0.1] ... 
[build 2.3 s] [1/132 complete] [4/4 jobs] [28 queued] [genmsg:cmake - 0.2] ... 
[build 2.4 s] [1/132 complete] [4/4 jobs] [28 queued] [genmsg:cmake - 0.3] ... 
[build 2.5 s] [1/132 complete] [4/4 jobs] [28 queued] [genmsg:cmake - 0.4] ... 
[build 2.6 s] [1/132 complete] [4/4 jobs] [28 queued] [genmsg:cmake - 0.5] ... 
[build 2.7 s] [1/132 complete] [4/4 jobs] [28 queued] [genmsg:cmake - 0.6] ... 
Exception in callback _UnixReadPipeTransport._read_ready()
#23 3.546 handle: <Handle _UnixReadPipeTransport._read_ready()>
#23 3.546 Traceback (most recent call last):
#23 3.546   File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
#23 3.546     self._context.run(self._callback, *self._args)
#23 3.546   File "/usr/lib/python3.12/asyncio/unix_events.py", line 532, in _read_ready
#23 3.546     self._protocol.data_received(data)
#23 3.546   File "//ros/local/lib/python3.12/dist-packages/osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py", line 109, in data_received
#23 3.546     protocol.on_stderr_received(data)
#23 3.546   File "//ros/local/lib/python3.12/dist-packages/catkin_tools/execution/io.py", line 256, in on_stderr_received
#23 3.546     self.log_file.write(data)
#23 3.546 ValueError: write to closed file
#23 3.556 Failed <<< build_type_condition                 [ 0.6 seconds ]                

Try locally again- did something get updated that is failing?

It fails locally also (still using docker build)

lucasw commented 4 months ago

resource_retriever isn't linking in curl properly:

/usr/bin/ld: /home/lucasw/ros/ros1/install/underlay_ws/install/lib/libresource_retriever.so: undefined reference to `curl_global_init'
/usr/bin/ld: /home/lucasw/ros/ros1/install/underlay_ws/install/lib/libresource_retriever.so: undefined reference to `curl_easy_cleanup'
/usr/bin/ld: /home/lucasw/ros/ros1/install/underlay_ws/install/lib/libresource_retriever.so: undefined reference to `curl_global_cleanup'
/usr/bin/ld: /home/lucasw/ros/ros1/install/underlay_ws/install/lib/libresource_retriever.so: undefined reference to `curl_easy_setopt'
/usr/bin/ld: /home/lucasw/ros/ros1/install/underlay_ws/install/lib/libresource_retriever.so: undefined reference to `curl_easy_perform'
/usr/bin/ld: /home/lucasw/ros/ros1/install/underlay_ws/install/lib/libresource_retriever.so: undefined reference to `curl_easy_init'
collect2: error: ld returned 1 exit status

->

use CURL::libcurl instead of ${CURL_LIBRARIES} in cmakelists.txt

https://github.com/lucasw/resource_retriever/tree/curl_lib

lucasw commented 4 months ago

rosfmt was downloading a binary instead of actually getting built? :-1:

Removing it entirely, wasn't actually using it.

lucasw commented 3 months ago

Need to make jsk_rviz_plugins build in 24.04, some ogre calls need updating

-> already is fixed, but rebasing boost_placeholders on latest upstream master

:heavy_check_mark: