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

apt dependencies from Ubuntu 24.04 support #1641

Closed
traversaro opened this issue Apr 27, 2024 · 6 comments · Fixed by #1642
Closed

apt dependencies from Ubuntu 24.04 support #1641

traversaro opened this issue Apr 27, 2024 · 6 comments · Fixed by #1642

Comments

@traversaro
Copy link
Member

traversaro commented Apr 27, 2024

Ubuntu 24.04 was released: https://canonical.com/blog/canonical-releases-ubuntu-24-04-noble-numbat . We should support it. I imagine that probably we will have SWIG-related problems, as the version of swig contained in Ubuntu is known to be problematic for YARP, see #1567 and swig/swig#2796 .

@traversaro traversaro changed the title Ubuntu 24.04 support apt dependencies from Ubuntu 24.04 support Apr 27, 2024
@traversaro
Copy link
Member Author

Note that this covers installation with apt-provided dependencies. Unless 24.04 specific issue appear with conda packages (for which specific issue will be opened), I will assume that they work.

@traversaro
Copy link
Member Author

First problems by building locally:

  • There is no libgazebo-dev package for Gazebo Classic, so we need to not enable by default the ROBOTOLOGY_USES_GAZEBO option

pure python packages are failing with:

[  0%] Performing build step for 'pyngrok'
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
make[3]: *** [CMakeFiles/pyngrok.dir/build.make:85: src/pyngrok/CMakeFiles/YCMStamp/pyngrok-build] Error 1
make[2]: *** [CMakeFiles/Makefile2:2940: CMakeFiles/pyngrok.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:2947: CMakeFiles/pyngrok.dir/rule] Error 2
make: *** [Makefile:1421: pyngrok] Error 2

that is strange, as we are not installing them in a global location.

@traversaro
Copy link
Member Author

that is strange, as we are not installing them in a global location.

Ah, the problem is the pip uninstall -y pyngrok step, that indeed is acting on both global and local packages (even if pyngrok will be installed by the superbuild).

@traversaro
Copy link
Member Author

icub-main failure:

