Skip to content

Add spot-cpp-sdk - #32887

Merged
traversaro merged 54 commits into
conda-forge:mainfrom
diegoferigo:diegoferigo/spot-cpp-sdk
Apr 9, 2026
Merged

Add spot-cpp-sdk#32887
traversaro merged 54 commits into
conda-forge:mainfrom
diegoferigo:diegoferigo/spot-cpp-sdk

Conversation

@diegoferigo

@diegoferigo diegoferigo commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Project repo: https://github.com/boston-dynamics/spot-cpp-sdk
Develop applications and payloads for Spot using the Boston Dynamics Spot C++ SDK.

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@conda-forge-admin

Copy link
Copy Markdown
Contributor

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 (recipes/spot-cpp-sdk/recipe.yaml) and found it was in an excellent condition.

@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Hi! This is the staged-recipes linter and your PR looks excellent! 🚀

@diegoferigo

diegoferigo commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

The cmake-package-check is currently failing on linux due to:

 │ CMake Error at $SRC_DIR_run_env/share/cmake-4.3/Modules/CMakeFindDependencyMacro.cmake:93 (find_package):
 │   Could not find a package configuration file provided by "Eigen3" with any
 │   of the following names:
 │     Eigen3.cps
 │     eigen3.cps
 │     Eigen3Config.cmake
 │     eigen3-config.cmake
 │   Add the installation prefix of "Eigen3" to CMAKE_PREFIX_PATH or set
 │   "Eigen3_DIR" to a directory containing one of the above files.  If "Eigen3"
 │   provides a separate development package or SDK, be sure it has been
 │   installed.
 │ Call Stack (most recent call first):
 │   $SRC_DIR_run_env/share/cmake-4.3/Modules/CMakeFindDependencyMacro.cmake:125 (__find_dependency_common)
 │   $SRC_DIR_run_env/lib/cmake/bosdyn/bosdynConfig.cmake:33 (find_dependency)
 │   CMakeLists.txt:5 (find_package)
 │ -- Configuring incomplete, errors occurred!
 │ Error occurred: Command '['cmake', '-GNinja', '-S.', '-B.']' returned non-zero exit status 1.

I guess I need to add a run eigen dependency in addition to the abi package.

Note that this package is case B. If the library contained in the recipe includes Eigen headers (either directly or indirectly) in public headers and it has not a *-devel output from:

https://github.com/conda-forge/eigen-feedstock/blob/main/recipe/README.md#b-if-the-library-contained-in-the-recipe-includes-eigen-headers-either-directly-or-indirectly-in-public-headers-and-it-has-not-a--devel-output

@diegoferigo

Copy link
Copy Markdown
Contributor Author

Looping @traversaro in for an early feedback on how to handle eigen here. I'd like to merge this with eigen<5 first.

@traversaro

Copy link
Copy Markdown
Contributor

Given that this is a new package, if you want to make sure that find_package works out of the box I would consider to add -devel output, and adds the eigen dependency to it.

@diegoferigo

Copy link
Copy Markdown
Contributor Author

Windows is currently failing due to the following error

