ami-iit / bipedal-locomotion-framework

Suite of libraries for achieving bipedal locomotion on humanoid robots
https://ami-iit.github.io/bipedal-locomotion-framework/
BSD 3-Clause "New" or "Revised" License
147 stars 38 forks source link

Use conda-forge's catch2 in CI to avoid build failures, set OMP_NUM_THREADS=1 and updated catch2's used by FetchContent to 3.7.1 #884

Closed traversaro closed 2 weeks ago

traversaro commented 3 weeks ago

Fix the build error:

[82/462] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o
FAILED: _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o 
/usr/share/miniconda3/envs/test/bin/x86_64-conda-linux-gnu-c++ -Dcasadi_VERSION=3.6.6 -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/.. -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/generated-includes -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/share/miniconda3/envs/test/include -O3 -DNDEBUG -std=c++17 -fPIC -ffile-prefix-map=/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src=. -MD -MT _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o -MF _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o.d -o _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_clara.cpp.o -c /home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/internal/catch_clara.cpp
In file included from /home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/internal/catch_clara.cpp:12:
/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/../catch2/internal/catch_string_manip.hpp:47:14: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
   47 |         std::uint64_t m_count;
      |              ^~~~~~~~
      |              wint_t
/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/../catch2/internal/catch_string_manip.hpp:51:42: error: expected ')' before 'count'
   51 |         constexpr pluralise(std::uint64_t count, StringRef label):
      |                            ~             ^~~~~~
      |                                          )
[83/462] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_source_line_info.cpp.o
[84/462] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_case_insensitive_comparisons.cpp.o
FAILED: _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_case_insensitive_comparisons.cpp.o 
/usr/share/miniconda3/envs/test/bin/x86_64-conda-linux-gnu-c++ -Dcasadi_VERSION=3.6.6 -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/.. -I/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/generated-includes -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/share/miniconda3/envs/test/include -O3 -DNDEBUG -std=c++17 -fPIC -ffile-prefix-map=/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src=. -MD -MT _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_case_insensitive_comparisons.cpp.o -MF _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_case_insensitive_comparisons.cpp.o.d -o _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_case_insensitive_comparisons.cpp.o -c /home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/internal/catch_case_insensitive_comparisons.cpp
In file included from /home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/internal/catch_case_insensitive_comparisons.cpp:10:
/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/../catch2/internal/catch_string_manip.hpp:47:14: error: 'uint64_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
   47 |         std::uint64_t m_count;
      |              ^~~~~~~~
      |              wint_t
/home/runner/work/bipedal-locomotion-framework/bipedal-locomotion-framework/build/_deps/catch2-src/src/catch2/../catch2/internal/catch_string_manip.hpp:51:42: error: expected ')' before 'count'
   51 |         constexpr pluralise(std::uint64_t count, StringRef label):
      |                            ~             ^~~~~~
      |                                          )
[85/462] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/catch_config.cpp.o
[86/462] Building CXX object src/RobotInterface/YarpImplementation/CMakeFiles/RobotInterfaceYarpImplementation.dir/src/YarpSensorBridge.cpp.o
[87/462] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/internal/catch_commandline.cpp.o
ninja: build stopped: subcommand failed.
traversaro commented 3 weeks ago

(Disabling changelog as this is a CI-only change, nothing that affects the library as consumed by downstream users)

traversaro commented 3 weeks ago

I do not think this is necessary anymore since https://github.com/conda-forge/mumps-feedstock/pull/126 .

traversaro commented 3 weeks ago

I do not think this is necessary anymore since conda-forge/mumps-feedstock#126 .

Actually the OMP_NUM_THREADS=1 is not necessary anymore, but the catch2 one is still necessary.

traversaro commented 3 weeks ago

I do not think this is necessary anymore since conda-forge/mumps-feedstock#126 .

Actually the OMP_NUM_THREADS=1 is not necessary anymore, but the catch2 one is still necessary.

Somehow the old versions gets still installed, let's add back the workaround.

traversaro commented 3 weeks ago

I also bumped the Catch2 version used by FetchContent to minimize the chance that similar failure occur downstream.

traversaro commented 2 weeks ago

The CI failures are due go gh-pages and changelog, noting related to the actual PR.