[ 29%] Building CXX object src/libraries/icubmod/embObjLib/CMakeFiles/ethResources.dir/ethParser.cpp.o
In file included from /home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:27:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:40:14: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   40 |         std::uint16_t       maxSizeRXpacket;
      |              ^~~~~~~~
      |              wint_t
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:41:14: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   41 |         std::uint16_t       maxSizeROP;
      |              ^~~~~~~~
      |              wint_t
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h: In member function ‘void eth::parser::boardProperties::reset()’:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:51:13: error: ‘maxSizeRXpacket’ was not declared in this scope
   51 |             maxSizeRXpacket = 768; maxSizeROP = 384; ipv4string = ""; ipv4addressingstring = "";
      |             ^~~~~~~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:51:36: error: ‘maxSizeROP’ was not declared in this scope
   51 |             maxSizeRXpacket = 768; maxSizeROP = 384; ipv4string = ""; ipv4addressingstring = "";
      |                                    ^~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h: At global scope:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:101:14: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
  101 |         std::uint16_t  txrate;
      |              ^~~~~~~~
      |              wint_t
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:102:14: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
  102 |         std::uint16_t rxrate;
      |              ^~~~~~~~
      |              wint_t
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h: In member function ‘void eth::parser::pc104Data::reset()’:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:107:13: error: ‘txrate’ was not declared in this scope
  107 |             txrate = 1; rxrate = 5;
      |             ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:107:25: error: ‘rxrate’ was not declared in this scope
  107 |             txrate = 1; rxrate = 5;
      |                         ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h: In member function ‘void eth::parser::pc104Data::setdefault()’:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:113:13: error: ‘txrate’ was not declared in this scope
  113 |             txrate = 1; rxrate = 5;
      |             ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.h:113:25: error: ‘rxrate’ was not declared in this scope
  113 |             txrate = 1; rxrate = 5;
      |                         ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp: In function ‘bool eth::parser::print(const pc104Data&)’:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:63:53: error: ‘const struct eth::parser::pc104Data’ has no member named ‘txrate’
   63 |     yDebug() << "PC104/PC104TXrate = " << pc104data.txrate;
      |                                                     ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:64:53: error: ‘const struct eth::parser::pc104Data’ has no member named ‘rxrate’
   64 |     yDebug() << "PC104/PC104RXrate = " << pc104data.rxrate;
      |                                                     ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp: In function ‘bool eth::parser::print(const boardData&)’:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:78:93: error: ‘const struct eth::parser::boardProperties’ has no member named ‘maxSizeRXpacket’
   78 |     yDebug() << "ETH_BOARD/ETH_BOARD_PROPERTIES/maxSizeRXpacket = " << boarddata.properties.maxSizeRXpacket;
      |                                                                                             ^~~~~~~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:79:88: error: ‘const struct eth::parser::boardProperties’ has no member named ‘maxSizeROP’
   79 |     yDebug() << "ETH_BOARD/ETH_BOARD_PROPERTIES/maxSizeROP = " << boarddata.properties.maxSizeROP;
      |                                                                                        ^~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp: In function ‘bool eth::parser::read(yarp::os::Searchable&, pc104Data&)’:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:154:23: error: ‘struct eth::parser::pc104Data’ has no member named ‘txrate’
  154 |             pc104data.txrate = value;
      |                       ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:159:113: error: ‘struct eth::parser::pc104Data’ has no member named ‘txrate’
  159 |         yWarning () << "eth::parser::read() cannot find ETH/PC104TXrate. thus using default value" << pc104data.txrate;
      |                                                                                                                 ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:168:23: error: ‘struct eth::parser::pc104Data’ has no member named ‘rxrate’
  168 |             pc104data.rxrate = value;
      |                       ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:173:113: error: ‘struct eth::parser::pc104Data’ has no member named ‘rxrate’
  173 |         yWarning () << "eth::parser::read() cannot find ETH/PC104RXrate. thus using default value" << pc104data.rxrate;
      |                                                                                                                 ^~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp: In function ‘bool eth::parser::read(yarp::os::Searchable&, boardData&)’:
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:282:30: error: ‘struct eth::parser::boardProperties’ has no member named ‘maxSizeRXpacket’
  282 |         boarddata.properties.maxSizeRXpacket = groupEthBoardProps.find("maxSizeRXpacket").asInt32();
      |                              ^~~~~~~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:287:30: error: ‘struct eth::parser::boardProperties’ has no member named ‘maxSizeRXpacket’
  287 |         boarddata.properties.maxSizeRXpacket = 768;
      |                              ^~~~~~~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:288:164: error: ‘struct eth::parser::boardProperties’ has no member named ‘maxSizeRXpacket’
  288 | :parser::read() in BOARD w/ IP" << boarddata.properties.ipv4string << "cannot find: capacityofTXpacket. using:" << boarddata.properties.maxSizeRXpacket;
      |                                                                                                                                         ^~~~~~~~~~~~~~~

/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:294:30: error: ‘struct eth::parser::boardProperties’ has no member named ‘maxSizeROP’
  294 |         boarddata.properties.maxSizeROP = groupEthBoardProps.find("maxSizeROP").asInt32();
      |                              ^~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:299:30: error: ‘struct eth::parser::boardProperties’ has no member named ‘maxSizeROP’
  299 |         boarddata.properties.maxSizeROP = 384;
      |                              ^~~~~~~~~~
/home/traversaro/robotology-superbuild/src/ICUB/src/libraries/icubmod/embObjLib/ethParser.cpp:300:156: error: ‘struct eth::parser::boardProperties’ has no member named ‘maxSizeROP’
  300 | << "eth::parser::read() in BOARD w/ IP" << boarddata.properties.ipv4string << "cannot find: maxSizeROP. using:" << boarddata.properties.maxSizeROP;
      |                                                                                                                                         ^~~~~~~~~~

