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

Fix conda-forge GitHub Action CI by using mambaforge directly and by supporting graphviz >= 3 on Windows #3287

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

traversaro
Copy link
Collaborator

@traversaro traversaro commented Jan 12, 2023

🦟 Bug fix

Fix conda-forge CI.

Summary

The fix is composed by two unrelated changes

Fix conda-forge GitHub Action CI by using mambaforge directly

Currently the CI is failing on Linux and Windows with a weird conflict error. This is due to the fact that we are install mamba (from the conda-forge channel) on the top of miniconda3 (that by default install all the packages from the defaults channel). To make an analogy in apt world, this is like installing Debian, and then trying to install packages from the Ubuntu repo: something can go wrong.

To solve this problem, we install mambaforge (a installer like miniconda3 but already using conda-forge packages) directly, so we always and only use packages from the conda-forge channel.

Similar to:

Add support to use graphviz >= 3 on Windows

Since graphviz 3, any downstream library that on Windows links against a graphviz shared library needs to define the GVDLL preprocessor definition (see https://gitlab.com/graphviz/graphviz/-/blob/3.0.0/CHANGELOG.md#changed).

To deal with this, this PR adds the GVDLL definition for gazebo_gui when on Windows (on graphviz < 3 defining this definition will be harmless). As that prepocessor definition should not be set when linking static graphviz, and given that we can't detect in FindGraphviz if the linked graphviz is static or not, an ad-hoc CMake variable GAZEBO_FINDGRAPHVIZ_USE_STATIC_GRAPHVIZ is introduced in the case this definition needs to be disabled.

Similar to robotology/ycm-cmake-modules#414 .

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

traversaro added a commit to robotology/idyntree-yarp-tools that referenced this pull request Jan 12, 2023
Currently the CI is failing on Linux and Windows with a weird conflict error. This is due to the fact that we are install mamba (from the conda-forge channel) on the top of miniconda3 (that by default install all the packages from the defaults channel). To make an analogy in apt world, this is like installing Debian, and then trying to install packages from the Ubuntu repo: something can go wrong.

To solve this problem, we install [mambaforge](https://github.com/conda-forge/miniforge) (a installer like miniconda3 but already using conda-forge packages) directly, so we always and only use packages from the conda-forge channel. 

Similar to:
* robotology/robotology-superbuild#840
* robotology/robometry#141
* robotology/yarp-devices-ros2#44
* gazebosim/gazebo-classic#3287
@traversaro
Copy link
Collaborator Author

macOS is failing with:

FAILED: gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o 
/Users/runner/miniconda3/envs/test/bin/x86_64-apple-darwin13.4.0-clang++ -DBOOST_ALL_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBUILDING_DLL -DBUILDING_DLL_GZ_GUI -DHAVE_OPENGL -DHAVE_STRING_H -DIGN_PROFILER_ENABLE=0 -DLIBBULLET_VERSION=3.20 -DLIBBULLET_VERSION_GT_282 -DMAC_OS_X_VERSION=1080 -DQGVCORE_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQWT_DLL -DWITH_CGRAPH -Dgazebo_gui_EXPORTS -I/Users/runner/work/gazebo-classic/gazebo-classic/build/gazebo/gui/gazebo_gui_autogen/include -I/Users/runner/work/gazebo-classic/gazebo-classic/test/gtest/include -I/Users/runner/work/gazebo-classic/gazebo-classic -I/Users/runner/work/gazebo-classic/gazebo-classic/build -I/Users/runner/work/gazebo-classic/gazebo-classic/deps -I/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv -I/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private -I/Users/runner/miniconda3/envs/test/include/libusb-1.0 -I/Users/runner/miniconda3/envs/test/include/graphviz -isystem /Users/runner/miniconda3/envs/test/include/ignition/msgs5 -isystem /Users/runner/miniconda3/envs/test/include/ignition/math6 -isystem /Users/runner/miniconda3/envs/test/include/ignition/transport8 -isystem /Users/runner/miniconda3/envs/test/include/ignition/common3 -isystem /Users/runner/miniconda3/envs/test/include/ignition/fuel_tools4 -iframework /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -isystem /Users/runner/miniconda3/envs/test/include/OGRE/RTShaderSystem -isystem /Users/runner/miniconda3/envs/test/include/OGRE -isystem /Users/runner/miniconda3/envs/test/include/OGRE/OSX -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Terrain -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Paging -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Overlay -isystem /Users/runner/miniconda3/envs/test/include/sdformat-9.8 -isystem /Users/runner/miniconda3/envs/test/include/qt -isystem /Users/runner/miniconda3/envs/test/include/qt/QtCore -isystem /Users/runner/miniconda3/envs/test/./mkspecs/macx-clang -isystem /Users/runner/miniconda3/envs/test/include/sdformat-9.8/sdf/.. -isystem /Users/runner/miniconda3/envs/test/include/ignition/cmake2 -isystem /Users/runner/miniconda3/envs/test/include/qt/QtWidgets -isystem /Users/runner/miniconda3/envs/test/include/qt/QtGui -isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/runner/miniconda3/envs/test/include      -stdlib=libc++  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Wswitch-default -Wmissing-include-dirs -pedantic    -O3 -DNDEBUG -mssse3 -msse3 -msse -msse2  -isysroot /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -fPIC   -fPIC -fPIC -std=c++17 -MD -MT gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o -MF gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o.d -o gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o -c /Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.cpp
In file included from /Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.cpp:19:
/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.h:99:17: error: no member named 'putstr' in 'Agiodisc_s'
      memIoDisc.putstr = AgIoDisc.putstr;
      ~~~~~~~~~ ^
/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.h:99:35: error: no member named 'putstr' in 'Agiodisc_s'
      memIoDisc.putstr = AgIoDisc.putstr;
                         ~~~~~~~~ ^
2 errors generated.
[855/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/VariablePill.cc.o
[856/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/PlotWindow.cc.o
[857/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/VariablePillContainer.cc.o
[858/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/TopicCurveHandler.cc.o
ninja: build stopped: subcommand failed.

@traversaro
Copy link
Collaborator Author

macOS is failing with:

FAILED: gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o 
/Users/runner/miniconda3/envs/test/bin/x86_64-apple-darwin13.4.0-clang++ -DBOOST_ALL_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBUILDING_DLL -DBUILDING_DLL_GZ_GUI -DHAVE_OPENGL -DHAVE_STRING_H -DIGN_PROFILER_ENABLE=0 -DLIBBULLET_VERSION=3.20 -DLIBBULLET_VERSION_GT_282 -DMAC_OS_X_VERSION=1080 -DQGVCORE_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQWT_DLL -DWITH_CGRAPH -Dgazebo_gui_EXPORTS -I/Users/runner/work/gazebo-classic/gazebo-classic/build/gazebo/gui/gazebo_gui_autogen/include -I/Users/runner/work/gazebo-classic/gazebo-classic/test/gtest/include -I/Users/runner/work/gazebo-classic/gazebo-classic -I/Users/runner/work/gazebo-classic/gazebo-classic/build -I/Users/runner/work/gazebo-classic/gazebo-classic/deps -I/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv -I/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private -I/Users/runner/miniconda3/envs/test/include/libusb-1.0 -I/Users/runner/miniconda3/envs/test/include/graphviz -isystem /Users/runner/miniconda3/envs/test/include/ignition/msgs5 -isystem /Users/runner/miniconda3/envs/test/include/ignition/math6 -isystem /Users/runner/miniconda3/envs/test/include/ignition/transport8 -isystem /Users/runner/miniconda3/envs/test/include/ignition/common3 -isystem /Users/runner/miniconda3/envs/test/include/ignition/fuel_tools4 -iframework /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -isystem /Users/runner/miniconda3/envs/test/include/OGRE/RTShaderSystem -isystem /Users/runner/miniconda3/envs/test/include/OGRE -isystem /Users/runner/miniconda3/envs/test/include/OGRE/OSX -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Terrain -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Paging -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Overlay -isystem /Users/runner/miniconda3/envs/test/include/sdformat-9.8 -isystem /Users/runner/miniconda3/envs/test/include/qt -isystem /Users/runner/miniconda3/envs/test/include/qt/QtCore -isystem /Users/runner/miniconda3/envs/test/./mkspecs/macx-clang -isystem /Users/runner/miniconda3/envs/test/include/sdformat-9.8/sdf/.. -isystem /Users/runner/miniconda3/envs/test/include/ignition/cmake2 -isystem /Users/runner/miniconda3/envs/test/include/qt/QtWidgets -isystem /Users/runner/miniconda3/envs/test/include/qt/QtGui -isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/runner/miniconda3/envs/test/include      -stdlib=libc++  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Wswitch-default -Wmissing-include-dirs -pedantic    -O3 -DNDEBUG -mssse3 -msse3 -msse -msse2  -isysroot /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -fPIC   -fPIC -fPIC -std=c++17 -MD -MT gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o -MF gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o.d -o gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o -c /Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.cpp
In file included from /Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.cpp:19:
/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.h:99:17: error: no member named 'putstr' in 'Agiodisc_s'
      memIoDisc.putstr = AgIoDisc.putstr;
      ~~~~~~~~~ ^
/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.h:99:35: error: no member named 'putstr' in 'Agiodisc_s'
      memIoDisc.putstr = AgIoDisc.putstr;
                         ~~~~~~~~ ^
2 errors generated.
[855/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/VariablePill.cc.o
[856/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/PlotWindow.cc.o
[857/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/VariablePillContainer.cc.o
[858/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/TopicCurveHandler.cc.o
ninja: build stopped: subcommand failed.

This is because I never merged #3270 . -_-

@traversaro
Copy link
Collaborator Author

macOS is failing with:

FAILED: gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o 
/Users/runner/miniconda3/envs/test/bin/x86_64-apple-darwin13.4.0-clang++ -DBOOST_ALL_NO_LIB -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_IOSTREAMS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBUILDING_DLL -DBUILDING_DLL_GZ_GUI -DHAVE_OPENGL -DHAVE_STRING_H -DIGN_PROFILER_ENABLE=0 -DLIBBULLET_VERSION=3.20 -DLIBBULLET_VERSION_GT_282 -DMAC_OS_X_VERSION=1080 -DQGVCORE_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQWT_DLL -DWITH_CGRAPH -Dgazebo_gui_EXPORTS -I/Users/runner/work/gazebo-classic/gazebo-classic/build/gazebo/gui/gazebo_gui_autogen/include -I/Users/runner/work/gazebo-classic/gazebo-classic/test/gtest/include -I/Users/runner/work/gazebo-classic/gazebo-classic -I/Users/runner/work/gazebo-classic/gazebo-classic/build -I/Users/runner/work/gazebo-classic/gazebo-classic/deps -I/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv -I/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private -I/Users/runner/miniconda3/envs/test/include/libusb-1.0 -I/Users/runner/miniconda3/envs/test/include/graphviz -isystem /Users/runner/miniconda3/envs/test/include/ignition/msgs5 -isystem /Users/runner/miniconda3/envs/test/include/ignition/math6 -isystem /Users/runner/miniconda3/envs/test/include/ignition/transport8 -isystem /Users/runner/miniconda3/envs/test/include/ignition/common3 -isystem /Users/runner/miniconda3/envs/test/include/ignition/fuel_tools4 -iframework /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -isystem /Users/runner/miniconda3/envs/test/include/OGRE/RTShaderSystem -isystem /Users/runner/miniconda3/envs/test/include/OGRE -isystem /Users/runner/miniconda3/envs/test/include/OGRE/OSX -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Terrain -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Paging -isystem /Users/runner/miniconda3/envs/test/include/OGRE/Overlay -isystem /Users/runner/miniconda3/envs/test/include/sdformat-9.8 -isystem /Users/runner/miniconda3/envs/test/include/qt -isystem /Users/runner/miniconda3/envs/test/include/qt/QtCore -isystem /Users/runner/miniconda3/envs/test/./mkspecs/macx-clang -isystem /Users/runner/miniconda3/envs/test/include/sdformat-9.8/sdf/.. -isystem /Users/runner/miniconda3/envs/test/include/ignition/cmake2 -isystem /Users/runner/miniconda3/envs/test/include/qt/QtWidgets -isystem /Users/runner/miniconda3/envs/test/include/qt/QtGui -isystem /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem /Users/runner/miniconda3/envs/test/include      -stdlib=libc++  -Wall -Wextra -Wno-long-long -Wno-unused-value -Wfloat-equal -Wshadow -Wswitch-default -Wmissing-include-dirs -pedantic    -O3 -DNDEBUG -mssse3 -msse3 -msse -msse2  -isysroot /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -fPIC   -fPIC -fPIC -std=c++17 -MD -MT gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o -MF gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o.d -o gazebo/gui/CMakeFiles/gazebo_gui.dir/qgv/private/QGVCore.cpp.o -c /Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.cpp
In file included from /Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.cpp:19:
/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.h:99:17: error: no member named 'putstr' in 'Agiodisc_s'
      memIoDisc.putstr = AgIoDisc.putstr;
      ~~~~~~~~~ ^
/Users/runner/work/gazebo-classic/gazebo-classic/gazebo/gui/qgv/private/QGVCore.h:99:35: error: no member named 'putstr' in 'Agiodisc_s'
      memIoDisc.putstr = AgIoDisc.putstr;
                         ~~~~~~~~ ^
2 errors generated.
[855/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/VariablePill.cc.o
[856/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/PlotWindow.cc.o
[857/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/VariablePillContainer.cc.o
[858/1158] Building CXX object gazebo/gui/CMakeFiles/gazebo_gui.dir/plot/TopicCurveHandler.cc.o
ninja: build stopped: subcommand failed.

This is because I never merged #3270 . -_-

Actually, the problem is that for some reason on macos graphviz 4 is installed, while graphviz 7 is available.

@traversaro
Copy link
Collaborator Author

This is because I never merged #3270 . -_-

Actually, the problem is that for some reason on macos graphviz 4 is installed, while graphviz 7 is available.

But in the end this was due to #3270, so rebasing on top of gazebo11 .

@traversaro traversaro changed the title Fix conda-forge GitHub Action CI by using mambaforge directly Fix conda-forge GitHub Action CI Jan 23, 2023
@traversaro traversaro changed the title Fix conda-forge GitHub Action CI Fix conda-forge GitHub Action CI by using mambaforge directly and by supporting graphviz >= 3 on Windows Jan 23, 2023
@traversaro
Copy link
Collaborator Author

traversaro commented Jan 26, 2023

All conda-forge CI related jobs are now working fine. @scpeters @j-rivero feel free to review, I am not sure about the CI failures but they do not seem related, as they also seem to appear in #3290 .

Copy link
Member

@scpeters scpeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! feel free to merge

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

Successfully merging this pull request may close these issues.

2 participants