From a5eb2a9f028370e94057431ea5009a08b789f7e6 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Fri, 10 Apr 2020 00:50:54 -0500 Subject: [PATCH] Fix macOS CI build and install docs --- .gitlab-ci.yml | 2 ++ doc/misc.rst | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb732c51..a5a536a1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -101,6 +101,8 @@ Python 3 Conda Apple: - export CONDA_ENVIRONMENT=.test-conda-env-py3-macos.yml - export PYTEST_ADDOPTS=${PYTEST_ADDOPTS:--k-slowtest} - export CC=clang + # https://stackoverflow.com/q/60934005; https://reviews.llvm.org/D71579 + - export LDFLAGS="-mlinker-version=519" - set -o xtrace - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project-within-miniconda.sh - ". ./build-and-test-py-project-within-miniconda.sh" diff --git a/doc/misc.rst b/doc/misc.rst index 2a426a33..89b55559 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -11,9 +11,7 @@ This set of instructions is intended for 64-bit Linux and macOS computers. On Debian derivatives (Ubuntu and many more), installing ``build-essential`` should do the trick. - On macOS, run ``xcode-select --install`` to install build tools. On Mojave (10.14), - you may need to follow `these steps `_ - as well. + On macOS, run ``xcode-select --install`` to install build tools. Everywhere else, just making sure you have the ``g++`` package should be enough. @@ -45,9 +43,19 @@ And on macOS: #. ``conda install openmp clangdev cython git pip pocl islpy pyopencl sympy pyfmmlib pytest`` +#. Ensure the Conda version of clang finds the system headers. For Catalina + (10.15), you should set (`source `_):: + + export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) + + Whereas for Mojave (10.14), you may need to follow `these steps + `_. + #. Type the following command:: - hash -r; for i in pymbolic cgen genpy gmsh_interop modepy pyvisfile loopy boxtree sumpy meshmode pytential; do CC=clang python -m pip install git+https://github.com/inducer/$i; done + hash -r; for i in pymbolic cgen genpy gmsh_interop modepy pyvisfile loopy boxtree sumpy meshmode pytential;do CC=clang LDFLAGS="-mlinker-version=519" python -m pip install git+https://github.com/inducer/$i; done + + (The `LDFLAGS` argument is due to a `bug `_.) Next time you want to use :mod:`pytential`, just run the following command:: -- GitLab