Skip to content

Commit fc9f94b

Browse files
authored
Merge pull request #1181 from isuruf/macos
update macos docs
2 parents ddd81d4 + 1474683 commit fc9f94b

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

src/maintainer/knowledge_base.rst

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -992,20 +992,42 @@ To use a new SDK, add the following in ``recipe/conda_build_config.yaml``
992992

993993
.. code-block:: yaml
994994
995-
MACOSX_DEPLOYMENT_TARGET: # [osx]
996-
- 10.12 # [osx]
995+
# Please consult conda-forge/core before doing this
996+
MACOSX_SDK_VERSION: # [osx and x86_64]
997+
- 10.12 # [osx and x86_64]
998+
999+
Note that this should be done if the error you are getting says that a header is not
1000+
found or a macro is not defined. This will make your package compile with a newer SDK
1001+
but with ``10.9`` as the deployment target.
1002+
WARNING: some packages might use features from ``10.12`` if you do the above due to
1003+
buggy symbol availability checks. For example packages looking for ``clock_gettime``
1004+
will see it as it will be a weak symbol, but the package might not have a codepath
1005+
to handle the weak symbol, in that case, you need to update the ``MACOSX_DEPLOYMENT_TARGET``
1006+
as described below.
1007+
1008+
After increasing the SDK version, if you are getting an error that says that a function
1009+
is available only for macOS x.x, then do the following in ``recipe/conda_build_config.yaml``,
1010+
1011+
.. code-block:: yaml
1012+
1013+
# Please consult conda-forge/core before doing this
1014+
MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64]
1015+
- 10.12 # [osx and x86_64]
1016+
MACOSX_SDK_VERSION: # [osx and x86_64]
1017+
- 10.12 # [osx and x86_64]
1018+
9971019
9981020
In ``recipe/meta.yaml``, add the following to ensure that the user's system is compatible.
9991021

10001022
.. code-block:: yaml
10011023
10021024
requirements:
1003-
run_constrained:
1004-
- __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx]
1025+
run:
1026+
- __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64]
10051027
1006-
Note that the requirement is a `run_constrained`, because the ``__osx`` virtual package
1007-
is supported only by ``conda>=4.8``. Once that conda version is used widely, the
1008-
requirement will be changed from ``run_constrained`` to ``run``.
1028+
Note that this requires ``conda>=4.8``. If you want to support older conda versions
1029+
the requirement should be changed from ``run`` to ``run_constrained``. Note that
1030+
``conda<4.8`` will ignore the condition if it's a ``run_constrained`` on ``__osx``.
10091031

10101032

10111033
PyPy builds

0 commit comments

Comments
 (0)