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

Build issues on Ubuntu 24.04 (Noble) #112

Closed
PeterBowman opened this issue Oct 14, 2024 · 1 comment
Closed

Build issues on Ubuntu 24.04 (Noble) #112

PeterBowman opened this issue Oct 14, 2024 · 1 comment
Assignees

Comments

@PeterBowman
Copy link
Member

PeterBowman commented Oct 14, 2024

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 b969a83.

Then, it turned out SWIG 4.2.0, as packaged by apt, is not compatible with YARP bindings, see robotology/yarp#3083. I decided to clone and build SWIG 4.2.1 from sources, see roboticslab-uc3m/speech@3f752d5. 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 either apt remove swig first, or shadow the system-installed swig executable with a swig4.0 symbolic link pointing at the locally compiled 4.2.1 version (sadly, FindSWIG.cmake does not cope well with plain swig; it gives more precedence to swig4.0, but this symlink is not generated by CMake during the build).

Commit 1618f18 builds SWIG in our Docker images (in Ubuntu 24.04, distutils is hosted by the python3-setuptools apt package; see c4653b1).

Next, I noticed that OpenCV's DNN module fails fast if the requested CPU/GPU is not found on the runner's environment. Commit 6044389 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 PointCloudLibrary/pcl#5764 and similar. As a temporary workaround, I added the compiler definition PCL_NO_PRECOMPILE to all builds at d89754b, 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 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" (PointCloudLibrary/pcl#5309, the error message was "member reference base type 'MatrixEntry *' 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 5fe93d1.

@PeterBowman
Copy link
Member Author

PeterBowman commented Oct 17, 2024

Done at 1dac858. Commit 2b92820 introduces specific type specializations for the MLS algorithm.

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