Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 24.04 Noble Numbat ROS1 build in docker #39

Open
lucasw opened this issue Mar 10, 2024 · 14 comments
Open

Ubuntu 24.04 Noble Numbat ROS1 build in docker #39

lucasw opened this issue Mar 10, 2024 · 14 comments
Assignees

Comments

@lucasw
Copy link
Owner

lucasw commented Mar 10, 2024

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

Currently there is a working docker file in https://github.com/lucasw/ros_from_src/blob/ubuntu2404/ubuntu_2404/Dockerfile

@lucasw
Copy link
Owner Author

lucasw commented Mar 30, 2024

Try out the 2204 Dockerfile with 24.04

cd ros_from_src/ubuntu_2204
docker build . -t ros_from_src_ubuntu_2404 --build-arg IMAGE=ubuntu:24.04

@lucasw
Copy link
Owner Author

lucasw commented Mar 30, 2024

Seeing this a lot for some apt installs

Hit:1 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists...
E: Unable to correct problems, you have held broken packages.

So far: vim


# docker build . -t ros_from_src_ubuntu_2404
ARG IMAGE=ubuntu:24.04
FROM ${IMAGE}
ARG IMAGE
RUN echo ${IMAGE}

ENV DEBIAN_FRONTEND="noninteractive"

RUN apt-get update -yqq
RUN apt-get upgrade -yqq
# RUN apt-get install -yqq apt-utils
RUN apt-cache search vim
RUN apt-get update -yqq && apt-get upgrade -yqq && apt-get install -yqq vim

cmake doesn't, install, so I guess try again in a few weeks

(or build cmake from source...)

@lucasw lucasw changed the title 24.04 build in docker 24.04 Noble Numbat build in docker Mar 30, 2024
@lucasw lucasw self-assigned this Mar 30, 2024
@lucasw
Copy link
Owner Author

lucasw commented Apr 16, 2024

The apt installs work now, currently the dockerfile is failing during catkin with:

Errors << tf:cmake /base_catkin_ws/logs/tf/build.cmake.000.log
CMake Error at /usr/share/catkin/cmake/catkinConfig.cmake:82 (find_package):
  Could not find a package configuration file provided by "angles" with any
  of the following names:
...

install python3-angles? But why build tf or all of geometry at all, just use it from apt

@lucasw
Copy link
Owner Author

lucasw commented Apr 16, 2024

python3-python_qt_bindings isn't in 24.04?

trying to build rqt

CMake Error at /base_catkin_ws/src/roso/qt_gui_core/qt_gui_cpp/src/CMakeLists.txt:10 (message):
  No Python binding generator found.

Install python3-sip-dev

AttributeError: "pyqt_sip_dir" is not a valid configuration value or user option
...
FileNotFoundError: The sip directory for PyQt5 could not be located. Please ensure that PyQt5 is installed

Install pyqt5-dev

@lucasw
Copy link
Owner Author

lucasw commented Apr 16, 2024

Seeing a lot of these:

_______________________________________________________________________________
Warnings << camera_info_manager:cmake /base_catkin_ws/logs/camera_info_manager/build.cmake.000.log
<string>:3: SyntaxWarning: invalid escape sequence '\$'

@lucasw
Copy link
Owner Author

lucasw commented Apr 16, 2024

Install every debian ros package:

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

@lucasw
Copy link
Owner Author

lucasw commented Apr 16, 2024

libuvc_camera isn't compiling properly, but libuvc-dev is installed

catkin build ... --verbose
...
--   Found libusb-1.0, version 1.0.27
-- libusb-1.0 found using pkgconfig
-- libuvc 0.0.7

/usr/lib/cmake/libuvc/libuvcConfig.cmake is missing from 0.0.7, it's there in 23.10 with 0.0.6

https://github.com/libuvc/libuvc/commits/master/libuvcConfig.cmake

libuvc/libuvc#125 (comment)

-->

https://github.com/lucasw/libuvc_ros/tree/libuvc_0_0_7

ros-o/libuvc_ros#1

@lucasw
Copy link
Owner Author