2026-04-08T11:34:36.0873801Z  │ │ [706/767] Building CXX object CMakeFiles\bosdyn_client_static.dir\bosdyn\client\sdk\client_sdk_include_clients.cpp.obj
2026-04-08T11:34:36.1765848Z  │ │ FAILED: [code=2] CMakeFiles/bosdyn_client_static.dir/bosdyn/client/sdk/client_sdk_include_clients.cpp.obj 
2026-04-08T11:34:36.7548391Z  │ │ C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1444~1.352\bin\Hostx64\x64\cl.exe  /nologo /TP -DABSL_CONSUME_DLL -DGPR_DLL_IMPORTS -DGRPCXX_DLL_IMPORTS -DGRPC_DLL_IMPORTS -DPROTOBUF_USE_DLLS -I%SRC_DIR%\cpp -I%SRC_DIR%\build\protos -external:I%PREFIX%\Library\include -external:I%PREFIX%\Library\include\eigen3 -external:W0 /DNOMINMAX /wd4267 /wd4996 /WX- /MD /O2 /Ob2 /DNDEBUG -std:c++17 /showIncludes /FoCMakeFiles\bosdyn_client_static.dir\bosdyn\client\sdk\client_sdk_include_clients.cpp.obj /FdCMakeFiles\bosdyn_client_static.dir\bosdyn_client_static.pdb /FS -c %SRC_DIR%\cpp\bosdyn\client\sdk\client_sdk_include_clients.cpp
2026-04-08T11:34:37.1403852Z  │ │ C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\ppltasks.h(1580): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
2026-04-08T11:34:37.2518243Z  │ │ %SRC_DIR%\build\protos\bosdyn/api/spot/choreography_sequence.pb.h(15896): error C2143: syntax error: missing ')' before 'constant'
2026-04-08T11:34:37.3325975Z  │ │ %SRC_DIR%\build\protos\bosdyn/api/spot/choreography_sequence.pb.h(15896): error C2143: syntax error: missing ';' before 'constant'
2026-04-08T11:34:37.4436584Z  │ │ %SRC_DIR%\build\protos\bosdyn/api/spot/choreography_sequence.pb.h(15896): error C2789: 'bosdyn::api::spot::ChoreographyStatusResponse::DWORD': an object of const-qualified type must be initialized
2026-04-08T11:34:37.5248767Z  │ │ %SRC_DIR%\build\protos\bosdyn/api/spot/choreography_sequence.pb.h(15896): note: see declaration of 'bosdyn::api::spot::ChoreographyStatusResponse::DWORD'
2026-04-08T11:34:37.6378906Z  │ │ %SRC_DIR%\build\protos\bosdyn/api/spot/choreography_sequence.pb.h(15896): error C2059: syntax error: ')'
2026-04-08T11:34:37.7164522Z  │ │ %SRC_DIR%\build\protos\bosdyn/api/spot/choreography_sequence.pb.h(15896): error C2238: unexpected token(s) preceding ';'
2026-04-08T11:34:41.7620208Z  │ │ [707/767] Building CXX object CMakeFiles\bosdyn_client_static.dir\bosdyn\client\spot_cam\audio\audio_client.cpp.obj
2026-04-08T11:34:41.7622200Z  │ │ C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\ppltasks.h(1580): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
2026-04-08T11:34:43.8564172Z  │ │ [708/767] Building CXX object CMakeFiles\bosdyn_client_static.dir\bosdyn\client\spot_cam\compositor\compositor_client.cpp.obj
2026-04-08T11:34:43.8566118Z  │ │ C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\include\ppltasks.h(1580): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
2026-04-08T11:34:43.8569213Z  │ │ ninja: build stopped: subcommand failed.
2026-04-08T11:34:43.8658269Z  │ │ (base) %SRC_DIR%>if 2 NEQ 0 exit /b 2 
2026-04-08T11:34:43.8715681Z  │ │ × error Script failed with status 2
2026-04-08T11:34:43.8716813Z  │ │ × error 
2026-04-08T11:34:43.8717531Z  │ │ × error Script execution failed.
2026-04-08T11:34:43.8718079Z  │ │ × error 
2026-04-08T11:34:43.8718821Z  │ │ × error   Work directory: D:\bld\bld\rattler-build_spot-cpp-sdk_1775646661\work
2026-04-08T11:34:43.8719572Z  │ │ × error   Prefix: D:\bld\bld\rattler-build_spot-cpp-sdk_1775646661\h_env
2026-04-08T11:34:43.8720256Z  │ │ × error   Build prefix: D:\bld\bld\rattler-build_spot-cpp-sdk_1775646661\build_env
2026-04-08T11:34:43.8720892Z  │ │ × error 
2026-04-08T11:34:43.8721429Z  │ │ × error To run the script manually, use the following command:
2026-04-08T11:34:43.8722339Z  │ │ × error   cd "D:\\bld\\bld\\rattler-build_spot-cpp-sdk_1775646661\\work" && ./conda_build.bat
2026-04-08T11:34:43.8723318Z  │ │ × error 
2026-04-08T11:34:43.8724052Z  │ │ × error To run commands interactively in the build environment:
2026-04-08T11:34:43.8724780Z  │ │ × error   cd "D:\\bld\\bld\\rattler-build_spot-cpp-sdk_1775646661\\work" && call build_env.bat
2026-04-08T11:34:43.8725443Z  │ │
2026-04-08T11:34:43.8726071Z  │ ╰─────────────────── (took 23 minutes)

I have no idea how to fix this, trying a Gemini suggestion using a injected header 5a7bc27.

@diegoferigo

Copy link
Copy Markdown
Contributor Author

I attempted to implement a workaround for the Windows build errors but found no sustainable solution.

After failing to resolve the core compilation issues (macro collisions), I tried disabling the problematic choreography protos and their cascading dependencies. However, this resulted in a severely stripped-down API that would offer little value to users.

Considering the high maintenance cost of these fragile patches and the fact that likely the windows user base will be small compared to linux, I am disabling windows support entirely. I encourage any interested contributors with access to a windows development environment to refine the recipe directly in the feedstock repository.

@conda-forge-admin

conda-forge-admin commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

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 (recipes/spot-cpp-sdk/recipe.yaml) and found it was in an excellent condition.

I do have some suggestions for making it better though...

For recipes/spot-cpp-sdk/recipe.yaml:

  • ℹ️ It looks like the '???' output doesn't have any tests.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/24210333096. Examine the logs at this URL for more detail.

@diegoferigo

