locally using rattler-build in staged-recipes repo for a recipe has 'undefined' for stdlib('c')
This issue is similar to #1774 but reproduced locally. To reproduce (I'm on Mac OSX M3, 14.7.6 (23H626)):
gh repo clone conda-forge/staged-recipes
cd staged-recipes
pixi add rattler-build
pixi run rattler-build debug --recipe recipes/example-v1
I observe the following:
╭─ Finding outputs from recipe
│ Found 1 variants
│
│ Build variant: simplejson-3.8.2-h60d57d3_0
│
│ ╭─────────────────┬─────────────╮
│ │ Variant ┆ Version │
│ ╞═════════════════╪═════════════╡
│ │ target_platform ┆ "osx-arm64" │
│ ╰─────────────────┴─────────────╯
│
╰─────────────────── (took 0 seconds)
Build and/or host environments created for debugging.
╭─ Fetching source code
│ Fetching source from url: https://pypi.org/packages/source/s/simplejson/simplejson-3.8.2.tar.gz
│ Downloaded file from https://pypi.org/packages/source/s/simplejson/simplejson-3.8.2.tar.gz
│ Validated SHA256 values of the downloaded file!
│ Extracting tar file to cache: /Users/kratsg/staged-recipes/output/src_cache/simplejson-3_8_2_d58439c5.tar.gz
│ Copying source from url: /Users/kratsg/staged-recipes/output/src_cache/simplejson-3_8_2_d58439c5 to /Users/kratsg/staged-recipes/output/bld/rattler-build_simplejson_1753324102/work
│
╰─────────────────── (took 0 seconds)
╭─ Resolving environments
│
│ Resolving build environment:
│ Platform: osx-arm64 [__unix=0=0, __osx=14.7.6=0, __archspec=1=m1]
│ Channels:
│ - file:///Users/kratsg/staged-recipes/output/
│ - conda-forge
│ Specs:
│ - clang_osx-arm64
│ - undefined
│
╰─────────────────── (took 1 second)
Error: × Failed to resolve dependencies: Cannot solve the request because of: No candidates were found for undefined *.
│
╰─▶ Cannot solve the request because of: No candidates were found for undefined *.
I have looked through the documentation (such as reference/jinja ) but can't seem to understand why this isn't workable locally. The .ci_support file for OSX ARM looks like the following (it's just based on the global conda-forge pinning):
c_compiler:
- clang
cxx_compiler:
- clangxx
c_stdlib:
- macosx_deployment_target
c_stdlib_version:
- 11.0
MACOSX_DEPLOYMENT_TARGET:
- 11.0
fortran_compiler:
- gfortran
go_compiler:
- go-nocgo
cgo_compiler:
- go-cgo
channel_sources:
- conda-forge
target_platform:
- osx-arm64
and I see that this looks.. .. right, I assume. Not sure if I need another environment variable that's not set, but I would have naively assumed this would just work.
Hi @kratsg - things usually work by using -m .ci_support/osx_arm64_.yaml or similar files, which define the c_stdlib / c_stdlib_version variant values.
They are available on staged-recipes. The pixi.toml that is part of staged recipes should have a task that does the correct thing to build locally afaik, too!
The
pixi.tomlthat is part of staged recipes should have a task that does the correct thing to build locally afaik, too
I want to do the debug / create-patch cycle that is supported by rattler-build -- I did not realize one needed to explicitly pass in the .ci_support file directly into it - as I thought this was picked up by rattler-build automatically.
$ pixi run rattler-build debug --recipe recipes/example-v1 -m .ci_support/osx_arm64.yaml
error: unexpected argument '-m' found
Usage: rattler-build debug [OPTIONS] --recipe <RECIPE>
For more information, try '--help'.
but it looks like the debug doesn't support this?
Yeah that's unfortunate, and something we have to fix. Let me make an issue for it!
You can do the same from a regular build btw. and just use the work directory that is printed at the end of a failed build.
If you use the pixi build command in this situation it outputs like this which is not very helpful
❯ pixi build
Error: × Failed to parse recipe