lucasw commented Apr 16, 2024

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/__main__.py", line 31, in <module>
    sys.exit(_main())
             ^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/cli/main.py", line 70, in main
    return command.main(cmd_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
           ^^^^^^^^^^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
    self.handle_pip_version_check(options)
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 179, in handle_pip_version_check
    session = self._build_session(
              ^^^^^^^^^^^^^^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/network/session.py", line 343, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 180, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 175, in <genexpr>
    matches = (
              ^
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/metadata/base.py", line 594, in iter_all_distributions
    for dist in self._iter_distributions():
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 168, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 136, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py", line 103, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "/base_catkin_ws/build/nmea_navsat_driver/venv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2164, in <module>
    register_finder(pkgutil.ImpImporter, find_on_path)
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
Traceback (most recent call last):
  File "/base_catkin_ws/install/lib/catkin_virtualenv/venv_install", line 43, in <module>
    venv.install(
  File "/base_catkin_ws/install/lib/python3/dist-packages/catkin_virtualenv/venv.py", line 117, in install
    run_command(command + ["-r", req], check=True)
  File "/base_catkin_ws/install/lib/python3/dist-packages/catkin_virtualenv/__init__.py", line 37, in run_command
    return subprocess.run(cmd, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/base_catkin_ws/build/nmea_navsat_driver/venv/bin/python', '-m', 'pip', 'install', '-vvv', '--no-cache-dir', '-qq', '--retries', '10', '--timeout', '30', '-r', '/base_catkin_ws/install/share/catkin_virtualenv/requirements.txt']' returned non-zero exit status 1.
make[2]: *** [CMakeFiles/nmea_navsat_driver_generate_virtualenv.dir/build.make:88: venv/bin/activate] Error 1
make[2]: *** Deleting file 'venv/bin/activate'
make[1]: *** [CMakeFiles/Makefile2:263: CMakeFiles/nmea_navsat_driver_generate_virtualenv.dir/all] Error 2

-> disable the testing for now:

catkin build nmea_navsat_driver -j1 --verbose --cmake-args -DCATKIN_ENABLE_TESTING=False

@lucasw
Copy link
Owner Author

lucasw commented Apr 16, 2024

____________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Errors     << plotjuggler:check /base_catkin_ws/logs/plotjuggler/build.check.000.log                                                                                                                                                
[Parquet] not found. Skipping plugin DataLoadParquet.
[MOSQUITTO] not found. Skipping plugin DataStreamMQTT.
QtAV_FOUND                 = FALSE
QTAV_INCLUDE_DIRS          = QTAV_INCLUDE_DIR-NOTFOUND;QTAV_INCLUDE_DIR-NOTFOUND/..
QTAV_LIBRARIES             = QTAV_LIBRARY-NOTFOUND
QTAVWIDGETS_INCLUDE_DIRS   = 
QTAVWIDGETS_LIBRARIES      = QTAVWIDGETS_LIBRARY-NOTFOUND;QTAV_LIBRARY-NOTFOUND
QtAV not found. VideoPlayer plugin will not be built. Try installing it with 'sudo apt install libqtav-dev'
CMake Error at /base_catkin_ws/install/lib/cmake/fastcdr/fastcdr-config.cmake:55 (include):
  include could not find requested file:

    /base_catkin_ws/install/lib/cmake/fastcdr/fastcdr-static-targets.cmake
Call Stack (most recent call first):
  plotjuggler_plugins/ParserROS/CMakeLists.txt:8 (find_package)

There's no libqtav-dev - plotjuggler wants it

@lucasw
Copy link
Owner Author

lucasw commented Apr 17, 2024

This is happening within find_package(apriltag REQUIRED)

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/apriltag/apriltagTargets.cmake:92 (message):
  The imported target "apriltag::apriltag" references the file

     "/usr/lib/lib/x86_64-linux-gnu/libapriltag.so.3.3.0"

The lib/lib path is the issue.

This cmake file duplicates it:

cmake_minimum_required(VERSION 3.5.0)
project(april_test)

find_package(apriltag REQUIRED)

Looks to be reported already: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069023 - probably that'll get rolled into 24.04 in the next few days? Check back again later.

libapriltag-dev:amd64                              3.3.0-2.1build1 

-> Try apt update + apt upgrade

@lucasw
Copy link
Owner Author

lucasw commented Apr 17, 2024

Next is making fuse build

libceres-dev 2.2.0+dfsg-4ubuntu1

Rebased the cpp17 branch (locusrobotics/fuse#270) and it builds, though need an ifdef around error_line_color.getHSB to make it build in 20.04.

@lucasw
Copy link
Owner Author

lucasw commented Apr 17, 2024

opencv_apps (using the indigo branch so not surprising)

Errors << opencv_apps:make /base_catkin_ws/logs/opencv_apps/build.make.000.log
/base_catkin_ws/src/opencv_apps/src/nodelet/face_recognition_nodelet.cpp:93:7: error: template-id ‘append<boost::filesystem::path::iterator>’ for ‘boost::filesystem::path& boost::filesystem::path::append(iterator, iterator, const codecvt_type&)’ does not match any template declaration
   93 | path& path::append<typename path::iterator>(typename path::iterator lhs, typename path::iterator rhs,
      |       ^~~~
In file included from /usr/include/boost/filesystem.hpp:16,
                 from /base_catkin_ws/src/opencv_apps/src/nodelet/face_recognition_nodelet.cpp:36:
/usr/include/boost/filesystem/path.hpp:876:13: note: candidates are: ‘template<class InputIterator> typename boost::enable_if_c<boost::conjunction<boost::filesystem::detail::path_traits::is_path_source_iterator<InputIterator>, boost::negation<boost::filesystem::detail::path_traits::is_native_char_ptr<InputIterator> > >::value, boost::filesystem::path&>::type boost::filesystem::path::append(InputIterator, InputIterator, const codecvt_type&)’
  876 |     >::type append(InputIterator begin, InputIterator end, const codecvt_type& cvt)
      |             ^~~~~~
/usr/include/boost/filesystem/path.hpp:1708:25: note:                 ‘boost::filesystem::path& boost::filesystem::path::append(const value_type*, const value_type*, const codecvt_type&)’
 1708 | BOOST_FORCEINLINE path& path::append(const value_type* begin, const value_type* end, codecvt_type const&)
      |                         ^~~~
/usr/include/boost/filesystem/path.hpp:860:13: note:                 ‘template<class InputIterator> typename boost::enable_if_c<boost::conjunction<boost::filesystem::detail::path_traits::is_path_source_iterator<InputIterator>, boost::negation<boost::filesystem::detail::path_traits::is_native_char_ptr<InputIterator> > >::value, boost::filesystem::path&>::type boost::filesystem::path::append(InputIterator, InputIterator)’
  860 |     >::type append(InputIterator begin, InputIterator end)
...

But those are just warnings this is the real error:

error: no type named ‘type’ in ‘struct boost::enable_if_c<false, boost::filesystem::path&>’

This change makes it build

ros-perception/opencv_apps#144

@lucasw lucasw changed the title 24.04 Noble Numbat build in docker Ubuntu 24.04 Noble Numbat build in docker Apr 19, 2024
@lucasw lucasw changed the title Ubuntu 24.04 Noble Numbat build in docker Ubuntu 24.04 Noble Numbat ROS1 build in docker Apr 19, 2024
@lucasw
Copy link
Owner Author

lucasw commented Apr 19, 2024

Next

Errors << aruco_detect:make /base_catkin_ws/logs/aruco_detect/build.make.000.log
/base_catkin_ws/src/other/fiducials/aruco_detect/src/aruco_detect.cpp: In member function ‘void FiducialsNode::poseEstimateCallback(const FiducialArrayConstPtr&)’:
/base_catkin_ws/src/other/fiducials/aruco_detect/src/aruco_detect.cpp:431:24: error: ‘drawAxis’ is not a member of ‘cv::aruco’
  431 |                 aruco::drawAxis(cv_ptr->image, cameraMatrix, distortionCoeffs,

Same error in 23.10

-> Use drawFrameAxes introlab/rtabmap#860

@lucasw
Copy link
Owner Author

lucasw commented May 4, 2024

Will need to change this dockerfile to accommodate https://discourse.ubuntu.com/t/changes-to-ros-debian-science-support-packages/44497, and build from source all the packages that used to be available from apt following #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant