Skip to content

Commit 4fcb08d

Browse files
committed
update knowledge base for new stdlib usage
1 parent e470f0d commit 4fcb08d

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

docs/maintainer/knowledge_base.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,15 +1727,15 @@ but with `10.9` as the deployment target.
17271727
WARNING: some packages might use features from `10.12` if you do the above due to
17281728
buggy symbol availability checks. For example packages looking for `clock_gettime`
17291729
will see it as it will be a weak symbol, but the package might not have a codepath
1730-
to handle the weak symbol, in that case, you need to update the `MACOSX_DEPLOYMENT_TARGET`
1731-
as described below.
1730+
to handle the weak symbol, in that case, you need to update the `c_stdlib_version`
1731+
(previously `MACOSX_DEPLOYMENT_TARGET`) as described below.
17321732
17331733
After increasing the SDK version, if you are getting an error that says that a function
17341734
is available only for macOS x.x, then do the following in `recipe/conda_build_config.yaml`,
17351735
17361736
```yaml
17371737
# Please consult conda-forge/core before doing this
1738-
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
1738+
c_stdlib_version: # [osx and x86_64]
17391739
- "10.12" # [osx and x86_64]
17401740
MACOSX_SDK_VERSION: # [osx and x86_64]
17411741
- "10.12" # [osx and x86_64]
@@ -1745,13 +1745,12 @@ In `recipe/meta.yaml`, add the following to ensure that the user's system is com
17451745

17461746
```yaml
17471747
requirements:
1748-
run:
1749-
- __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64]
1748+
build:
1749+
- {{ stdlib("c") }}
17501750
```
17511751

1752-
Note that this requires `conda>=4.8`. If you want to support older conda versions
1753-
the requirement should be changed from `run` to `run_constrained`. Note that
1754-
`conda<4.8` will ignore the condition if it's a `run_constrained` on `__osx`.
1752+
Note that the run-export on `__osx` that's produced by the stdlib metapackages
1753+
requires `conda>=4.8`.
17551754

17561755
<a id="newer-c-features-with-old-sdk"></a>
17571756

@@ -1874,10 +1873,18 @@ put the following in your build section.
18741873
requirements:
18751874
build:
18761875
- {{ compiler('c') }}
1877-
- sysroot_linux-64 2.17 # [linux64]
1876+
- {{ stdlib('c') }}
18781877
```
1878+
and add the following to `recipe/conda_build_config.yaml`:
1879+
```yaml
1880+
c_stdlib_version: # [linux]
1881+
- "2.17" # [linux]
1882+
```
1883+
1884+
This covers the headers/library present at build-time, and will also create
1885+
a corresponding run-export on the `__glibc` virtual package.
18791886

1880-
You also need to use a newer docker image by setting the following in the `conda-forge.yml`
1887+
You may also need to use a newer docker image by setting the following in the `conda-forge.yml`
18811888
of your recipe and rerendering.
18821889

18831890
```yaml

0 commit comments

Comments
 (0)