-
Notifications
You must be signed in to change notification settings - Fork 368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building on macOS: undeclared identifier '_SC_PHYS_PAGES'
#1923
Comments
I tried following the suggestion in the last link of my post above by adding this patch to the conda build. That was just the simplest implementation for testing. You may prefer a solution that keeps using |
@hhorii Any thoughts on the patch I linked to in my last message? I could make it into a PR, but you may prefer a different solution. |
The unistd.h API that had been used for both Linux and macOS is not always available in macOS environments, for example when building with upstream clang rather than AppleClang. Closes Qiskit#1923
The unistd.h API that had been used for both Linux and macOS is not always available in macOS environments, for example when building with upstream clang rather than AppleClang. Closes Qiskit#1923
The unistd.h API that had been used for both Linux and macOS is not always available in macOS environments, for example when building with upstream clang rather than AppleClang. Closes #1923
The unistd.h API that had been used for both Linux and macOS is not always available in macOS environments, for example when building with upstream clang rather than AppleClang. Closes Qiskit#1923
* PR to release 0.13.2 * Remove usage of ``qiskit.extensions`` (#2023) The module has been pending deprecation since Qiskit 0.45. It is deprecated for 0.46 and removed in 1.0. This removal concerns the import location of ``UnitaryGate`` and the usage of the ``ExtensionError``. The first is easily fixed, whereas for the latter I tried using ``ValueError`` or ``TypeError``, which seemed to cover the error meanings. Technically, this is a breaking change and we could introduce an intermediary class that inherits from the deprecated ``ExtensionError`` and the new choice of error. However, since we will soon be changing to 1.0 and we also skipped this in Qiskit Terra (as we thought it highly unlikely that users are actually relying on this error type) it might be fine to just change the error type. * Fix GPU batched execution (#2014) * Fix GPU batched execution * format * Use Apple-specific API to determine system memory on macOS (#2016) The unistd.h API that had been used for both Linux and macOS is not always available in macOS environments, for example when building with upstream clang rather than AppleClang. Closes #1923 * Remove qiskit.test from test/common.py (#1971) * remove qiskit.test from test/common.py * fix format, add releasenote --------- Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com> * raise Qiskit dependency to 0.45.0 (#2008) Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com> * `deprecate_func(..., since=...)` should be a string, not a float (#2006) * deprecate_func "since" parameter should be a str, not a float * black * Avoid accessing GPUs when using CPU only (#2012) * avoid accessing GPUs when using CPU only * remove unused import/parameter * Reduce warning meesages (#2013) * reduce warning meesages * format * fix Windows * uint -> uint_t * fix Thrust seg fault * format * Add support for running with Python 3.12 (#2022) * Add support for running with Python 3.12 Python 3.12.0 was released on 10-02-2023, this commit marks the start of support for Python 3.12 in qiskit-aer. It adds the supported Python version in the package metadata and updates the CI configuration to run test jobs on Python 3.12 and build Python 3.12 wheels on release. * Remove numpy constraints * Uncap six * Fix i686 build steps * Use python 3.12.0 in tests to work around unittest breakage in 3.12.1 * Use 3.12.0 for all test jobs --------- Co-authored-by: Jun Doi <doichan@jp.ibm.com> * enable bit operations for boolean types (#2024) Co-authored-by: Jun Doi <doichan@jp.ibm.com> --------- Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: Will Shanks <willshanks@us.ibm.com> Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com> Co-authored-by: Luciano Bello <bel@zurich.ibm.com> Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
NOTE: This is a continuation of #1689. I missed the responses to that issue somehow.
Informations
What is the current behavior?
When trying to build qiskit-aer, I encounter the following error (build log):
Steps to reproduce the problem
In #1689 (comment), @hhorii described an attempt to run
conda build
, but the problem was that the commited version of the recipe was used, which had already disabled the osx build since I could not get it to succeed (this is why in the output it says "Skipped: qiskit-aer from /HOME/staged-recipes/recipes/qiskit-aer defines build/skip for this configuration ({'numpy': '1.16', 'cxx_compiler': 'clangxx', 'python': '3.9', 'target_platform': 'osx-64'})."). Now that the qiskit-aer feedstock exists, I opened a new PR for testing the macOS build. I suggest retrying with the branch for that PR. Note that in the recipe I pinned to Python 3.9 to reduce CI usage, so it should be tested with 3.9 or the=3.9
on thepython
lines inmeta.yaml
should be removed.I am not familiar with using
pip install conda-build
. It might be able to reproduce the problem. I usually installconda-build
withconda
. If I were testing, I would do this process:mamba install conda-build
.conda build recipe
.There is also a
build-locally.py
script in the qiskit-aer-feedstock repo, so you could dopython build-locally.py osx
, but that does more setup.What is the expected behavior?
qiskit-aer builds successfully.
Suggested solutions
Comparing the build environment in the qiskit-aer GitHub Actions CI with the environment from the conda-forge CI (like the one in the build log), what stands out to me is that in the qiskit-aer CI cmake reports the compiler as
AppleClang 14.0.0.14000029
while in the conda-forge CI it is reported asClang 14.0.6
. My guess is that_SC_PHYS_PAGES
is included in an Apple specific header that the conda build of clang does not include?Searching for
_SC_PHYS_PAGES
andosx
turns up a few things, mostly related to people trying to compile Linux programs on macOS using gcc. Could qiskit-aer do something like this?The text was updated successfully, but these errors were encountered: