Closed PeterBowman closed 3 weeks ago
Done at https://github.com/roboticslab-uc3m/vision/commit/1dac8586b642b89011fce1668d559e0c7d999aa6. Commit https://github.com/roboticslab-uc3m/vision/commit/2b92820f6e587e81afaafe49030a73c1425fbfe8 introduces specific type specializations for the MLS algorithm.
While bumping our CI GHA runners to ubuntu-24.04 I noticed that the corresponding jobs break at this release.
For starters, a C compiler must be found by CMake due to a PCL dependency (MPI), see https://github.com/roboticslab-uc3m/vision/commit/b969a834c121049153464037a9057da7b57a1a1c.
Then, it turned out SWIG 4.2.0, as packaged by apt, is not compatible with YARP bindings, see https://github.com/robotology/yarp/issues/3083. I decided to clone and build SWIG 4.2.1 from sources, see https://github.com/roboticslab-uc3m/speech/commit/3f752d5bb96e16f9264e9ca966e3a7b3a5cfa4b5. Note
bison
is the only dependency of SWIG, but it is installed by default on all runners. Besides,swig
is also present, therefore I had to eitherapt remove swig
first, or shadow the system-installedswig
executable with aswig4.0
symbolic link pointing at the locally compiled 4.2.1 version (sadly, FindSWIG.cmake does not cope well with plainswig
; it gives more precedence toswig4.0
, but this symlink is not generated by CMake during the build).Commit https://github.com/roboticslab-uc3m/vision/commit/1618f18dcff0ee0ee0952323f920b98081f6513e builds SWIG in our Docker images (in Ubuntu 24.04, distutils is hosted by the
python3-setuptools
apt package; see https://github.com/roboticslab-uc3m/vision/commit/c4653b1217a238f233defa818b91cac6fd8fb077).Next, I noticed that OpenCV's DNN module fails fast if the requested CPU/GPU is not found on the runner's environment. Commit https://github.com/roboticslab-uc3m/vision/commit/6044389f97052a15944d14babb3ceca2dd40f007 forces default backends. This in fact started breaking ubuntu-22.04 builds, too.
Finally, PCL complained a lot due to the removal of template instantiations around version v1.14.0; see https://github.com/PointCloudLibrary/pcl/pull/5764 and similar. As a temporary workaround, I added the compiler definition
PCL_NO_PRECOMPILE
to all builds at https://github.com/roboticslab-uc3m/vision/commit/d89754b7b8bc9333be6a01ce8b51a6fe2a196870, thus increasing compile times a lot and also raising the resulting binary size from ~2 MB to over +10 MB.Now I have noticed that *' is not a structure or union"). This was fixed in Ubuntu 24.04. I can either restrict said compiler definition to Ubuntu 24.04 onwards, or reduce significantly the supported PCL-YARP type mappings as in https://github.com/roboticslab-uc3m/vision/commit/5fe93d1f41b76d56449d5b548046814dd1c9313c.
PCL_NO_PRECOMPILE
enables a code path in Ubuntu 22.04 + Clang builds that "nobody has noticed for a decade that (...) was just totally uncompilable" (https://github.com/PointCloudLibrary/pcl/issues/5309, the error message was "member reference base type 'MatrixEntry