Search code examples
gcccondaconda-build

`conda build gcc-5` Fails on Mac OS Mojave


Using conda, I can not seem to build gcc-5 (or any gcc-X version) recipe on MacOS Mojave:

System pre-reqs

  • Install Xcode
  • Command Line Tools
  • Install headers package (/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg)
  • Run Xcode, to finalize the install.

Conda pre-reqs

  • Install Conda, conda-build
  • Obtain conda-recipes:
git clone git@github.com:conda/conda-recipes.git

Do the Sysroot stuff (as instructed by Anaconda compiler builds)

Which in a nut shell means:

  • Download and extract MacOSX10.9 SDK to /opt/MacOSX10.9.sdk
  • Build the ~/.conda/conda_build_config.yaml
 macos_min_version:
   - 10.9
 macos_machine:
   - x86_64-apple-darwin13.4.0
 MACOSX_DEPLOYMENT_TARGET:
   - 10.9
 CONDA_BUILD_SYSROOT:            # [osx]
   - /opt/MacOSX10.9.sdk         # [osx]
  • Instruct conda to use the above config file (~/.condarc):
conda_build:
  config_file: ~/.conda/conda_build_config.yaml

Attempt to build gcc-5:

cd conda-recipes
conda build gcc-5 -c conda-forge

The above build fails. Pointing at atomic headers in Xcode. My assumption, is that Xcode 10.2.x is too new to build such an old gcc compiler? I have also tried to build my own conda gcc-9 recipe, but fail with missing images (dylibs not found/loaded). So I guess my real question, is what do folks do to build gcc-X using conda build? I can build GCC 9.2.0 manually on my own. But I wish to know how to properly do it using conda build.

Note to Stackoverflow guys: I think this question should be asked on SuperUser, but there is no tag 'conda'. Everyone seems to be posting conda questions here...


Solution

  • coda-recipes is deprecated, see README.md, conda-forge is the replacement.

    On conda-forge, check out clangdev-feedstock.