Add SOFA recipe - #23085
Conversation
|
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
|
Here a new pass for the recipe, hopefully making it acceptable. I simplified the PR as it was huge and still has a long history. Now, the PR only concerns Another motivation to remove other recipes from here is the global build graph computation from As the multi-ouput cache CEP is still in progress, I rewrote the recipe as a simple multi-output recipe, without cache so no experimental features from rattler-build. Drawbacks are:
We should be able to solve that when cache feature will be available. To summarize, this PR for the unique
Also, version of SOFA has been bumped to latest release v25.06. @carterbox @xhochy This is ready for a new review. Many thanks ! |
| - cxxopts | ||
| - gtest | ||
| run: | ||
| - zlib |
There was a problem hiding this comment.
If this is required for find_package(SOFA) to succeed, perhaps it should be in sofa-devel ?
There was a problem hiding this comment.
You are right. It should not be there, and it should not be necessary in sofa-devel if I understood correctly as it defines some run-exports.
| - extlibs/difflib/LICENSE.MIT | ||
| - extlibs/json/LICENSE.MIT | ||
| - extlibs/stb/LICENSE.MIT |
There was a problem hiding this comment.
I think this is fine, but can you explain why can't this be unvendored? Except for stb that I already know why.
There was a problem hiding this comment.
Initially, there was many vendored software in SOFA. I've pushed the devs to use external dependencies as much as possible, but some cases such as header-only were not priorized.
And among these three, json (nlohmann_json to be precise here), can indeed be unvendored. I've added a patch to the recipe for this and the corresponding PR for the next SOFA release can be found here sofa-framework/sofa#5775.
For difflib, it might not be clear but here we are dealing with https://github.com/duckie/difflib (and not the python package), which I believe to not be available on conda-forge and as it is unmaintened for 11 years, we probably do not want to add it neither.
| - Sofa.Core/sofa/core/init.h | ||
| files: | ||
| - ${{ "Library/" if win }}lib/cmake/Sofa.Core/Sofa.CoreConfig.cmake | ||
| - ${{ "Library/" if win }}lib/cmake/Sofa.Core/Sofa.CoreConfigVersion.cmake |
There was a problem hiding this comment.
Not necessary, but if you want to ensure that the find_package(Sofa.Core) or similar works fine and check if some targets exists, you can also use https://github.com/ami-iit/cmake-package-check .
There was a problem hiding this comment.
Thanks for the tool, that was actually missing and such cmake minimalist test programs were needed to be written manually (which was not done here). I've included it and thanks to it could easily fix missing run dependencies.
| - if: win | ||
| then: ninja | ||
| - if: linux | ||
| then: ${{ cdt('mesa-libgl-devel') }} |
There was a problem hiding this comment.
The use of CDT for GL packages is now superseded, you can just depend on libgl-devel as a normal host package, and everything should work fine.
There was a problem hiding this comment.
Oh I've misunderstood that, thanks, that is now clear. Fixed.
|
Many thanks @traversaro for your review ! All requested changes should have been made now, this is ready for another round or merging ! |
|
Thanks @olivier-roussel ! Can I rebase and squash, or you prefer to curate the commit yourself? |
|
@traversaro Sure feel free to rebase & squash as you wish. Thanks again for your help, this PR was lasting for too long (more than 2 years) and involved so much energy. |
|
sorry, I see that there is a still an unresolved review from @carterbox , can you find his comments so we can check if we address them? I can't find them at the moment. |
|
Indeed the github interface is not very helpful to find out where exactly are the requested changes mentioned in the "change requested" summary. To my understanding, @carterbox requested changes twice, and this should concern his second review ( #23085 (review) ). |
Thanks for the link. This review indeed seems solved, by creating the |
|
That's great, thanks again ! |
|
Hi @traversaro, as we had no feedback could this be merged ? |
|
Ok! |
* Init recipe for Sofa (no plugins) on Linux targets only. * Add SoftRobot and Cosserat plugins. * Add patch for cmake_find_root_path & some plugins. * Add sofa python plugin. * Split plugins to separate packages. * Fix dependencies. * Fix cmake option for testing MOR plugin. * Add sofa-python3 as dependency for sofa-modelorderreduction (for python bindings). * Add sofa-python3 and sofa-stlib as dependency for sofa-softrobots. * Add testings for sofa packages recipes. * Homogenize cmake options. * Add missing sofa packages recipes tests. * Fix linter. * Add Python find cmake options for plugins with python bindings. * Fix indentation for linter. * Enable Win and OSX builds. * Add Win build scripts. * Fix recipe for non-linux builds. * Disable clang-cl for windows build (unsupported by Sofa). * Fix modern C++ for Darwin OSX. * Fix broken install of Sofa when not using the Windows Dependency Package. * Update new repository name for Cosserat plugin. * Clean CMake arguments. * Fix unnecessary run dependencies due to run-exports. * Fix invalid installation path for some dll on Windows. * Missing UCRT run dependency & fix tests on Windows. * Extend tests. * Fix indentation for readability. * Fix Windows recipe tests. * Fix Windows broken install due to necessary copy of plugin dlls. * Homogenize sofa-python3 windows build script. * Enable python 3.8 for sofa-python3. * Update source archive sha256 as release updated. * Remove WinDepPack as it break Windows install. * Fixing sofa-python3 overlinking error for python. * Homogenize Windows build script. * Remove clang for Windows as not supported by Sofa yet. * Remove beamadapter plugin for now. * Remove modelorderreduction plugin for now. * Remove softrobots plugin for now. * Remove stlib plugin for now. * Remove cosserat plugin for now. * Add temp debugging tools. * Add numpy dependency for sofa-python3. * Fix cmake python args for sofa-python3 on Windows. * Fix cmake python args for sofa-python3 on Windows. * Fix cmake python args for sofa-python3. * Add hugtalbot to maintainers list. * Fix cmake python args for sofa-python3. * Fix cmake python args for sofa-python3. * Add sofa recipe doc for windeppack patch. * Add patch to fix invalid python version use in cmake for sofa-python3. * Fix cmake python args for sofa-python3. * Trying with to get host path through CONDA_PREFIX var. * Force python to be installed on build_env. * Revert "Force python to be installed on build_env." This reverts commit eff6f88. * Fix cmake python args. * Fix linter. * Revert patch to force python version. * Clear debugging output. * Homogenize build scripts. * Add missing lbqglviewer dependency. * Use PREFIX and not CONDA_PREFIX in Unix builds for host env. * Use PREFIX and not CONDA_PREFIX in Unix builds for host env. * Remove ucrt dependency for Windows. * Fix indent. * Restore beamadapter package. * Restore modelorderreduction package. * Restore coesserat package. * Restore softrobot package. * Restore stlib package. * Fix indent. * Bump to v23.06 release. * Skip macOS build for now as v23.06 release not available on macOS yet. * Add missing dependency libqglviewer. * Add zlib dependency for SofaPython3 & recipe tests. * Add activation scripts to set SOFA_ROOT env var at SOFA install. * Cosms. * Fix sofa-python3 installation of Python packages on Linux. * Fix sofa-python3 recipe tests on Windows. * Add zlib dependency for sofa-cosserat build. * Add zlib dependency for sofa-modelorderreduction build. * Update sofa-softrobots sha256 due to fixed release archive. * Add zlib dependency for sofa-softrobots build. * Fix sofa-cosserat recipe tests for Unix. * Add python imports recipe test to sofa-python3. * Fix sofa-python3 site-package installation path on Windows. * Fix sofa-python3 activations scripts on Windows for SOFA_ROOT and SOFAPYTHON3_ROOT. * Add recipe tests for sofa-stlib. * Add sofa-softrobots recipe tests. * Fix sofa-modelorderreduction python packages. * Add sofa-modelorderreduction recipe tests. * Fix sofa-cosserat python packages. * Fix sofa-modelorderreduction python packages. * Sofa-python3 cosms. * SOFA recipe patch reference PR. * Add sofa-beamadapter recipe tests. * Add sofa-softrobots python import test. * Add sofa-cosserat python import test. * Add mesa-libGL in yum_requirements for sofa-cosserat to pass python tests. * Enable unit tests. * Enable internal plugin CollisionOBBCapsule. * Fix sofa-modelorderreduction RPATH to link with sofa internal plugin CollisionOBBCapsule. * Update sha256. * Add missing run dependencies * Split specific SOFA python env variables. * Add licenses for embedded header-only external projects. * split outputs * fixing outputs files glob * Use scripts to glob files to avoid rebuild of outputs. * Fix multiple output dependencies and add metis * move all packages to new package architecture * Fix linter * add tinyxml externalization patch from 23.12 * add metis externalization patch from 23.12 * Fix stlib temporary sources * Make SoftRobots as host dependency of Cosserat plugin * Fix sofa-cosserat dep & disable unit tests * Fix sofa recipe tests on OSX * Remove duplicate build of Sofa.GUI.Common * Delete depreacted patches * Fix typo in osx recipe tests * Update sofa-core recipe on windows to v2 * Enable sofa build on windows * Add build scripts files for sofa-gl and sofa-gui-qt on windows * remove patch for tinyxml (PR merged) * Build scripts for sofa core on windows * Fix sofa core installer on windows * Fix sofa-core intall on windows * Ensure only sofa cmake files are installed * Comments * Switch sofa-python3 to 23.12 release branch * add missing dependencies for sofa-gui-qt on windows * build and install scripts cleaning * Fix disable TU for softrobots * re-enable macos build * fix typo * allow metis 5.2.1 * Revert "allow metis 5.2.1" This reverts commit 9486797. * add patch for fix findmetis and try forced version of metis >=5.2.1 * metis 5.2.1 breaks win build so revert to forced 5.1.0 * set licenses per sofa core output * add a global license for the metapackage * fix activation scripts install * add sofa-gui-qt as a dependency of sofa-app * fix sofa python3 activation script on windows * fix typo in windows install scripts * update patch to avoid linking with libpython on macOS * remove debug messages * update sha256 * update to patched release 23.12 * bump to sofa patched release 23.12.01 * sofapython3 also build sofa-gui-qt and sofa-gl python bindings * bump to softrobots new release * bump to v23.12.01 * fix invalid sofapython3 archive url * fix sofa-python3 qglviewer broken patch * re-add cosserat patch as PR not backported in 23.12 release * Replace sofapython3 multiple-commits patch by single-commit one * remove deprecated patches * fix sofa-gl package dependency to libsofa-core-devel * remove deprecated patches * add (redundant) libsofa-core dep to satisfy overlinking * add (redundant) libsofa-core dep to satisfy overlinking to runSoda output * REF: Rename sofa core packages libsofa-core has more than just libsofa.core, so it shouldn't be named libsofa-core because this would prevent splitting this package into more outputs in the future. * BLD: Fixup intrarecipe depdencies * REF: Remove redundant run deps for eigen and libboost-devel * REF: Remove depdendency on libboost-devel since links detector reports unused * BLD: Add stdlib('c') template * BUG: Add missing channel pinnings * BUG: sofa-gl needs boost-headers * BUG: Use libboost-headers instead of devel everywhere * Move eigen & cxxopts as runtime deps for libsofa-devel package * bump to v24.06 * fix boost dependency * switch sofa recipes to new format * enable rattler-build experimental mode (for global cache) * Refactor recipes without experimental feature multi-output cache & bump to v25.06 release * Revert "enable rattler-build experimental mode (for global cache)" This reverts commit 2c06168. * fix lint * fix lint * try to fix wrong version jinja interp * reduce scope of built recipes as global solver fails * remove all other recipes than sofa * fix win build scripts * apply review remarks * patch to use external nlohmann json * use cmake-package-check tool & fix run dependencies * add missing zlib run dep for sofa-devel --------- Co-authored-by: Daniel Ching <carterbox@users.noreply.github.com>
Checklist
url) rather than a repo (e.g.git_url) is used in your recipe (see here for more details).EDIT on 22th october 2025:
This PR proposes a conda package sofa, containing the core of SOFA framework, which is a real-time multi-physics simulation with an emphasis on medical simulation (C++). This package contains runtime and development libraries of SOFA core, following the given outputs:
The following recipes have been moved out from this PR and will be submitted in dedicated PRs once this one merged. See #23085 (comment)