yarp
yarp copied to clipboard
Failure to compile Octave bindings with Ubuntu 22.04
From https://github.com/robotology/yarp/pull/3020
Swig compiler shipped by default with Ubuntu 22.04, i.e. Version 4.0.2, seems to fail to generate Yarp bindings for Octave 6.0 with the following errors:
95%] Building CXX object bindings/octave/CMakeFiles/yarp_octave.dir/CMakeFiles/yarp_octave.dir/yarpOCTAVE_wrap.cxx.o
CMakeFiles/yarp_octave.dir/yarpOCTAVE_wrap.cxx:1769:31: error: ‘oct_mach_info’ has not been declared
1769 | oct_mach_info::float_format fmt) {
| ^~~~~~~~~~~~~
CMakeFiles/yarp_octave.dir/yarpOCTAVE_wrap.cxx:1769:59: error: expected ‘,’ or ‘...’ before ‘fmt’
1769 | oct_mach_info::float_format fmt) {
| ^~~
We should try to upgrade Swig to version 4.1.0, as mentioned here: https://packages.ubuntu.com/jammy/swig https://sourceforge.net/p/swig/news/2022/10/swig-410-released/ https://savannah.gnu.org/bugs/?59422 https://superuser.com/questions/1756802/how-to-install-swig-version-4-1-0-on-ubuntu-22-04-dockerfile