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

Add pixi support in the robotology-superbuild #1683

Merged
merged 5 commits into from
Aug 10, 2024
Merged

Add pixi support in the robotology-superbuild #1683

merged 5 commits into from
Aug 10, 2024

Conversation

traversaro
Copy link
Member

As I frequently need to debug problems in the superbuild, the process of manually creating the conda environment to build a fresh superbuild was quite a slow down. Furthermore, whenever there is a dependency regression, the need to manually inspect the CI log is not really user friendly.

In this PR, we add the pixi.toml support to the superbuild, so you can just download the superbuild and run pixi run build-all to build the superbuild with all the options enabled. This is personally quite useful for me to work on the superbuild, but I guess it may be useful for other superbuild users. It has also the nice byproduct of ensuring that each release has a working lockfile of dependencies that work fine for a given release, quite useful if someone needs to get older releases of the superbuild to work.

At the moment, I am not modifying the existing conda instructions to avoid confusing existing users, but with time we could modify them as well (for example, we could generate conda lock files with https://github.com/synapticarbors/pixi2ces or similar, and use the lockfiles also when users are installing dependencies via conda.

@traversaro
Copy link
Member Author

Agh, the CI is failing with:

CMake Error at .build/_deps/ycm-src/modules/YCMEPHelper.cmake:326 (message):
  Failed to get git name.  Please set it with "git config --global user.name
  Firstname Lastname" or from your favorite git gui.
Call Stack (most recent call first):
  .build/_deps/ycm-src/modules/YCMEPHelper.cmake:1021 (_ycm_setup_git)
  cmake/BuildYCM.cmake:8 (ycm_ep_helper)
  .build/_deps/ycm-src/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/BuildYARP.cmake:8 (find_or_build_package)
  .build/_deps/ycm-src/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/RobotologySuperbuildLogic.cmake:68 (find_or_build_package)
  CMakeLists.txt:68 (include)

I can't remember how many times in my life I saw this and had to deal with it, either adding the NON_INTERACTIVE_BUILD option or setting those values, even if the value was actually never used. For now I just added a workaround in the CI, but I think we should finally fix this.

@traversaro
Copy link
Member Author

Agh, the CI is failing with:

CMake Error at .build/_deps/ycm-src/modules/YCMEPHelper.cmake:326 (message):
  Failed to get git name.  Please set it with "git config --global user.name
  Firstname Lastname" or from your favorite git gui.
Call Stack (most recent call first):
  .build/_deps/ycm-src/modules/YCMEPHelper.cmake:1021 (_ycm_setup_git)
  cmake/BuildYCM.cmake:8 (ycm_ep_helper)
  .build/_deps/ycm-src/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/BuildYARP.cmake:8 (find_or_build_package)
  .build/_deps/ycm-src/modules/FindOrBuildPackage.cmake:205 (include)
  cmake/RobotologySuperbuildLogic.cmake:68 (find_or_build_package)
  CMakeLists.txt:68 (include)

I can't remember how many times in my life I saw this and had to deal with it, either adding the NON_INTERACTIVE_BUILD option or setting those values, even if the value was actually never used. For now I just added a workaround in the CI, but I think we should finally fix this.

Related issue: robotology/ycm-cmake-modules#455 .

@traversaro
Copy link
Member Author

macos-14 builds fail with:

 CMake Error at /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake:258 (message):
  To use a cross-compiled Qt, please set the QT_HOST_PATH cache variable to
  the location of your host Qt installation.
Call Stack (most recent call first):
  /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/lib/cmake/Qt6/Qt6Dependencies.cmake:10 (_qt_internal_setup_qt_host_path)
  /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/lib/cmake/Qt6/Qt6Config.cmake:124 (include)
  /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/lib/cmake/vtk-9.3/VTK-vtk-module-find-packages.cmake:1196 (find_package)
  /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/lib/cmake/vtk-9.3/vtk-config.cmake:159 (include)
  /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/share/pcl-1.14/PCLConfig.cmake:267 (find_package)
  /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/share/pcl-1.14/PCLConfig.cmake:316 (find_VTK)
  /Users/runner/work/robotology-superbuild/robotology-superbuild/.pixi/envs/default/share/pcl-1.14/PCLConfig.cmake:556 (find_external_library)
  cmake/YarpFindDependencies.cmake:378 (find_package)
  CMakeLists.txt:60 (include)

this is basically due to conda-forge/qt-main-feedstock#273 . I can manually add a local workaround for now.

@traversaro
Copy link
Member Author

Merging as soon as CI passes as it is middle of August in a weekend, so hardly anyone could look into that. Furthermore, this just adds a workflow, it does not modify an existing one.

@traversaro traversaro merged commit 585829c into master Aug 10, 2024
29 checks passed
@traversaro traversaro deleted the addpixi branch August 10, 2024 16:19
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.

1 participant