make[5]: *** [src/libraries/icubmod/embObjLib/CMakeFiles/ethResources.dir/build.make:174: src/libraries/icubmod/embObjLib/CMakeFiles/ethResources.dir/ethParser.cpp.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:3194: src/libraries/icubmod/embObjLib/CMakeFiles/ethResources.dir/all] Error 2
make[3]: *** [Makefile:146: all] Error 2
make[2]: *** [CMakeFiles/ICUB.dir/build.make:85: src/ICUB/CMakeFiles/YCMStamp/ICUB-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:1326: CMakeFiles/ICUB.dir/all] Error 2
make: *** [Makefile:101: all] Error 2

a bit surprise this was never catched by conda-forge CI, but anyhow it is a simple fix (add the missing include).

@traversaro
Copy link
Member Author

New failure:

[100%] Building CXX object bindings/CMakeFiles/_icub_python.dir/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx.o
/home/traversaro/robotology-superbuild/build/src/ICUB/bindings/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx: In function ‘PyObject* _wrap_waveletIntegrand(PyObject*, PyObject*)’:
/home/traversaro/robotology-superbuild/build/src/ICUB/bindings/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx:26621:22: error: ‘waveletIntegrand’ was not declared in this scope; did you mean ‘_wrap_waveletIntegrand’?
26621 |     result = (double)waveletIntegrand(arg1,arg2);
      |                      ^~~~~~~~~~~~~~~~
      |                      _wrap_waveletIntegrand
make[2]: *** [bindings/CMakeFiles/_icub_python.dir/build.make:76: bindings/CMakeFiles/_icub_python.dir/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4786: bindings/CMakeFiles/_icub_python.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

This is a bit complicated. Basically, waveletIntegrand is a friend function of icub::ctrl::WaveletEncoder , see https://github.com/robotology/icub-main/blob/v2.5.0/src/libraries/ctrlLib/include/iCub/ctrl/functionEncoder.h#L126 . The reason why it is a friend function and not a method is that it needs to be passed to gsl in https://github.com/robotology/icub-main/blob/v2.5.0/src/libraries/ctrlLib/src/functionEncoder.cpp#L119 (I guess). For some reason, SWIG wants to wrap that function, even if it is not declared in the headers (it is directly defined in C++). I guess it is safe to simply ignore the function, that anyhow is not meant to be called by users outside of icub-main.

@traversaro
Copy link
Member Author

New failure:

[100%] Building CXX object bindings/CMakeFiles/_icub_python.dir/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx.o
/home/traversaro/robotology-superbuild/build/src/ICUB/bindings/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx: In function ‘PyObject* _wrap_waveletIntegrand(PyObject*, PyObject*)’:
/home/traversaro/robotology-superbuild/build/src/ICUB/bindings/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx:26621:22: error: ‘waveletIntegrand’ was not declared in this scope; did you mean ‘_wrap_waveletIntegrand’?
26621 |     result = (double)waveletIntegrand(arg1,arg2);
      |                      ^~~~~~~~~~~~~~~~
      |                      _wrap_waveletIntegrand
make[2]: *** [bindings/CMakeFiles/_icub_python.dir/build.make:76: bindings/CMakeFiles/_icub_python.dir/CMakeFiles/_icub_python.dir/icubPYTHON_wrap.cxx.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4786: bindings/CMakeFiles/_icub_python.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

This is a bit complicated. Basically, waveletIntegrand is a friend function of icub::ctrl::WaveletEncoder , see https://github.com/robotology/icub-main/blob/v2.5.0/src/libraries/ctrlLib/include/iCub/ctrl/functionEncoder.h#L126 . The reason why it is a friend function and not a method is that it needs to be passed to gsl in https://github.com/robotology/icub-main/blob/v2.5.0/src/libraries/ctrlLib/src/functionEncoder.cpp#L119 (I guess). For some reason, SWIG wants to wrap that function, even if it is not declared in the headers (it is directly defined in C++). I guess it is safe to simply ignore the function, that anyhow is not meant to be called by users outside of icub-main.

See swig/swig#2828 for a related SWIG issue.

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