clydemcqueen/orca4

Docker build error

Closed this issue · 6 comments

I'm trying to build with docker/build.sh on an Intel Mac running MacOS and I'm getting this error:

1.872 CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:603 (message):
1.872   A required package was not found
1.872 Call Stack (most recent call first):
1.872   /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
1.872   CMakeLists.txt:58 (pkg_check_modules)
1.872 
1.872 
1.873 -- Configuring incomplete, errors occurred!
1.873 See also "/home/orca4/ardupilot_gazebo/build/CMakeFiles/CMakeOutput.log".
------
Dockerfile:95
--------------------
  94 |     # Build ardupilot_gazebo
  95 | >>> RUN [ "/bin/bash" , "-c" , " \
  96 | >>>   cd ardupilot_gazebo \
  97 | >>>   && mkdir build \
  98 | >>>   && cd build \
  99 | >>>   && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 100 | >>>   && make -j4" ]
 101 |     
--------------------
ERROR: failed to solve: process "/bin/bash -c    cd ardupilot_gazebo   && mkdir build   && cd build   && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo   && make -j4" did not complete successfully: exit code: 1

The error message is a bit obtuse... which required package was not found?

I have not tried building orca4 on MacOS, so I may not be of much help here.

I'm going to create an Ubuntu boot drive for my Intel Core i7 desktop and try again. I'll report back here if I'm able to build successfully with the docker/build.sh script.

I created an Ubuntu boot drive (24.04 LTS) using the latest ISO from ubuntu.com (Ubuntu is running on an Intel Core i7 with 8GB of RAM). After installing docker I'm still getting the same build error using "docker/build.sh"

=> [17/38] RUN git clone https://github.com/ArduPilot/ardupilot_gazebo.git             10.4s
=> ERROR [18/38] RUN [ "/bin/bash" , "-c" , "   cd ardupilot_gazebo   && mkdir build    1.6s 
1.545 CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:603 (message):
1.545   A required package was not found
1.545 Call Stack (most recent call first):
1.545   /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
1.545   CMakeLists.txt:58 (pkg_check_modules)
1.545 
1.545 
1.545 -- Configuring incomplete, errors occurred!
1.545 See also "/home/orca4/ardupilot_gazebo/build/CMakeFiles/CMakeOutput.log".
------
Dockerfile:95
--------------------
  94 |     # Build ardupilot_gazebo
  95 | >>> RUN [ "/bin/bash" , "-c" , " \
  96 | >>>   cd ardupilot_gazebo \
  97 | >>>   && mkdir build \
  98 | >>>   && cd build \
  99 | >>>   && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
 100 | >>>   && make -j4" ]
 101 |     
--------------------
ERROR: failed to solve: process "/bin/bash -c    cd ardupilot_gazebo   && mkdir build   && cd build   && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo   && make -j4" did not complete successfully: exit code: 1

I guess the problem is with ardupilot_gazebo

I confirmed that ardupilot_gazebo build failed looking for gstreamer packages:

2.088 --   No package 'gstreamer-1.0' found
2.091 --   No package 'gstreamer-app-1.0' found

I'll take a look. Thanks for finding the bug!

Quick fix is to checkout a version of ardupilot_gazebo before Rhys & Co added the dependency on gstreamer. E.g.,

# Build ardupilot_gazebo
RUN [ "/bin/bash" , "-c" , " \
  cd ardupilot_gazebo \
  && git checkout 4945088 \
  && mkdir build \
  && cd build \
  && cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  && make -j4" ]

I made this change and the Dockerfile now builds.