diegoferigo commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author

I introduced a new spot-cpp-sdk-devel in a806241 with the necessary run dependencies.

On the long term (as soon as conda/ceps#102 is accepted), I believe the recipe can be further improved by moving headers and *.cmake files into the -devel subpackage. For now, I'm quite happy with the current status.


I am facing the following problem when I try to implement the documented Eigen pattern for recipes with -devel subpackage:

 ╭─ Running build for recipe: spot-cpp-sdk-devel-5.1.4-h7421ac6_0
 │
 │ ╭─ Fetching source code
 │ │ Fetching source from url: https://github.com/boston-dynamics/spot-cpp-sdk/archive/refs/tags/v5.1.4.zip
 │ │ Found extracted source in cache: /home/conda/staged-recipes/build_artifacts/src_cache/1e433fb14d137ea6_extracted
 │ │ Copying source from cache: /home/conda/staged-recipes/build_artifacts/src_cache/1e433fb14d137ea6_extracted to /home/conda/staged-recipes/build_artifacts/bld/rattler-build_spot-cpp-sdk-devel_1775733867/work
 │ │ Applying patch: /home/conda/staged-recipes-copy/recipes/spot-cpp-sdk/01-fix-protobuf-stringview.patch
 │ │ Applying patch: /home/conda/staged-recipes-copy/recipes/spot-cpp-sdk/02-fix-proto-shared-linkage.osx.patch
 │ │
 │ ╰─────────────────── (took 0 seconds)
 │
 ╰─────────────────── (took 0 seconds)
Error:   × Could not apply pin_compatible. The following package is not part of the
  │ solution: eigen-abi

@diegoferigo

Copy link
Copy Markdown
Contributor Author

@conda-forge/help-c-cpp any guidance on how to address this problem the intended way?

@diegoferigo
diegoferigo marked this pull request as ready for review April 9, 2026 13:14
@diegoferigo

Copy link
Copy Markdown
Contributor Author

@conda-forge/help-c-cpp, ready for review!

Comment thread recipes/spot-cpp-sdk/recipe.yaml Outdated
- ninja
host:
- cli11
- eigen-abi-devel <5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any specific reason for the <5 constraint? The build should get the 3.4.0 constraint from the pinnings, and then the migrator bot should open a PR to update the version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope I haven't tried without the pin, I expected v5 to be already the default and I wanted to prevent it. Let me try.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 2c06c7e, I confirm that eigen<5 is still the default

 │ Finalized run dependencies (spot-cpp-sdk-5.1.4-he70b258_0):
 │ ╭──────────────────┬────────────────────────────────────────────────────────────╮
 │ │ Name             ┆ Spec                                                       │
 │ ╞══════════════════╪════════════════════════════════════════════════════════════╡
 │ │ Run dependencies ┆                                                            │
 │ │ __glibc          ┆ >=2.17,<3.0.a0 (RE of [build: sysroot_linux-64])           │
 │ │ eigen-abi        ┆ >=3.4.0.100,<3.4.0.101.0a0 (RE of [host: eigen-abi-devel]) │
 │ │ libabseil        ┆ >=20250512.1,<20250513.0a0 (RE of [host: libabseil])       │
 │ │                  ┆ * cxx17* (RE of [host: libabseil])                         │
 │ │ libgcc           ┆ >=14 (RE of [build: gxx_linux-64])                         │
 │ │                  ┆ >=14 (RE of [build: gcc_linux-64])                         │
 │ │ libgrpc          ┆ >=1.73.1,<1.74.0a0 (RE of [host: libgrpc])                 │
 │ │ libprotobuf      ┆ >=6.31.1,<6.31.2.0a0 (RE of [host: libprotobuf])           │
 │ │ libstdcxx        ┆ >=14 (RE of [build: gxx_linux-64])                         │
 │ ╰──────────────────┴────────────────────────────────────────────────────────────╯

@diegoferigo

Copy link
Copy Markdown
Contributor Author

@traversaro I addressed your comments

@traversaro
traversaro force-pushed the diegoferigo/spot-cpp-sdk branch from 2c06c7e to 1ff09ea Compare April 9, 2026 19:54
@traversaro

Copy link
Copy Markdown
Contributor

Thanks!

@traversaro
traversaro merged commit 24fe216 into conda-forge:main Apr 9, 2026
8 checks passed
@diegoferigo
diegoferigo deleted the diegoferigo/spot-cpp-sdk branch April 9, 2026 22:32
@diegoferigo

Copy link
Copy Markdown
Contributor Author

Thanks @traversaro for merging! This time something went wrong with the automatic creation of the feedstock, I see an empty repo. What could be done when this happens?

https://github.com/conda-forge/spot-cpp-sdk-feedstock

@diegoferigo

Copy link
Copy Markdown
Contributor Author

Got finally populated, problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants