premake / premake/premake-core

`os.findheader()` broken on macOS

Open
#873 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement help wanted
Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

Opening an issue for this, as I'm not sure the best way to address it.

The current logic for building the include file search path on macOS results in Posix looking set of directories like /include:/usr/include:/usr/local/include.

On a typical macOS developer installation, the system headers will actually be installed to a path like /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/. If targeting iOS, the header would be in a directory like /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/. The same for watchOS or tvOS.

It is not enough to identify the current system; the call must also know the target system to evaluate this call correctly.

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 by tracing the current os.findheader logic that builds the macOS include search path. Compare its results with the SDK header locations described for macOS, iOS, watchOS, and tvOS, and verify that lookup accounts for the target system when done.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua, macos
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.