mapbox / mapbox/mason

[[llvm] Clearly document the OS X requirement for full XCode installation

Open
#571 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
258
Forks
68
PR merge metrics
No merged PRs in 30d

Description

The llvm/clang++ compiler used and provided by mason needs a full XCode installation available. Otherwise you'll hit a warning like:

clang-5.0: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk' [-Wmissing-sysroot]

And an error when the program tries to use something from the C standard library. For example:

fatal error: 'stdlib.h' file not found
#include <stdlib.h>
         ^~~~~~~~~~
1 error generated.

But this error will depend on what of the C standard library is being requested.

The way to solve this is for OS X users to install a full version of XCode.

This reliance on a full version of XCode is due to this line in our compiler config: https://github.com/mapbox/mason/blob/6aa9591a336ac71bfa1974185b6ee784a9b6033a/scripts/llvm/base/common.sh#L230. It is possible we could try to get this working against the Command line tools install of C headers as well, but this is not something I've tried.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at scripts/llvm/base/common.sh around line 230 to confirm why the compiler requires a full XCode installation rather than Command Line Tools. Document that OS X prerequisite, including the reported missing-sysroot and stdlib.h errors, in the project's appropriate documentation location. Done means users can find and understand the full XCode requirement before using mason's llvm/clang++ compiler.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
build-system, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.